3.2 Create .jks file
Now that we have the .pks file, we can use the Java keytool to create a .jks file. You will
need to have the Java JDK installed for this step. If the installation doesn't add the Java
SDK bin folder to your PATH environment variable, add it manually so the keytool can
be run from the folder with your keys and certificates.
Run the keytool using the following command to create a .jks file:
keytool -importkeystore -srckeystore my_pfx_out.pfx
-srcstoretype pkcs12 -srcalias "my_keystore" -destkeystore
my_jks_store.jks -deststoretype jks -deststorepass 123456
-destalias "my_jks"
The command will prompt you for the password for the .pfx file that was generated in
the previous step. In this example, "123456" is used as the password for both the .pfx
and .jks files.
3.3 Convert .pem files to .der
The last files we need to create are DER versions of our certificate and private key.
OpenSSL allows us to convert keys and certificates from PEM to DER format with the
following commands ( bolded names should be changed to your file names):
Convert the certificate:
openssl x509 -outform der -in
2a6d9b3215-certificate.pem.crt
-out
2a6d9b3215-certificate.der
Convert the private key:
openssl rsa -in
2a6d9b3215-private.pem.key
-inform PEM -out
2a6d9b3215-private.der -outform DER
Convert the root CA certificate:
openssl x509 -outform der -in
"VeriSign-Class%203-Public-Primary-Certification-Authority-G
5.pem" -out
"VeriSign-Class%203-Public-Primary-Certification-Authority-G
5.der"
PN 30168 rev 9
© NimbeLink Corp. 2018. All rights reserved.
11