ThingWorx Connection Server > Converting JKS Keystores to PKCS Keystores
Converting JKS Keystores to PKCS Keystores
Starting with the Connection Server v.9.0.0, the default keystore format has changed from JKS to .PKCS#12. If you previously used JKS for the keystore for a Connection Server, you need to convert the keystore to PKCS#12.. This topic explains how to use a Java command to convert the format..
To convert a JKS (.jks) keystore to a PCKS#12 (.pfx) keystore, run the following command:

keytool -importkeystore -srckeystore [MY_KEYSTORE.jks] -destkeystore [MY_FILE.pfx]
-srcstoretype JKS -deststoretype PKCS12 -deststorepass [PASSWORD_PKCS12]
MY_KEYSTORE.jks is the path to the keystore that you want to convert.
MY_FILE.pfx is the path to the PKCS#12 file that is created by this command. Note that you can use either the .p12 or .pfx extension.
PASSWORD_PKCS12 is the password that is requested when the file is opened.
For publishing purposes, a line break has been inserted at the end of the first line above. If you want to copy this command and use it in a command prompt or shell, make sure that you paste it into a plain text editor and remove the line break. Then copy and paste the full command in your command prompt or shell.
This command is supported on JDK / JRE keytool version 1.6 and later.
To verify the content of a .pfx file, run the following command, substituting your path and file name for [MY_FILE.pfx]:

keytool -list -v -keystore [MY_FILE.pfx] -storetype pkcs12
You are prompted for your keystore password when running this command. For example:

$ keytool -list -v -keystore keystore.pfx -storetype pkcs12
Enter keystore password:
<key store contents>
Was this helpful?