can't import .p12 file into MS Certificate Store
问题 I have the following test code to create test PKCS#12 keystore: X509Certificate[] chain = new X509Certificate[1]; long currentTime = new Date().getTime(); Date firstDate = new Date(currentTime - 24 * 60 * 60 * 1000); long validity = (long) 30 * 24 * 60 * 60 * 365; Date lastDate = new Date(currentTime + validity * 1000); String myName = "CN=TestKeys, L=Test, C=US"; X509V3CertificateGenerator cg = new X509V3CertificateGenerator(); cg.setSerialNumber(BigInteger.valueOf(firstDate.getTime())); cg