Chivil blog

Aller au contenu | Aller au menu | Aller à la recherche

avril, 24 2014

Twisted and OpenSSL error

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:

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

avril, 04 2011

Unix, clear screen

Once again, since I didn't find anything relevant using Google, I'm posting a solution here to a simple problem I had.

To simply clear (reset) your terminal's screen in a shell, the character sequence is escape character, then c

in python

import sys

or in perl

print "\033c";