假设正在使用版本3.6:
参见:https
:
//github.com/python/cpython/blob/3.6/Modules/_ssl.c#L3523-L3534
PySSL_BEGIN_ALLOW_THREADS_S(pw_info.thread_state); r = SSL_CTX_check_private_key(self->ctx); PySSL_END_ALLOW_THREADS_S(pw_info.thread_state); if (r != 1) { _setSSLError(NULL, 0, __FILE__, __LINE__); goto error; }这是说
SSL_CTX_check_private_key失败了。因此,私钥不正确。
参考可能的版本:
- https://github.com/python/cpython/blob/3.4/Modules/_ssl.c#L2529-L2535


![使用Python ssl库,“ SSLError:[SSL] PEM库(_ssl.c:2532)”是什么意思? 使用Python ssl库,“ SSLError:[SSL] PEM库(_ssl.c:2532)”是什么意思?](http://www.mshxw.com/aiimages/31/651950.png)
