-
Notifications
You must be signed in to change notification settings - Fork 251
Specify certfile to verify SSL certs against in tests #166
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
Conversation
cc @jch as I'm unsure if we want to go this route or make the cert verifiable instead
Updated title to match the changed approach. |
else | ||
File.expand_path("fixtures/cacert.pem", File.dirname(__FILE__)) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could generate a CA file if none is found instead of sticking one in test fixtures. Unsure if that'd be any better, though.
@@ -0,0 +1,20 @@ | |||
-----BEGIN CERTIFICATE----- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might consider generating certificates (with e.g. certificate_authority or OpenSSL itself) rather than checking one into the repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, considered this, though that creates more friction for running tests locally, or at least running the integration tests locally.
In any case, I don't think we should block this fix on figuring out generated CA certs. That can come in a followup PR. Thoughts?
Specify certfile to verify SSL certs against in tests
there is a failing test:
I think that the reason is that install-openldap creates self-signed CA certificate on VM setup, so
I guess there is a more elegant way to handle this ... but this works as a quick fix |
@zmajstor see my original notes on the PR: certificates should be generated for tests, not checked in. I'm a big fan of the |
…none Specify certfile to verify SSL certs against in tests
#162 added a TLS Start test but didn't assert verified certs because the
tls_options
hadn't been wired up yet. #161 changed this, but hadn't been tested against the additional test in #162 before getting merged, resulting inmaster
failing.It's easy enough to disable certificate verification, but it's not necessary. Instead, we can also set the
:ca_file
TLS options to verify against.cc @jch @schaary @sonOfRa @tarcieri