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

No way to set verify_mode durably #3

Open
rab opened this issue Dec 1, 2009 · 1 comment
Open

No way to set verify_mode durably #3

rab opened this issue Dec 1, 2009 · 1 comment

Comments

@rab
Copy link

rab commented Dec 1, 2009

You want to remove the warning, so you set the CA file:

Rightscale::HttpConnection.params[:ca_file] = CA_FILE

Argh! OK, this just makes is worse. Rather than banishing the typical error "warning: peer certificate won't be verified in this SSL session", this causes "hostname was not match with the server certificate" when an S3 bucket name is DNS-compatible because there is a lookup to 'bucket.s3.amazonaws.com' so THAT is what the certificate has to match. Unfortunately, there doesn't seem to be any way to set the HTTP connection's verify_mode to be OpenSSL::SSL::VERIFY_NONE. In particular, the connection will be closed and re-established for low-level errors so the setting would have to be specified in a way that it could be reapplied to every new connection. A simple solution would be to set @http.verify_mode=OpenSSL::SSL::VERIFY_NONE when there is no ca_file given.

@rab
Copy link
Author

rab commented Dec 1, 2009

My fork (rab/right_http_connection@fb47d2b) is effectively the same as the "minor fix for Ruby 1.9" mattmatt/right_http_connection@3b68e318b078dbbb38e498c35c70d46388c8e116

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

No branches or pull requests

1 participant