Custom SSL verification callbacks should now work

Heikki Toivonen <[email protected]>
Newsgroups gmane.comp.python.cryptography
Message-ID <[email protected]>
Phew, this turned out to be more complicated than I originally thought.
Anyway, now you should be able to set a custom SSL verification callback
with

def verify_cb(ok, store):
    # Do my custom verification
    return ok

ctx = SSL.Context()
ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9,
verify_cb)

Previously that crashed on me every time. Both the new style callback
and the old style callback with 5 arguments are supported, and
everything should be backwards compatible. The 5 argument version is
deprecated.

I would be interested to hear if:

1) You experience any problems with this
2) You were actually using the custom callback successfully before

--
  Heikki Toivonen
signature.asc (application/pgp-signature, 249 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFCnjeQb8x8KoP+JuwRAi1KAKCjQPSkmz25RoGKwXHDI4X0DctwxwCfbtrj
utpa+8bi3xEEvlfbq5NFWHc=
=9aKg
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.