summaryrefslogtreecommitdiffstats
path: root/ssl/s23_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssl/s23_lib.c')
-rw-r--r--ssl/s23_lib.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ssl/s23_lib.c b/ssl/s23_lib.c
index 822a395837..e2c3bb47da 100644
--- a/ssl/s23_lib.c
+++ b/ssl/s23_lib.c
@@ -106,7 +106,11 @@ SSL_METHOD *sslv23_base_method(void)
static int ssl23_num_ciphers(void)
{
- return(ssl3_num_ciphers()+ssl2_num_ciphers());
+ return(ssl3_num_ciphers()
+#ifndef NO_SSL2
+ + ssl2_num_ciphers()
+#endif
+ );
}
static SSL_CIPHER *ssl23_get_cipher(unsigned int u)
@@ -116,7 +120,11 @@ static SSL_CIPHER *ssl23_get_cipher(unsigned int u)
if (u < uu)
return(ssl3_get_cipher(u));
else
+#ifndef NO_SSL2
return(ssl2_get_cipher(u-uu));
+#else
+ return(NULL);
+#endif
}
/* This function needs to check if the ciphers required are actually
@@ -132,8 +140,10 @@ static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p)
((unsigned long)p[1]<<8L)|(unsigned long)p[2];
c.id=id;
cp=ssl3_get_cipher_by_char(p);
+#ifndef NO_SSL2
if (cp == NULL)
cp=ssl2_get_cipher_by_char(p);
+#endif
return(cp);
}