The problem is probably that the server can't handle the default sslv23
protocol used by default by M2Crypto - at least it's part of the problem. It shouldn't segfault but give an error in this case, that's probably a bug in M2Crypto.
Try using sslv3
or tlsv1
instead:
from M2Crypto import SSL
ctx = SSL.Context(protocol='tlsv1')
conn = SSL.Connection(ctx)
conn.connect(('www.cancerhelp.org.uk', 443))
That worked for me...