Once again, since I didn't find anything relevant while searching the web, here's a post.

While trying to connect to a remote SSL host using Twisted, and getting an error in the certificate validation.

If you're trying to get the meaning of the errnum parameter of the callback of the ctx.set_verify method (usually named verifyCallback from here).

The errors codes / numbers are actually from OpenSSL and listed here: https://github.com/openssl/openssl/blob/master/crypto/x509/x509_vfy.h

Unfortunately, it seems there is no textual representation in case you wished to log them in a meaningful way >_<