pyopenssl icon indicating copy to clipboard operation
pyopenssl copied to clipboard

get_verify_result not present?

Open bortzmeyer opened this issue 4 years ago • 0 comments

OpenSSL has a routine SSL_get_verify_result to check the validation status of a connection for which any result was accepted. I do not find it in PyOpenSSL?

Context: I want to accept any certificate but be informed if they are valid. I can do:

context.set_verify(OpenSSL.SSL.VERIFY_PEER | OpenSSL.SSL.VERIFY_FAIL_IF_NO_PEER_CERT | \
                               OpenSSL.SSL.VERIFY_CLIENT_ONCE,
                               lambda conn, cert, errno, depth, preverify_ok: True)

But then how to retrieve the validation status?

bortzmeyer avatar Mar 02 '21 16:03 bortzmeyer