Browse Source

tls: check for support of ssl2

- latest distros with newer ssl lib are removing the ssl2 support
(cherry picked from commit 7c7ed8ad9d62bd501bd2c856a01689a84a0c0711)
Daniel-Constantin Mierla 13 years ago
parent
commit
ab20bfc853
1 changed files with 3 additions and 1 deletions
  1. 3 1
      modules/tls/tls_init.c

+ 3 - 1
modules/tls/tls_init.c

@@ -333,10 +333,12 @@ int tls_h_init_si(struct socket_info *si)
  */
 static void init_ssl_methods(void)
 {
+#ifndef OPENSSL_NO_SSL2
 	ssl_methods[TLS_USE_SSLv2_cli - 1] = SSLv2_client_method();
 	ssl_methods[TLS_USE_SSLv2_srv - 1] = SSLv2_server_method();
 	ssl_methods[TLS_USE_SSLv2 - 1] = SSLv2_method();
-	
+#endif
+
 	ssl_methods[TLS_USE_SSLv3_cli - 1] = SSLv3_client_method();
 	ssl_methods[TLS_USE_SSLv3_srv - 1] = SSLv3_server_method();
 	ssl_methods[TLS_USE_SSLv3 - 1] = SSLv3_method();