Skip to content

DEVEXP-508 Certificate auth no longer requires a file path #1571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Jul 18, 2023

DatabaseClientBuilder now supports the constructor that accepts an SSLContext and X509TrustManager without requiring a certificate file and password.

`DatabaseClientBuilder` now supports the constructor that accepts an `SSLContext` and `X509TrustManager` without requiring a certificate file and password.
@rjrudin rjrudin requested review from BillFarber and anu3990 July 18, 2023 17:56
@@ -158,6 +158,12 @@ public DatabaseClientBuilder withCertificateAuth(String file, String password) {
.withCertificatePassword(password);
}

public DatabaseClientBuilder withCertificateAuth(SSLContext sslContext, X509TrustManager trustManager) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not needed for the fix, it's just some syntactic sugar for the use case of doing certificate auth with a user-provided SSLContext instead of a certificate file path.

}
return new DatabaseClientFactory.CertificateAuthContext(sslInputs.getSslContext(), sslInputs.getTrustManager());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual fix - if the user doesn't provide a certificate file, then use the SSLContext and X509TrustManager that they provided.

@rjrudin rjrudin merged commit 5975ce8 into develop Jul 18, 2023
@rjrudin rjrudin deleted the feature/508-certificate-bug branch July 18, 2023 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants