Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Is there a way to disable server certificate validation? #340

Closed
xianglisegue opened this issue Jul 7, 2017 · 2 comments
Closed

Is there a way to disable server certificate validation? #340

xianglisegue opened this issue Jul 7, 2017 · 2 comments

Comments

@xianglisegue
Copy link

Hi,
I am trying to use HTTP20Adapter with Requests. With Requests, I can simply use verify=False to disable validating server certificate, but it seems I can't figure out how to achieve this with HTTP20Adapter.

Looking at the source, HTTP20Adapter initializes a ssl_context, depends on the value of "cert" passed in.

SSLContext

Create a new SSLContext that is correctly set up for an HTTP/2 connection. This SSL context object can be customized and passed as a parameter to the HTTPConnection class. Provide your own certificate file in case you don’t want to use hyper’s default certificate. The path to the certificate can be absolute or relative to your working directory.

cert_path – (optional) The path to the certificate file of “certification authority” (CA) certificates

It seems to me I can either use hyper's CA or my own, but can't disable it?

Thank you very much for the help
-Xiang

@Lukasa
Copy link
Member

Lukasa commented Jul 7, 2017

The current master branch has this support: try running pip install -U git+https://github.com/Lukasa/hyper.git and see if that resolves your issue.

@xianglisegue
Copy link
Author

xianglisegue commented Jul 8, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants