按照页面上的说明,我试图使用openSSL以安全的方式连接客户机/服务器。
我无法按以下方式创建SSL_CTX:
/* OpenSSL headers */
#include "openssl/bio.h"
#include "openssl/ssl.h"
#include "openssl/err.h"
int main()
{
/* Initializing OpenSSL */
SSL_load_error_strings();
ERR_load_BIO_strings();
OpenSSL_add_all_algorithms();
SSL_CTX * ctx = SSL_CTX_new(SSLv23_client_method());
.....
}ctx引用始终为NULL。谁能告诉我错过了哪一步吗?
谢谢。
更新
在检查错误时,消息是
Error: library has no ciphers发布于 2012-04-15 17:01:22
我在main()函数的开头使用了以下调用:
SSL_library_init();找到的解决方案:这里
https://stackoverflow.com/questions/10163968
复制相似问题