Looking for an option to use TOFU (trust on first use) for TLS #2705
-
|
I use httpx to interact with lots of appliances over TLS that I either have no control over, or have no options for configuring TLS. Rather than fully disabling verification, it would be nice to emulate SSH's trust on first use model:
The solution would provide a way to update the cache in the event of a valid cert update. I've looked around but can't find anything like this. Have I missed this somewhere? If not, does httpx provide a mechanism by which I could implement this, perhaps with a custom SSL context passed to verify? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can pass a custom SSL context to the verify parameter, yes. 😊 You might also want to look at the There's also an example in the httpcore docs showing how to pull the Hopefully there's enough there to get you started, et us know how you get on! See also ticket #2599 for us documenting request and response extensions in the |
Beta Was this translation helpful? Give feedback.
You can pass a custom SSL context to the verify parameter, yes. 😊
You might also want to look at the
"trace"extension, in particular the"connection.start_tls.started"and"connection.start_tls.completed"events.There's also an example in the httpcore docs showing how to pull the
"ssl_info"from a network connection.Hopefully there's enough there to get you started, et us know how you get on!
See also ticket #2599 for us documenting request and response extensions in the
httpxdocs.