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

Doesn't allow passing a contextFactory to Agent. #28

Closed
dreid opened this issue May 1, 2013 · 7 comments
Closed

Doesn't allow passing a contextFactory to Agent. #28

dreid opened this issue May 1, 2013 · 7 comments
Labels

Comments

@dreid
Copy link
Contributor

dreid commented May 1, 2013

This means that there is no way for a user to make treq do any certificate verification.

@mriehl
Copy link

mriehl commented Jun 5, 2014

Any update on this? We just had to drop treq in favor of raw twisted agent using code because of this.

@dreid
Copy link
Contributor Author

dreid commented Jun 5, 2014

@mriehl in the latest release you can construct an HTTPClient with a base IAgent. However that isn't exposed in the module level methods (I think those are going to go away, they just encourage you to write less testable code for pretty minimal gain).

Also worth noting that with twisted 14.0 and service_identity twisted does all the certificate validation by default, limiting the times when you need to explicitly pass a context factory.

@dreid
Copy link
Contributor Author

dreid commented Jun 5, 2014

HTTPClient is not currently documented but it should be (after it's given a better name) and I don't expect to break it in a backwards incompatible way.

@mriehl
Copy link

mriehl commented Jun 6, 2014

Thanks for the info! I'll have a look at the HTTPClient (our internal certificates are not really valid of course, so browser-style validation doesn't help, sadly).

@ldanielburr
Copy link

#80 allows for the passing of an IPolicyForHTTPS implementer to the treq top-level api, which serves the need described here.

@zgoda
Copy link

zgoda commented Jul 15, 2015

If I understand correctly, this would be the only one way to implement client certificate authentication.

@twm
Copy link
Contributor

twm commented Mar 14, 2020

As this capability is present, I am closing this in favor of #269 (documenting how to use this to customize TLS).

@twm twm closed this as completed Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants