资源简介
DoubleCA-GMSSL-Sample.PPLIC.2019.02.19.zip
代码片段和文件信息
/**
*
*/
package com.doubleca.security.gmssl.sample;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Security;
import java.security.UnrecoverableKeyException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManagerFactory;
import doubleca.security.gmssl.provider.DoubleCASSE;
import doubleca.security.provider.DoubleCA;
/**
* @author Home
*
*/
public class GmSSLClientSample
{
/**
*
*/
private static DoubleCASSE dcsse = new DoubleCASSE();
/**
* 用终端授权请求编码去http://www.pplic.com申请授权数据
*/
private static void generateLicRequest()
{
StringBuffer licRequest = new StringBuffer();
int result = dcsse.generateLicRequest(licRequest);
if (result == 0x70000000)
{
System.out.println(“终端授权请求编码:“);
System.out.println(licRequest.toString());
}
else
{
System.out.println(“终端授权请求编码出错,错误编号:0x“ + Integer.toHexString(result));
}
}
/**
* 用授权数据初始化dcsse
*/
private static void initLic()
{
// 获得的本机授权数据,在http://www.pplic.com授权平台获取
String licData = “ASeraPDybn/wwAABTGQnuKT71OrK0gnV/OSwjRcgHXJAtseX+Tu2kqOJCnT4r4b9/FUYOKXfJ3nsjDarus6mo+WPax6Z4W8ONonjro7Ql0WxJgIM234bdV2xBvv8pUkD/dffwZfkQ/HfjXsz4QH2+TQ0eWcUr4f2hnfNDxczJ+g88pWVUuCbcxTLWdCWW547Bp2TJ5FQt28zWxSTXqoJxXavYMffp1PnvBL9DOjKLFhqRdLVVsoiIVTsikGEgHeKrUsjmft01PqSd9ErqWEXsGpslzVzuVBjGtyQh6Arz3Ksy1wyipor+7y4KrsTuD9qxvfEjKdHm58p0BacfOHXfLe8XUKDLADIddfDyMIgAXAiUG8Zh+oRw0qDIuIgVgaRGcQ0SEWpXQbl2wCXye2B9Oa2Pr+9+/OWS4LbxWIiDOEbTA4kQT/lklQ3sfBZZJkXPJtmMQx0HgNcsrX6tkoiZC1G0c4mSkbq6k8R5dIS6KcEycS2SekKCqmNmC1yd9QC2iAXIG/pcTaGWuTzPWbU+6lfu0MMm4zL9po1wBORzpVqxsTh6hhe0URpxqPdNQOWHRp7PxaCRhJrZAh7/DiwulJwu7I42zbXdkncmwHHj07DCyJiUJScXz4tVaC/BgRV93ySirRh9gTjV61DM97pS43adyOA2U4cGNO7nm5b7JLKInE4ukuislJZHDB/5hiDRE/H48KPZNB/EsEZVcEgIXaAaRwf1jOG6pvM9qS6Pg==“;
dcsse.setLicData(licData);
System.out.println(“授权有效期:“ + dcsse.getLicEndTime().toLocaleString());
}
/**
*
* @throws KeyStoreException
* @throws NoSuchAlgorithmException
* @throws CertificateException
* @throws FileNotFoundException
* @throws IOException
* @throws UnrecoverableKeyException
* @throws KeyManagementException
* @throws NoSuchProviderException
*/
private static void clientGmSSL() throws KeyStoreException NoSuchAlgorithmException CertificateException FileNotFoundException IOException UnrecoverableKeyException KeyManagementException NoSuchProviderException
{
Secur
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-02-19 15:55 DoubleCA-GMSSL-Sample\
文件 522 2019-02-19 15:57 DoubleCA-GMSSL-Sample\.classpath
文件 397 2019-02-17 21:41 DoubleCA-GMSSL-Sample\.project
目录 0 2019-02-19 15:54 DoubleCA-GMSSL-Sample\.settings\
文件 598 2019-02-17 21:42 DoubleCA-GMSSL-Sample\.settings\org.eclipse.jdt.core.prefs
目录 0 2019-02-19 16:24 DoubleCA-GMSSL-Sample\bin\
目录 0 2019-02-19 15:54 DoubleCA-GMSSL-Sample\libs\
文件 887373 2018-04-10 09:06 DoubleCA-GMSSL-Sample\libs\doubleca-jce-0.9.4-SNAPSHOT.jar
文件 249207 2019-02-19 14:50 DoubleCA-GMSSL-Sample\libs\doubleca-sse-0.9.1-SNAPSHOT.jar
文件 4345729 2019-02-17 04:06 DoubleCA-GMSSL-Sample\libs\pp-auth-1.0.0-SNAPSHOT.jar
目录 0 2019-02-19 15:54 DoubleCA-GMSSL-Sample\resources\
文件 3414 2019-02-17 22:57 DoubleCA-GMSSL-Sample\resources\CLIENT.dcks
文件 3413 2019-02-17 22:57 DoubleCA-GMSSL-Sample\resources\SERVER.dcks
目录 0 2019-02-19 15:54 DoubleCA-GMSSL-Sample\src\
目录 0 2019-02-19 15:54 DoubleCA-GMSSL-Sample\src\com\
目录 0 2019-02-19 15:54 DoubleCA-GMSSL-Sample\src\com\doubleca\
目录 0 2019-02-19 15:54 DoubleCA-GMSSL-Sample\src\com\doubleca\security\
目录 0 2019-02-19 15:54 DoubleCA-GMSSL-Sample\src\com\doubleca\security\gmssl\
目录 0 2019-02-19 15:54 DoubleCA-GMSSL-Sample\src\com\doubleca\security\gmssl\sample\
文件 5695 2019-02-19 16:10 DoubleCA-GMSSL-Sample\src\com\doubleca\security\gmssl\sample\GmSSLClientSample.java
文件 6274 2019-02-19 16:23 DoubleCA-GMSSL-Sample\src\com\doubleca\security\gmssl\sample\GmSSLServerSample.java
相关资源
- 通过变化的电磁耦合,大型强子对撞
- Delphi XE10.3 破解文件
- Delphi XE10.2.3破解 破解
- 剖析Linux系统下基于NUMA构建的服务
- zend studio 12 破解 注册码 key 绿色版
- CCLicenseService
- WinRAR 4.0 简体中文破解版
- 单片机仿真软件proteus6.7免安装绿色版
- UltraEdit 26.x版本 激活工具
- 一种基于LM3150 Buck型开关电源设计.p
- 百度文库、豆丁、道客巴巴文件免费
- 改善分数分频锁相环合成器中的整数
- 233网校视频器2018最新绿色版
- OdooHotelManagementSystem 基于Odoo的酒店管
- SecureCRT-6.0.2安装包和SecureCRT-6.0.2注册
- 数据结构与算法课件ppt
- 方正超粗黑简体 FZCCHJW—GB1-0 字体
- FZCCHJW-GB10
- Dr. Cleaner Pro mac破解版
- kindle epub 电子书大全
- 迅雷敏感资源限制解除小工具.zip
- Eclipse编程技术与附CD-ROM光盘
- HEU_KMS_Activator_j
- pzs_44217116_06.aia
- Git汉化资源
- digital字体
- 浪潮英信服务器NP120D用户手册
- 看门狗复位的应用技巧
- Hillstone SA-2003高性能纯硬件安全网关产
- Hillstone ARP防护——StoneOS如何保
评论
共有 条评论