OpenSSL: Unable to create SSL_CTX * using SSL_CTX_new()
c, linux, openssl, ssl
Solution
I used the following call at start of main() function:
SSL_library_init();
Solution found at: here
Problem
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 ```