You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
I am unable to estabish a TLS connection, neither with .certpath nor .sslContext, starting from version 2.4.2.
Version 2.4.1 works without problems
To Reproduce
Steps to reproduce the behavior:
TODO
Create a self-signed certificate on RethinkDB server, add it to client's trust store, then
Expected behavior
A clear and concise description of what you expected to happen.
Java client shall connect. It does not. No exceptions are thrown. Same with .certFile(certStream) option.
Code works as expected up to 2.4.1
System info
RethinkDB Version: 2.4.3
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu118.04)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu118.04, mixed mode, sharing)
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
I am unable to estabish a TLS connection, neither with .certpath nor .sslContext, starting from version 2.4.2.
Version 2.4.1 works without problems
To Reproduce
Steps to reproduce the behavior:
private SSLContext initializeSSLContext(RethinkSinkConfig config) throws KeyStoreException,NoSuchAlgorithmException, CertificateException, IOException, KeyManagementException {
KeyStore keyStore = loadCertificate(config.getCertpath());
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init(keyStore);
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, tmf.getTrustManagers(), null);
return sslContext;
}
private KeyStore loadCertificate(String certPath) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(null, null); // Initialize KeyStore
}
SSLContext sslContext = initializeSSLContext(config);
Connection connection = r.connection()
.hostname(config.getHost())
.port(config.getPort())
.db(config.getDb())
.user(config.getUsername(), config.getPassword())
.sslContext(sslContext)
// .certFile(certStream)
.connect();
Expected behavior
A clear and concise description of what you expected to happen.
Java client shall connect. It does not. No exceptions are thrown. Same with .certFile(certStream) option.
Code works as expected up to 2.4.1
System info
RethinkDB Version: 2.4.3
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu118.04)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu118.04, mixed mode, sharing)
The text was updated successfully, but these errors were encountered: