Class GmSSLContextBuilder
java.lang.Object
tech.riemann.nif.support.tiangong.connector.ssl.GmSSLContextBuilder
国密 SSL 上下文构建器
支持 SM2 双证书模式(签名证书 + 加密证书)
兼容模式:同时支持国密 TLS 和标准 TLS
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SSLContextbuildGmSSLContext(String signCertPath, String encryptCertPath, String keyPath, String keyPassword, boolean dualMode) 构建国密 SSL 上下文static String[]获取国密 Cipher Suites
-
Field Details
-
PROTOCOL_GMSSL
-
GM_CIPHER_SUITES
国密 Cipher Suites
-
-
Constructor Details
-
GmSSLContextBuilder
public GmSSLContextBuilder()
-
-
Method Details
-
buildGmSSLContext
public static SSLContext buildGmSSLContext(String signCertPath, String encryptCertPath, String keyPath, String keyPassword, boolean dualMode) throws Exception 构建国密 SSL 上下文- Parameters:
signCertPath- 签名证书路径encryptCertPath- 加密证书路径keyPath- 私钥路径keyPassword- 私钥密码dualMode- 是否双模式(国密 + 标准 TLS)- Returns:
- SSLContext
- Throws:
Exception
-
getGmCipherSuites
获取国密 Cipher Suites
-