Guest User

Untitled

a guest
Dec 12th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. java.sql.SQLRecoverableException: IO Error: Inbound closed before receiving peer's close_notify: possible truncation attack?, connect lapse 15 ms., Authentication lapse 0 ms.
  2.  
  3. public static void main(String[] args) {
  4. new oracle.security.pki.OraclePKIProvider();
  5. Security.addProvider(new oracle.security.pki.OraclePKIProvider());
  6. String url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost)(PORT=2484))(CONNECT_DATA=(SERVICE_NAME=ORCL)))";
  7. Properties props = new Properties();
  8. props.setProperty("javax.net.ssl.trustStore",
  9. "C:\app\Administrator\virtual\product\12.2.0\dbhome_1\bin\wallets\Administrator\cwallet.sso");
  10. props.setProperty("javax.net.ssl.trustStoreType","SSO");
  11. props.setProperty("javax.net.ssl.keyStore",
  12. "C:\app\Administrator\virtual\product\12.2.0\dbhome_1\bin\wallets\Administrator\cwallet.sso");
  13. props.setProperty("javax.net.ssl.keyStoreType","SSO");
  14. try {
  15. Connection conn = DriverManager.getConnection(url, props);
  16. } catch (SQLException e) {
  17. // TODO Auto-generated catch block
  18. e.printStackTrace();
  19. }
  20. }
  21.  
  22. WALLET_LOCATION=(SOURCE=(METHOD=FILE) (METHOD_DATA=(DIRECTORY=C:appAdministratorvirtualproduct12.2.0dbhome_1binwalletsAdministratorewallet.p12 ))
  23. SSL_CLIENT_AUTHENTICATION=TRUE
  24.  
  25. security.provider.11=oracle.security.pki.OraclePKIProvider
Add Comment
Please, Sign In to add comment