Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Hyper TLS Verification Skipping "Examples" Do Not Work #2815

Closed
bonedaddy opened this issue Apr 17, 2022 · 0 comments
Closed

Hyper TLS Verification Skipping "Examples" Do Not Work #2815

bonedaddy opened this issue Apr 17, 2022 · 0 comments

Comments

@bonedaddy
Copy link

bonedaddy commented Apr 17, 2022

Overview

I've been unable to get to hyper to connect to endpoints with self signed certificates. I attempted to use the information from #947 however this no longer seems to work.

I was able to modify the example to the following, however this doesnt seem to work

        use openssl::ssl::{SslConnector, SslMethod};
        use hyper_tls::HttpsConnector;

        let mut connector = SslConnector::builder(SslMethod::tls_client()).unwrap();
        connector.set_verify(SslVerifyMode::NONE);
        let https = HttpsConnector::new_with_connector(connector);


        let client = hyper::Client::builder().build(&https);

error message

error[E0277]: the trait bound `&HttpsConnector<SslConnectorBuilder>: tower::Service<Uri>` is not satisfied
    --> analytics/src/api/internal/mod.rs:49:53
     |
49   |         let client = hyper::Client::builder().build(&https);
     |                                               ----- ^^^^^^ the trait `tower::Service<Uri>` is not implemented for `&HttpsConnector<SslConnectorBuilder>`
     |                                               |
     |                                               required by a bound introduced by this call
     ```
@bonedaddy bonedaddy added the C-feature Category: feature. This is adding a new feature. label Apr 17, 2022
@seanmonstar seanmonstar removed the C-feature Category: feature. This is adding a new feature. label Apr 26, 2022
@hyperium hyperium locked and limited conversation to collaborators Apr 26, 2022
@seanmonstar seanmonstar converted this issue into discussion #2821 Apr 26, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants