My Oracle Support Banner

How To Specify The Truststore And Keystore For A JDBC SSL Connection Using The Same File? (Doc ID 2810988.1)

Last updated on OCTOBER 17, 2022

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


An Oracle wallet is exported to a keystore and truststore with:

orapki wallet pkcs12_to_jks -wallet wallet -pwd xxx -jksTrustStoreLoc /tmp/truststore.jks -jksTrustStorepwd -jksKeyStoreLoc /tmp/keystore.jks -jksKeyStorepwd

and then the java program is run with the following options:

java -cp .:ojdbc8.jar \"false" \'1.2' \"/tmp/javatest/truststore.jks" \"<PASSWORD>" \"JKS" \"/tmp/javatest/keystore.jks" \"<PASSWORD>" \"JKS" <CLASS NAME>

How can the program be executed if not using a keystore file but only a truststore file?


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.