EXP Computer ThinConnect4 Guia do Utilizador Página 57

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 163
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 162 163

Comentários a estes Manuais

Sem comentários