diff options
| author | Chung-yih Wang <cywang@google.com> | 2009-07-02 23:42:12 +0800 |
|---|---|---|
| committer | Chung-yih Wang <cywang@google.com> | 2009-07-04 00:22:51 +0800 |
| commit | bf20b9963add781a35de658f3228760015a163c9 (patch) | |
| tree | ab310659e9be96273833221ba4dbf9863eba1407 /keystore/java | |
| parent | 24ad29c6dbbf62096bcb41ddb2fa3975720ee625 (diff) | |
| download | frameworks_base-bf20b9963add781a35de658f3228760015a163c9.zip frameworks_base-bf20b9963add781a35de658f3228760015a163c9.tar.gz frameworks_base-bf20b9963add781a35de658f3228760015a163c9.tar.bz2 | |
Migrate to the CertTool library.
Keystore is reimplemented and it is mainly for storing
(key, value) pair generically. The certificate related
APIs are moved to the class CertTool instead.
Updates:
Provide the getInstance() which gives the singleton.
Fix the missing construction of the BIO in cert.c.
Diffstat (limited to 'keystore/java')
| -rw-r--r-- | keystore/java/android/security/CertTool.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/keystore/java/android/security/CertTool.java b/keystore/java/android/security/CertTool.java index 1dc575b..5319330 100644 --- a/keystore/java/android/security/CertTool.java +++ b/keystore/java/android/security/CertTool.java @@ -63,6 +63,15 @@ public class CertTool { private native String getPrivateKeyPEM(int handle); private native void freeX509Certificate(int handle); + private static CertTool singleton = null; + + public static final CertTool getInstance() { + if (singleton == null) { + singleton = new CertTool(); + } + return singleton; + } + public String getUserPrivateKey(String key) { return USER_KEY + KEYNAME_DELIMITER + key; } |
