Store CA certificate chain into one single key entry with PEM format.
Extract all CA certificates in a PKCS12 keystore into a single entry in keystore with multiple PEMs.
This commit is contained in:
@@ -163,15 +163,9 @@ public class CertTool {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
while ((pemData = this.popPkcs12CertificateStack(handle)) != null) {
|
||||
if (i++ > 0) {
|
||||
if ((ret = sKeystore.put(CA_CERTIFICATE, keyname + i, pemData)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
if ((ret = sKeystore.put(CA_CERTIFICATE, keyname, pemData)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if ((pemData = this.popPkcs12CertificateStack(handle)) != null) {
|
||||
if ((ret = sKeystore.put(CA_CERTIFICATE, keyname, pemData)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user