summaryrefslogtreecommitdiffstats
path: root/keystore/java
diff options
context:
space:
mode:
authorChung-yih Wang <cywang@google.com>2009-09-01 16:45:13 +0800
committerChung-yih Wang <cywang@google.com>2009-09-01 16:45:13 +0800
commit09960230bf3d46ec1e7cbcfd8b07dfe007b9fa96 (patch)
tree0cdb96cc728125bcae41709a027811cbd6beee2b /keystore/java
parentc98d68cd56338ec57695b3c35114fbde88d4bde8 (diff)
downloadframeworks_base-09960230bf3d46ec1e7cbcfd8b07dfe007b9fa96.zip
frameworks_base-09960230bf3d46ec1e7cbcfd8b07dfe007b9fa96.tar.gz
frameworks_base-09960230bf3d46ec1e7cbcfd8b07dfe007b9fa96.tar.bz2
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.
Diffstat (limited to 'keystore/java')
-rw-r--r--keystore/java/android/security/CertTool.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/keystore/java/android/security/CertTool.java b/keystore/java/android/security/CertTool.java
index d1174ad..6caeb3e 100644
--- a/keystore/java/android/security/CertTool.java
+++ b/keystore/java/android/security/CertTool.java
@@ -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;