0 Replies Latest reply on Jan 23, 2015 9:56 AM by 676766

    JDBC and encrypted connection


      Hi everybody,
      I'll try to explain you my problem.

      I have 2 java soft. The first, ask to the user for the login and username of the db. These informations are stocked into an XML file on the server.
      Then, a second java soft search the information on the XML file for the loging, and logon the db.

      But if I look into my XML file, I can see my password uncrypted. So, I want to crypt it.

      To do that, I have a method in my java soft, which going to crypt the password using MD5. Now, in my XML file, the password is in MD5 format.
      But now, with the second part of my java soft, when I pick out the encrypted password for the connection, I have an error.
      This is an example of my second java soft:

      Properties prop = new Properties();
      try {
      prop.setProperty("user", "*");
      prop.setProperty("password",cryptPassword("*")); //Return the MD5 password
      prop.setProperty("oracle.net.encryption_client", "REQUIRED"); //I tried with "ACCEPTED" too)
      prop.setProperty("oracle.net.encryption_types_client", "(DES40)");
      prop.setProperty("oracle.net.crypto_checksum_client", "REQUIRED");
      prop.setProperty("oracle.net.crypto_checksum_types_client", "(MD5)");
      } catch (Exception e) { e.printStackTrace(); }

      try {
      Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@*.*.*.*:1521:orcl", prop);

      And I changed my sqlnet.ora with the following:

      When I try to run my soft, I have this error:
      java.sql.SQLException: Exception d'E/S: Unknown Encryption or Data Integrity algorithm

      Do you know where the error could be ?
      Thanks a lot