Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
知道如何解决这个问题吗?
>>> from M2Crypto import SSL >>> M2Crypto.version '0.21.1' >>> >>> ctx = SSL.Context() >>> conn = SSL.Connection(ctx) >>> conn.connect(('cancerhelp.org.uk', 443)) Segmentation fault (core dumped)
问题可能是服务器无法处理sslv23M2Crypto 默认使用的默认协议 - 至少这是问题的一部分。它不应该出现段错误,但在这种情况下会给出错误,这可能是 M2Crypto 中的错误。
sslv23
尝试使用sslv3ortlsv1代替:
sslv3
tlsv1
from M2Crypto import SSL ctx = SSL.Context(protocol='tlsv1') conn = SSL.Connection(ctx) conn.connect(('www.cancerhelp.org.uk', 443))
这对我有用...