介绍:开源国密通信纯 Java JSSE 实现,国密https网站访问,安卓版 HttpsURLConnection协议访问国密网站,SM2,SM3,SM4
1.使用案例:
//本地测试链接 SM2单证书
public static final String nativeUrl = "https://192.168.10.35:9400/index.html";
//沃通 RSA和SM2双证书
public static final String ovsslUrl = "https://sm2test.ovssl.cn/";
//中国银行 SM2单证书
public static final String bocUrl = "https://ebssec.boc.cn/";
//GDCA 测试链接 RSA和SM2双证书
public static final String gdcaUrl = "https://gmssl.trustauth.cn/";
//更多国密测试链接,见:HttpsURLConnectionUtils
String url = HttpsURLConnectionUtils.gdcaUrl;
HttpsURLConnectionUtils.get(this, url, new RequestCallBack() {
@Override
public void onError(Exception e) {
}
@Override
public void onFail(String msg) {
}
@Override
public void onSuccess(String content) {
}
});
2.demo地址:
3.github开源地址:
开源地址: https://github.com/yuxie2025/guomi_demo.git
网友评论