add Connection.set_verify
, fix #255 by mhils · Pull Request #1073 · pyca/pyopenssl (original) (raw)
This PR adds Connection.set_verify
and Connection.get_verify_mode
to fix #255. Compared to #844 (a previous attempt which went stale) things got a bit simpler as Connection
now already has its own _verify_helper
and _verify_callback
attributes.
I'm happy to add more tests if you feel that would be useful, I did not copy and adapt all the Context.set_verify
tests as that felt more like a maintenance burden than anything else. Line coverage is at 100% anyhow.
CI will fail as we depend on the yet-unreleased cryptography bindings. :)