There are several types besides those listed in the list of standard names that you are attached to. Further information can be found in the documentation for cryptographic providers . The most common are, of course, JKS (by default) and PKCS12 (for PKCS # 12 files, often with the extension .p12 or sometimes .pfx ).
JKS is the most common if you stay in the Java world. PKCS # 12 is not specific to Java, it is especially convenient to use certificates (with private keys) made from a browser or coming from OpenSSL-based tools ( keytool could not convert the key store and import its private keys before Java 6, so you had to use other tools )
If you already have a PKCS # 12 file, it is often easier to use the PKCS12 type. Format conversion is possible, but this is rarely necessary if you can directly select the type of keystore.
In Java 7, PKCS12 was mostly useful as a key store, but less for trust (see the difference between a keystore and a trust store ) because you couldnβt store certificate entries without a private key. In contrast, JKS does not require that each entry be a private key, so you can have entries containing only certificates that are useful for trust stores, where you store a list of trusted certificates (but you donβt know, t have a private key for them).
This has changed in Java 8, so now you can only store certificates for certificates in PKCS12 . (More information on these changes and future plans can be found in JEP 229: Create PKCS12 Keystores by default .)
There are several other types of keystores, perhaps less commonly used (depending on context), including:
PKCS11 , for PKCS # 11 libraries, usually for access to hardware cryptographic tokens, but the Sun vendor implementation also supports NSS repositories (from Mozilla) through this.BKS using the BouncyCastle provider (commonly used for Android).Windows-MY / Windows-ROOT if you want to access the Windows certificate store directly.KeychainStore if you want to use the OSX keychain directly.
Bruno Jul 18 '12 at 11:15 2012-07-18 11:15
source share