Openssl SSL_CTX_new (SSLv3_method ()) returns NULL

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 the team openssl version:

OpenSSL 1.0.1g April 7, 2014

First, I make an HTTP request using the REST API with cURL to get some configurations from the server (Thread 1). Then I create a TLS channel and register with the XMPP server through this channel (Thread 2). Then I try to log into the SIP server by creating a TLS channel (Thread3). But creating a TLS channel 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());

sslContext - NULL. , . , cURL, cURL.

. .

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:

:

# 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
+4
1

Openssl SSL_CTX_new (SSLv3_method()) NULL

:

  • OpenSSL_add_ssl_algorithms
  • SSL_load_error_strings

. OpenSSL. :

, , SSL_CTX_new, NULL, .


error: 140A90F1: SSL: SSL_CTX_new: ssl2 md5

, no-ssl2 no-md5. FIPS?

. -, ( ):

$ /usr/local/ssl/macosx-x64/bin/openssl version -a
OpenSSL 1.0.1i 6 Aug 2014
built on: Wed Aug  6 18:45:03 EDT 2014
platform: darwin64-x86_64-cc
options:  bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) idea(int) blowfish(idx) 
compiler: cc -fPIC -fno-common -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN 
  -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
  -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM 
  -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR: "/usr/local/ssl/macosx-x64"

-, opensslconf.h . , no-ssl2 config OPENSSL_NO_SSL2 ( ):

$ cat /usr/local/ssl/macosx-x64/include/openssl/opensslconf.h | grep -A 1 -i SSL2
#ifndef OPENSSL_NO_SSL2
# define OPENSSL_NO_SSL2
#endif
--
# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2)
#  define NO_SSL2
# endif

. :

#ifndef OPENSSL_NO_SSL2
  /* SSLv2 is available */
#endif
+2

All Articles