当前位置:   article > 正文

Android平台使用大宝CA版本JCE完成SM2、SM3、SM4国密算法、密钥、国密数字证书的详细说明_android sm3digest

android sm3digest

系统要求
Android 5.0(API 21)及以上 

功能介绍

  1. SM2密钥对的生成功能
  2. SM2密钥对的还原功能
  3. SM2算法的非对称加解密功能
  4. SM2算法的签名/验证功能
  5. SM3算法的摘要功能
  6. SM4算法的对称加解密功能
  7. 大宝CA版本Keystore文件(DCKS文件)存储SM2密钥对和国密数字证书的功能

Android调用JCE的主要代码

  1. package com.doubleca.android.sample.gmjce;
  2. import com.doubleca.b146.c16.util.encoders.Base64;
  3. import java.io.File;
  4. import java.io.FileInputStream;
  5. import java.io.FileOutputStream;
  6. import java.io.InputStream;
  7. import java.math.BigInteger;
  8. import java.security.InvalidKeyException;
  9. import java.security.Key;
  10. import java.security.KeyFactory;
  11. import java.security.KeyPair;
  12. import java.security.KeyPairGenerator;
  13. import java.security.KeyStore;
  14. import java.security.MessageDigest;
  15. import java.security.NoSuchAlgorithmException;
  16. import java.security.PrivateKey;
  17. import java.security.PublicKey;
  18. import java.security.SecureRandom;
  19. import java.security.SignatureException;
  20. import java.security.cert.Certificate;
  21. import java.security.cert.CertificateFactory;
  22. import java.security.cert.X509Certificate;
  23. import java.security.spec.InvalidKeySpecException;
  24. import java.security.spec.PKCS8EncodedKeySpec;
  25. import java.security.spec.X509EncodedKeySpec;
  26. import java.util.Enumeration;
  27. import javax.crypto.Cipher;
  28. import javax.crypto.KeyGenerator;
  29. import javax.crypto.SecretKey;
  30. import javax.crypto.SecretKeyFactory;
  31. import javax.crypto.spec.IvParameterSpec;
  32. import javax.crypto.spec.SecretKeySpec;
  33. import doubleca.security.provider.DoubleCA;
  34. import doubleca.security.provider.jdk7.sm4.SM4KeySpec;
  35. public class GmTest
  36. {
  37. private static final String SIGNATURE_KEY_ALGORITHM = "SM2";
  38. private static final String SIGNATURE_ALGORITHM = "SM3withSM2";
  39. private static final int SIGNATURE_KEY_SIZE = 256;
  40. private static final String DIGEST_ALGORITHM = "SM3";
  41. private static final String CIPHER_SM4_KEY_ALGORITHM = "SM4";
  42. // private static final String CIPHER_SM4_ALGORITHM = "SM4/ECB/PKCS5Padding";
  43. private static final String CIPHER_SM4_ALGORITHM = "SM4/CBC/PKCS5Padding";
  44. // private static final String CIPHER_SM4_ALGORITHM = "SM4/ECB/NOPadding";
  45. // private static final String CIPHER_SM4_ALGORITHM = "SM4/CBC/NOPadding";
  46. private static final String CIPHER_SM2_ALGORITHM = "SM2/NONE/NOPadding";
  47. public static SecretKey TestSM4Cipher()
  48. {
  49. try
  50. {
  51. String plainText1 = "软件(库)授权与防复制、防盗版,全平台支持:";
  52. String plainText2 = "https://www.PPLIC.com ";
  53. byte[] plain1 = plainText1.getBytes();
  54. byte[] plain2 = plainText2.getBytes();
  55. SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(CIPHER_SM4_KEY_ALGORITHM, DoubleCA.PROVIDER_NAME);
  56. SM4KeySpec keySpec = new SM4KeySpec("1234567812345678".getBytes("utf-8"));
  57. IvParameterSpec iv = new IvParameterSpec("1234567812345678".getBytes());
  58. SecretKey key = keyFactory.generateSecret(keySpec);
  59. BigInteger keyBuffer = new BigInteger(1, key.getEncoded());
  60. System.out.println("SM4 Key :" + keyBuffer.toString(16).toUpperCase());
  61. // KeyGenerator kgen = KeyGenerator.getInstance("OID.1.2.156.10197.1.104");
  62. // KeyGenerator kgen = KeyGenerator.getInstance("1.2.156.10197.1.104");
  63. // KeyGenerator kgen = KeyGenerator.getInstance("SMS4");
  64. KeyGenerator kgen = KeyGenerator.getInstance(CIPHER_SM4_KEY_ALGORITHM);
  65. kgen.init(128, new SecureRandom("12345678".getBytes()));
  66. SecretKey secretKey = kgen.generateKey();
  67. byte[] enCodeFormat = secretKey.getEncoded();
  68. SecretKeySpec sm4keySpec = new SecretKeySpec(enCodeFormat, CIPHER_SM4_KEY_ALGORITHM);
  69. keyBuffer = new BigInteger(1, sm4keySpec.getEncoded());
  70. System.out.println("SM4KeySpec :" + keyBuffer.toString(16).toUpperCase());
  71. Cipher cipher = Cipher.getInstance(CIPHER_SM4_ALGORITHM);// 创建密码器
  72. // cipher.init(Cipher.ENCRYPT_MODE, sm4keySpec);// 初始化
  73. cipher.init(Cipher.ENCRYPT_MODE, sm4keySpec, iv);// 初始化
  74. byte[] sm4ResultBuffer = new byte[cipher.getOutputSize(plain1.length + plain2.length)];
  75. int bufferLen = cipher.update(plain1, 0, plain1.length, sm4ResultBuffer, 0);
  76. bufferLen += cipher.update(plain2, 0, plain2.length, sm4ResultBuffer, bufferLen);
  77. bufferLen += cipher.doFinal(sm4ResultBuffer, bufferLen);
  78. byte[] result = new byte[bufferLen];
  79. System.arraycopy(sm4ResultBuffer, 0, result, 0, sm4ResultBuffer.length);
  80. BigInteger buffer = new BigInteger(1, result);
  81. System.out.println("原文1:" + plainText1);
  82. System.out.println("原文2:" + plainText2);
  83. System.out.println("密文:" + new String(Base64.encode(result)));
  84. // cipher.init(Cipher.DECRYPT_MODE, sm4keySpec);// 初始化
  85. cipher.init(Cipher.DECRYPT_MODE, sm4keySpec, iv);// 初始化
  86. sm4ResultBuffer = new byte[cipher.getOutputSize(result.length)];
  87. bufferLen = cipher.update(result, 0, result.length / 2, sm4ResultBuffer, 0);
  88. bufferLen += cipher.update(result, result.length / 2, result.length - (result.length / 2), sm4ResultBuffer, bufferLen);
  89. bufferLen += cipher.doFinal(sm4ResultBuffer, bufferLen);
  90. result = new byte[bufferLen];
  91. System.arraycopy(sm4ResultBuffer, 0, result, 0, result.length);
  92. System.out.println("原文:" + new String(result));
  93. return key;
  94. }
  95. catch (Exception ex)
  96. {
  97. ex.printStackTrace();
  98. return null;
  99. }
  100. }
  101. public static boolean TestSM3Digest()
  102. {
  103. try
  104. {
  105. MessageDigest md = MessageDigest.getInstance(DIGEST_ALGORITHM);
  106. byte[] result;
  107. md.update("大宝CA 国密SSL(v1.1)算法库:https://www.DoubleCA.com ".getBytes());
  108. // byte[] result = md.digest("1234512345".getBytes());
  109. result = md.digest();
  110. System.out.println(md.getAlgorithm() + " MessageDigest : " + new BigInteger(1, result).toString(16).toUpperCase());
  111. return true;
  112. }
  113. catch (Exception ex)
  114. {
  115. ex.printStackTrace();
  116. return false;
  117. }
  118. }
  119. public static boolean TestSM2Signature(KeyPair key) throws NoSuchAlgorithmException, SignatureException, InvalidKeyException
  120. {
  121. String content = "大宝CA 国密SSL(v1.1)Tomcat:https://www.DoubleCA.com ";
  122. System.out.println("原文:" + content);
  123. java.security.Signature signature = java.security.Signature.getInstance(SIGNATURE_ALGORITHM);
  124. signature.initSign(key.getPrivate());
  125. signature.update(content.getBytes());
  126. byte[] signValue = signature.sign();
  127. System.out.println("签名值:" + new String(Base64.encode(signValue)));
  128. signature.initVerify(key.getPublic());
  129. signature.update(content.getBytes());
  130. boolean result = signature.verify(signValue);
  131. System.out.println("签名验证结果 :" + result);
  132. return result;
  133. }
  134. public static boolean TestSM2AsymmetricCipher(KeyPair key)
  135. {
  136. try
  137. {
  138. Cipher cipher = Cipher.getInstance(CIPHER_SM2_ALGORITHM);
  139. cipher.init(Cipher.ENCRYPT_MODE, key.getPublic());
  140. String plainText = "软件(库)授权与防复制:https://www.PPLIC.com ";
  141. System.out.println("原文:" + plainText);
  142. cipher.update(plainText.getBytes());
  143. byte[] cipherByte = cipher.doFinal();
  144. System.out.println("密文:" + new String(Base64.encode(cipherByte)));
  145. cipher.init(Cipher.DECRYPT_MODE, key.getPrivate());
  146. byte[] plainByte = cipher.doFinal(cipherByte);
  147. System.out.println("原文:" + new String(plainByte));
  148. return true;
  149. }
  150. catch (Exception ex)
  151. {
  152. ex.printStackTrace();
  153. return false;
  154. }
  155. }
  156. public static KeyPair TestSM2KeyPairGenerator() throws Exception
  157. {
  158. // 生成密钥对
  159. KeyPairGenerator keyGen = KeyPairGenerator.getInstance(SIGNATURE_KEY_ALGORITHM);
  160. keyGen.initialize(SIGNATURE_KEY_SIZE);
  161. KeyPair key = keyGen.generateKeyPair();
  162. PublicKey publicKey = key.getPublic();
  163. BigInteger a = new BigInteger(1, key.getPrivate().getEncoded());
  164. BigInteger b = new BigInteger(1, publicKey.getEncoded());
  165. System.out.println(keyGen.getAlgorithm() + " KeyPairGenerator publickey : " + b.toString(16));
  166. System.out.println(keyGen.getAlgorithm() + " KeyPairGenerator privatekey : " + a.toString(16));
  167. return key;
  168. }
  169. public static boolean TestSM2KeyFactory(byte[] publicKeyByteArray, byte[] privateKeyByteArray)
  170. {
  171. X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(publicKeyByteArray);
  172. PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(privateKeyByteArray);
  173. try
  174. {
  175. KeyFactory factory = KeyFactory.getInstance(SIGNATURE_KEY_ALGORITHM);
  176. PublicKey publicKey = factory.generatePublic(x509EncodedKeySpec);
  177. PrivateKey privateKey = factory.generatePrivate(pkcs8EncodedKeySpec);
  178. BigInteger b = new BigInteger(1, publicKey.getEncoded());
  179. BigInteger a = new BigInteger(1, privateKey.getEncoded());
  180. System.out.println(factory.getAlgorithm() + " KeyFactory public key : " + b.toString(16));
  181. System.out.println(factory.getAlgorithm() + " KeyFactory private key : " + a.toString(16));
  182. return true;
  183. }
  184. catch (NoSuchAlgorithmException | InvalidKeySpecException e)
  185. {
  186. // TODO Auto-generated catch block
  187. e.printStackTrace();
  188. return false;
  189. }
  190. }
  191. public static boolean TestReadDCKS(InputStream fis, String password)
  192. {
  193. KeyStore ks = null;
  194. if (fis != null)
  195. {
  196. try
  197. {
  198. ks = KeyStore.getInstance("DCKS");
  199. ks.load(fis, password.toCharArray());
  200. Enumeration e = ks.aliases();
  201. while (e.hasMoreElements())
  202. {
  203. String alias = (String) e.nextElement();
  204. System.out.println("alias : " + alias);
  205. if (ks.isKeyEntry(alias))
  206. {
  207. // key
  208. Key key = ks.getKey(alias, password.toCharArray());
  209. System.out.println("Key Type : " + key.getFormat());
  210. System.out.println("Key Algorithm : " + key.getAlgorithm());
  211. if (key instanceof PrivateKey)
  212. {
  213. System.out.println("PrivateKey Value : " + new BigInteger(1, key.getEncoded()));
  214. Certificate cert = ks.getCertificate(alias);
  215. System.out.println("Certificate Value : " + cert);
  216. }
  217. else if (key instanceof SecretKey)
  218. {
  219. System.out.println("Key Value : " + new BigInteger(1, key.getEncoded()));
  220. }
  221. else
  222. {
  223. System.out.println("unknown key type...");
  224. }
  225. }
  226. else if (ks.isCertificateEntry(alias))
  227. {
  228. // cert
  229. System.out.println("CertificateEntry : " + ks.getCertificate(alias));
  230. }
  231. else
  232. {
  233. // trusted cert
  234. System.out.println("TrustedEntry : " + ks.getCertificate(alias));
  235. }
  236. }
  237. return true;
  238. }
  239. catch (Exception ex)
  240. {
  241. ex.printStackTrace();
  242. return false;
  243. }
  244. }
  245. return false;
  246. }
  247. public static boolean TestCreateDCKS(String fileName, String password, KeyPair sm2Key, SecretKey sm4key)
  248. {
  249. KeyStore ks = null;
  250. File keyStoreFile = new File(fileName);
  251. try
  252. {
  253. ks = KeyStore.getInstance("DCKS");
  254. ks.load(null, password.toCharArray());
  255. FileOutputStream fos = new FileOutputStream(keyStoreFile);
  256. KeyStore.PasswordProtection p = new KeyStore.PasswordProtection(password.toCharArray());
  257. if (sm2Key != null)
  258. {
  259. CertificateFactory cf = CertificateFactory.getInstance("X.509", DoubleCA.PROVIDER_NAME);
  260. X509Certificate cert = (X509Certificate) cf.generateCertificate(new FileInputStream("resources/sm2cert.cer"));
  261. X509Certificate[] serverChain = new X509Certificate[] {cert};
  262. ks.setEntry("DoubleCA-SM2", new KeyStore.PrivateKeyEntry(sm2Key.getPrivate(), serverChain), p);
  263. }
  264. if (sm4key != null)
  265. {
  266. KeyStore.Entry entry = new KeyStore.SecretKeyEntry(sm4key);
  267. ks.setEntry("DoubleCA-SM4", entry, p);
  268. }
  269. ks.store(fos, password.toCharArray());
  270. fos.close();
  271. return true;
  272. }
  273. catch (Exception ex)
  274. {
  275. ex.printStackTrace();
  276. return false;
  277. }
  278. }
  279. }

Android平台运行结果

Android控制台输出结果

  1. I/System.out: ------ http://www.DoubleCA.com ---- 大宝CA ------
  2. ------- Watchdata & DoubleCA -------
  3. I/System.out: TestSM2KeyPairGenerator
  4. I/System.out: SM2 KeyPairGenerator publickey : 3059301306072a8648ce3d020106082a811ccf5501822d034200040286345d8b9df6a2c775ecba32bef0847c3ef5e64881a64481c9567227b57f3cdd2f9685d8f55f478124db5cda0d8bb010e8e0002e2021e1e884cfdd74fd0c20
  5. SM2 KeyPairGenerator privatekey : 30818b020100301306072a8648ce3d020106082a811ccf5501822d0471306f02010104207dd3196abef53a19ab869687bddf6bdba86b25eff75ba60af632c6041fe15ba3a0020500a144034200040286345d8b9df6a2c775ecba32bef0847c3ef5e64881a64481c9567227b57f3cdd2f9685d8f55f478124db5cda0d8bb010e8e0002e2021e1e884cfdd74fd0c20
  6. TestSM2KeyFactory
  7. I/System.out: SM2 KeyFactory public key : 3059301306072a8648ce3d020106082a811ccf5501822d034200040286345d8b9df6a2c775ecba32bef0847c3ef5e64881a64481c9567227b57f3cdd2f9685d8f55f478124db5cda0d8bb010e8e0002e2021e1e884cfdd74fd0c20
  8. I/System.out: SM2 KeyFactory private key : 308193020100301306072a8648ce3d020106082a811ccf5501822d0479307702010104207dd3196abef53a19ab869687bddf6bdba86b25eff75ba60af632c6041fe15ba3a00a06082a811ccf5501822da144034200040286345d8b9df6a2c775ecba32bef0847c3ef5e64881a64481c9567227b57f3cdd2f9685d8f55f478124db5cda0d8bb010e8e0002e2021e1e884cfdd74fd0c20
  9. TestSM3Digest
  10. I/System.out: SM3 MessageDigest : 6B2CB90C78B51E714E1BEB8290A58C75CDAF3DFDB5DBBCCF9CE247DEFB4A1308
  11. TestSM4Cipher
  12. I/System.out: SM4 Key :31323334353637383132333435363738
  13. I/System.out: SM4KeySpec :EBDD39999C2358607CB7EF92F7C3A916
  14. I/System.out: 原文1:软件(库)授权与防复制、防盗版,全平台支持:
  15. I/System.out: 原文2:https://www.PPLIC.com
  16. 密文:1lc6FUKGS+1ftIGiFDDfFdkZOEi2i1XUFsvZZnRvp8LzW6caJfJ5GBgn2d2sBVHdQaMI+IJBiX1i8EwltTbyYSkX4p6Qg1sKtoeYCEXpFk8pJK3HwwgjONpOet7Au4SG
  17. 原文:软件(库)授权与防复制、防盗版,全平台支持:https://www.PPLIC.com
  18. I/System.out: TestSM2AsymmetricCipher
  19. 原文:软件(库)授权与防复制:https://www.PPLIC.com
  20. I/System.out: 密文:MIGjAiEA1Gh/7xfFIPFRPh3MP5MZ2JQNUvNV77SyqfbbX/t09cECICbF0A20CfVcY4ikuKZUUOIRwEoTj1Jgs9JCM0UGF7xLBCCxnItl0TAl9MfjmvvDT+UWCGuj+Zw6hJFxBmbJM4BJVAQ6oasCBpiSqvRe7uPwLBEuQ+fC9E1aNp3tzkrmDTADMMzHXP/rF3riEKd5qA5Ims7xbysXU6ZhXEwHyA==
  21. I/System.out: 原文:软件(库)授权与防复制:https://www.PPLIC.com
  22. I/System.out: TestSM2Signature
  23. 原文:大宝CA 国密SSL(v1.1)Tomcat:https://www.DoubleCA.com
  24. I/System.out: 签名值:MEQCICGazQkd/G6YQU0Y3kSXeqGYeyMIKnCjGMniZSvPlX47AiAjvlGAtrTvICI6BRe0NJHIRkyPjUAqbY1aIYgkUwjg8A==
  25. I/System.out: 签名验证结果 :true
  26. TestReadDCKS
  27. I/System.out: alias : cn=客户端国密ssl测试证书,e=service@doubleca.com,ou=测试,c=cn
  28. I/System.out: Key Type : PKCS#8
  29. Key Algorithm : SM2
  30. PrivateKey Value : 3362573024668345226776108319589020300863179425454674990711302050875880756269172595625955136383413772263809955023913419607219872954724110972477389615746516786534283224853253730182499166945837
  31. I/System.out: Certificate Value : [0] Version: 3
  32. SerialNumber: 54562568ffab8b47d4b8d0b5449d7bad
  33. IssuerDN: C=CN,ST=BEIJING,O=www.DoubleCA.com,CN=DoubleCA.com TEST01 CA SM2
  34. Start Date: Sun Feb 17 14:56:11 GMT+00:00 2019
  35. Final Date: Mon Feb 17 14:56:11 GMT+00:00 2020
  36. SubjectDN: C=CN,OU=测试,E=service@doubleca.com,CN=客户端国密SSL测试证书
  37. Public Key: DoubleCA SM2 public key, 256 bits
  38. public x coord: 65215284186172334808088917997998955419701388929546536492749289805550975234211
  39. public y coord: 69132452507784084332570142049583404962143056570916935248218677493657120037057
  40. parameters: com.doubleca.security.spec.SM2ParameterSpec@c8e4f88
  41. Signature Algorithm: SM3WithSM2Encryption
  42. Signature: 3045022100f8e5c5c0d511e11c0a78d33195796c
  43. 821bed0a76a87d1c76e7cf008e374fed3a02200b
  44. 4242535a2a89cbebc2c0e72a3deb3680cb4014eb
  45. c44921f7d4b502035eb5cb
  46. Extensions:
  47. critical(false) 2.5.29.37 value = DER Sequence
  48. ObjectIdentifier(1.3.6.1.5.5.7.3.1)
  49. ObjectIdentifier(1.3.6.1.5.5.7.3.2)
  50. critical(false) NetscapeCertType: 0xc0
  51. critical(false) 2.5.29.17 value = DER Sequence
  52. Tagged [2] IMPLICIT
  53. DER Octet String[16]
  54. Tagged [7] IMPLICIT
  55. DER Octet String[4]
  56. critical(false) 2.5.29.14 value = DER Octet String[20]
  57. critical(false) KeyUsage: 0xf8
  58. critical(false) 2.5.29.31 value = DER Sequence
  59. I/System.out: DER Sequence
  60. Tagged [0]
  61. Tagged [0]
  62. Tagged [6] IMPLICIT
  63. DER Octet String[58]
  64. alias : cn=doubleca.com root ca sm2,o=www.doubleca.com,st=beijing,c=cn
  65. I/System.out: CertificateEntry : [0] Version: 3
  66. SerialNumber: 283909e859da6101c286b6d79fc61375
  67. IssuerDN: C=CN,ST=BEIJING,O=www.DoubleCA.com,CN=DoubleCA.com ROOT CA SM2
  68. Start Date: Tue Feb 20 15:29:34 GMT+00:00 2018
  69. Final Date: Thu Feb 20 15:29:34 GMT+00:00 2048
  70. SubjectDN: C=CN,ST=BEIJING,O=www.DoubleCA.com,CN=DoubleCA.com ROOT CA SM2
  71. Public Key: DoubleCA SM2 public key, 256 bits
  72. public x coord: 63567973297631315756188461682412948032663271290975609239585908391063398144336
  73. public y coord: 94293482803615337477639920676818685203833495478712519677665296690516936973566
  74. parameters: com.doubleca.security.spec.SM2ParameterSpec@c8e4f88
  75. Signature Algorithm: SM3WithSM2Encryption
  76. Signature: 3046022100ccdc6e27d819f86166bee2d011b422
  77. da247b7325a9ebdd0372ed6cdbf0333102022100
  78. a5ff2eb05a0154f1475d4facc9056f857e541065
  79. 0586acc21d2decbf2cbab88b
  80. Extensions:
  81. critical(false) 2.5.29.35 value = DER Sequence
  82. Tagged [0] IMPLICIT
  83. DER Octet String[20]
  84. critical(false) 2.5.29.14 value = DER Octet String[20]
  85. critical(false) KeyUsage: 0x6
  86. I/System.out: critical(true) BasicConstraints: isCa(true)
  87. alias : cn=doubleca.com test01 ca sm2,o=www.doubleca.com,st=beijing,c=cn
  88. CertificateEntry : [0] Version: 3
  89. SerialNumber: 366fab022c0d7e8ae6801e445c865086
  90. I/System.out: IssuerDN: C=CN,ST=BEIJING,O=www.DoubleCA.com,CN=DoubleCA.com ROOT CA SM2
  91. Start Date: Tue Feb 20 15:49:22 GMT+00:00 2018
  92. Final Date: Sat Feb 20 15:49:22 GMT+00:00 2038
  93. SubjectDN: C=CN,ST=BEIJING,O=www.DoubleCA.com,CN=DoubleCA.com TEST01 CA SM2
  94. Public Key: DoubleCA SM2 public key, 256 bits
  95. public x coord: 60595735744867038260274389887165641798371778284629229257466280556093420133086
  96. public y coord: 59336568717492114170665705208274640089654406332240289026426787465310346749757
  97. parameters: com.doubleca.security.spec.SM2ParameterSpec@c8e4f88
  98. Signature Algorithm: SM3WithSM2Encryption
  99. Signature: 3045022100fbea4e34a1eb2175f559eee65401a8
  100. 66c3e44bb45b54533220bef12a1cb7d0af022049
  101. 3ba8f11225343982e484951d98c33f1ea89d952c
  102. 2a1ac9c5ab4cd0e2b8deb2
  103. Extensions:
  104. critical(false) 2.5.29.31 value = DER Sequence
  105. DER Sequence
  106. Tagged [0]
  107. Tagged [0]
  108. Tagged [6] IMPLICIT
  109. DER Octet String[56]
  110. critical(false) KeyUsage: 0xfe
  111. critical(false) 2.5.29.14 value = DER Octet String[20]
  112. critical(false) BasicConstraints: isCa(true), pathLenConstraint = 3
  113. finish.

示例代码下载地址:https://download.csdn.net/download/upset_ming/11761957

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/煮酒与君饮/article/detail/787087
推荐阅读
相关标签
  

闽ICP备14008679号