Oracle JDBC (MOSC)

MOSC Banner

Looking for guidance on how to turn off Validation Of Server Certificates in Oracle JDBC drivers.

edited May 30, 2023 11:32AM in Oracle JDBC (MOSC) 1 commentAnswered

Using OJDBC8 jars to make a Oracle SQL TLS connection using the Thin drivers, we attempt to configure a KeyStore TrustStore with and without both DN matching and Validtion of the Server Certificate.Setting the KeyStore and TrustStore as follows:

            prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORE, plist.get("OracleStore").display());

            prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTORETYPE, "PKCS12");

            prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_KEYSTOREPASSWORD, plist.get("OracleStorePassword").display());

            prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORE, plist.get("OracleStore").display());

            prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_JAVAX_NET_SSL_TRUSTSTORETYPE, "PKCS12");

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center