Skip to content
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

Always skip ssl validation when using a self-signed certificate #217

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

madchicken
Copy link
Contributor

@madchicken madchicken commented Jan 21, 2025

This PR fixes an erroneous behavior of the driver when using a self-signed certificate. The documentation says:

The +s variants enable encryption with a full certificate check, and the +ssc variants enable encryption, 
but with no certificate check. This latter variant is designed specifically for use with self-signed certificates.

Copy link
Collaborator

@knutwalker knutwalker left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

pub fn with_client_certificate(mut self, client_cert: impl AsRef<Path>) -> Self {
self.tls_config =
ConnectionTLSConfig::ClientCACertificate(ClientCertificate::new(client_cert));
self
}

/// Skip SSL validation. This is not recommended for production use.
/// This is true by default when connecting to the server using `neo4j+ssc` or 'bolt+ssc' schemes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good additions, thanks!

@knutwalker knutwalker merged commit 392e977 into neo4j-labs:main Jan 27, 2025
11 checks passed
@madchicken madchicken deleted the fix-ssc branch January 27, 2025 10:37
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.

2 participants