EXP Computer ThinConnect4 Guide de l'utilisateur Page 57

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 163
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 56
Example
Properties info = new Properties();
info.put("user", user);
info.put("password", password);
info.put("tracelevel", traceLevel);
info.put("ssl", "true");
info.put("ssl.default", "false");
info.put("ssl.context", "TLS");
info.put("ssl.keyManagerFactory", "SunX509");
info.put("ssl.keyStoreType", "jks");
info.put("ssl.keyStore", "rdbjdbccli.kst");
info.put("ssl.keyStorePassword
"
, "CHANGETHIS");
info.put("ssl.trustStore
"
, "rdbjdbccli.kst");
info.put("ssl.trustStorePassword
"
, "CHANGETHIS");
Connection conn = DriverManager.getConnection(
"jdbc:rdbThin://bravo:1755/my_db_dir:pers", info);
The properties block must have the property ssl set to true for SSL connections to be
attempted.
In addition, the SSL characteristics can be specified explicitly as properties, or you may use
ssl.default set to true to request that the default SSL characteristics for your system should
be used.
Properties info = new Properties();
info.put("user", user);
info.put("password", password);
info.put("tracelevel", traceLevel);
info.put("ssl", "true");
info.put("ssl.default", "true");
Connection conn = DriverManager.getConnection(
"jdbc:rdbThin://bravo:1755/my_db_dir:pers", info);
See SSL configuration options for details of the ssl.* options.
Note:
For an SSL connection to be made, the appropriate certificate for the server to which you
are trying to attach to should be in the keystore you have designated in the SSL properties
for the connection.
If no certificate is found the following exception will be raised:
javax.net.ssl.SSLException: No available certificate corresponds to
the SSL cipher suites, which are enabled.
See your Java Security documentation for more information on certificates.
57
Vue de la page 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 162 163

Commentaires sur ces manuels

Pas de commentaire