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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With