[PYTHON-CRYPTO] Anyone ever successfully used ssl_verify_callback and other similar callbacks?

Heikki Toivonen heikki at OSAFOUNDATION.ORG
Tue May 31 18:40:25 CEST 2005


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20050531/a4f526e1/attachment.pgp>


More information about the python-crypto mailing list