JDBC and scured connection to Oracle
843854May 16 2002 — edited Aug 13 2008Hi All,
I need help for an JDBC application.
Is anybody has already setting up an JDBC connection to an Oracle Database with encryption and crypto options enabled on Oracle ?
I have found some documentation on Oracle web site, setting up the server.
I have found too some documentation on setting up a JDBC connection with the Properties Object (see source code below):
Properties prop = new Properties();
prop.put("oracle.net.encryption_client","requested");
prop.put("oracle.net.encryption_types_client","DES40C");
prop.put("oracle.net.crypto_cheksum_client","requested");
prop.put("oracle.net.crypto_checksum_types_client","MD5");
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
con=DriverManager.getConnection"jdbc:oracle:thin:id et base:instance",prop);
I have found some documentation on setting to Oracle like modify the sqlnet.ora file (see under)
SQLNET.ENCRYPTION_SERVER = requested
SQLNET.ENCRYPTION_TYPES_SERVER = (DES40C)
SQLNET.CRYPTO_CHECKSUM_SERVER = requested
SQLNET_CRYPTO_CHECKSUM_TYPE_SERVER = (MD5)
SQLNET.ENCRYPTION_CLIENT = requested
SQLNET.ENCRYPTION_TYPES_CLIENT= (DES40C)
SQLNET.CRYPTO_CHECKSUM_CLIENT = requested
SQLNET_CRYPTO_CHECKSUM_TYPE_CLIENT = (MD5)
No error on compilation step, but on execution:
SQLState: null
Code: 17002
SQLException: Exception d'E/S: Got minus one from a read call
No documentation on this error ...
Have you some idea ??? All help is welcome ! Thanks
GiH