public class OpensslKeystoreFileCreator extends Object implements KeystoreFileCreator
openssl executable.KeystoreFileCreator.NonzeroExitFromCertProgramException| Constructor and Description |
|---|
OpensslKeystoreFileCreator() |
OpensslKeystoreFileCreator(ExecutableConfig keytoolConfig,
ExecutableConfig opensslConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
createPemFile(File pkcs12File,
String keystorePassword,
File pemFile) |
void |
createPKCS12File(KeystoreInput keystore,
File p12File)
Creates a PKCS12-format file.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateUniquePathnamepublic OpensslKeystoreFileCreator()
public OpensslKeystoreFileCreator(ExecutableConfig keytoolConfig, ExecutableConfig opensslConfig)
public void createPKCS12File(KeystoreInput keystore, File p12File) throws IOException
See https://stackoverflow.com/questions/652916/converting-a-java-keystore-into-pem-format for instructions on how to convert the .keystore file into a .pem file that can be installed into browsers like Firefox.
In short, if $KEYSTORE_FILE is the file generated by this program, execute:
$ keytool -importkeystore -srckeystore $KEYSTORE_FILE -destkeystore temp.p12 -srcstoretype jks -deststoretype pkcs12
$ openssl pkcs12 -in temp.p12 -out exported-keystore.pem
The contents of `exported-keystore.pem` will be in PEM format.
createPKCS12File in interface KeystoreFileCreatorIOExceptionpublic void createPemFile(File pkcs12File, String keystorePassword, File pemFile) throws IOException
createPemFile in interface KeystoreFileCreatorIOExceptionCopyright © 2016–2018. All rights reserved.