Re: Anyone ever successfully used ssl_verify_callback and other similar callbacks?
Heikki Toivonen <[email protected]>
| Newsgroups | gmane.comp.python.cryptography |
|---|---|
| Message-ID | <[email protected]> |
Guido van Rossum wrote:
> I'm not sure if this is the same, but we do use the SSL.Context method
> set_verify() with the argument SSL.verify_fail_if_no_per_cert. AFAIK
> we haven't had any problems with it; certainly no crashes. This is
> with Python 2.3.4 and M2Crypto 0.13.
Yes, that works. What causes Python crash for me (sorry for not being
totally clear) is this form:
def verify_cb(a, b, c, d, e):
return 1
ctx = SSL.Context()
ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9,
verify_cb)
s = SSL.Connection(ctx)
s.connect(some_addr) # Crash when _lib.i:ssl_verify_callback() calls
PyEval_CallObject()
--
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 iD8DBQFCnJN9b8x8KoP+JuwRAs3OAKDFcaO7+vd76OcCTaMoO6tgHNunhQCgnRV8 Tn11MsYhIeIfSxBdcxbakrc= =+y20 -----END PGP SIGNATURE-----