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

How to ignore certificate verification? #947

Closed
little-dude opened this issue Nov 3, 2016 · 2 comments
Closed

How to ignore certificate verification? #947

little-dude opened this issue Nov 3, 2016 · 2 comments

Comments

@little-dude
Copy link

Hi,

I cannot figure out from the documentation how to tell my hyper::client::Client to ignore invalid certificates from the server. I see that there is an hyper::net::OpensslClient struct that holds an openssl::ssl::SslContext but I don't really see how it all comes together.

@little-dude
Copy link
Author

It seems that I can create a client with something like

Client::with_connector(
    HttpsConnector::new(
        OpensslClient::new( // here I need a custom SslContext, that ignore insecure connections but not sure how to do
                          )
        )
    )

But I don't know what the ssl context should be.

@seanmonstar
Copy link
Member

Here's the docs for the SslContext: https://docs.rs/openssl/0.7.14/openssl/ssl/struct.SslContext.html

You can set ssl_context.set_verify_mode(SSL_VERIFY_NONE, None) to disable verification.

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

2 participants