Linux version from cat /proc/version
Linux version 3.6.11-4.fc16.i686 (mockbuild@bkernel02) (gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC) )
From openssl version
command:
OpenSSL 1.0.1g 7 Apr 2014
First I perform a HTTP request using REST API with cURL to get some configurations from server(Thread 1). Then I create a TLS channel and log in to XMPP server through that channel(Thread 2). Then I try to log in to SIP server by creating a TLS channel(Thread3). But TLS channel creation fails with this error:
error:140A90F1:SSL routines:SSL_CTX_new:unable to load ssl2 md5 routines
SSL_library_init();
SSL_load_error_strings();
SSL_CTX* sslContext = SSL_CTX_new(SSLv3_method());
Here sslContext
is NULL. I have seen plenty of bug reports and mails about this error online but no solution anywhere. I don't know if its related to cURL but in many cases people are facing this issue when using cURL.
See the following links for other people's postings regarding this error.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56027
http://comments.gmane.org/gmane.comp.lib.boost.asio.user/2099
http://en.it-usenet.org/thread/17225/526/
http://curl.haxx.se/mail/curlphp-2009-01/0020.html
EDIT:
Output of the first command of the comment:
# openssl version -a
OpenSSL 1.0.1g 7 Apr 2014
built on: Tue Aug 12 10:07:53 BDT 2014
platform: linux-generic32
options: bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) blowfish(ptr)
compiler: /home/moshiur/Documents/Workspace/ph_SDKs/Untitled_Folder/ph
OPENSSLDIR: "/etc/ssl"
# ls /etc/ssl/
certs misc openssl.cnf private
Call:
OpenSSL_add_ssl_algorithms
SSL_load_error_strings
See Library Initialization on the OpenSSL wiki. From the wiki:
It sounds like the library was configured with
no-ssl2
andno-md5
. Is this a FIPS configuration?The configuration defines are available in a couple of places. First, you might be able check (sometimes the defines show up):
Second, you can use
opensslconf.h
for runtime checks. For example, you can check for theno-ssl2
config option viaOPENSSL_NO_SSL2
(these defines always show up):You can use these in your code to guard on features. For example: