OpenSSL的:无法创建SSL_CTX *使用SSL_CTX_new() [英] OpenSSL: Unable to create SSL_CTX * using SSL_CTX_new()
本文介绍了OpenSSL的:无法创建SSL_CTX *使用SSL_CTX_new()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
之后,我试图使用OpenSSL在页的说明以安全的方式连接的客户机/服务器。
我不能够创造SSL_CTX如下:
/ * OpenSSL的头* / #包括为OpenSSL / bio.h
#包括为OpenSSL / ssl.h
#包括为OpenSSL / err.h 诠释的main()
{ / *初始化OpenSSL的* / SSL_load_error_strings();
ERR_load_BIO_strings();
OpenSSL_add_all_algorithms(); SSL_CTX * CTX = SSL_CTX_new(SSLv23_client_method()); .....
}
环磷酰胺引用总是原来是NULL。谁能告诉我缺少了哪一步?
感谢。
更新
在检查错误,消息是
错误:库没有密码
解决方案
我用下面的调用在main()函数开始:
SSL_library_init();
解决方案发现在:这里
Following the instructions on page , I am trying to use openSSL to connect client/server in secure manner.
I am not able to create the SSL_CTX as follows:
/* 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());
.....
}
The ctx reference always turns out to be NULL. Can anyone please tell what step am I missing?
Thanks.
Update
On checking error, the message was
Error: library has no ciphers
解决方案
I used the following call at start of main() function:
SSL_library_init();
Solution found at: here
这篇关于OpenSSL的:无法创建SSL_CTX *使用SSL_CTX_new()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文