X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fs23_lib.c;h=e2c3bb47daf0fc5217f61d8b289ecc4348b08f8a;hp=822a3958372d0335ef4eef33625056b95e63c54e;hb=a87030a1edf0e4c6d601895f810b2d0da84ee10a;hpb=b1c4fe36258dde2950f59fec5d5f86743e495d9d 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); }