Make DSA_generate_parameters, and fix a couple of bug
[openssl.git] / ssl / s23_lib.c
index 822a3958372d0335ef4eef33625056b95e63c54e..e2c3bb47daf0fc5217f61d8b289ecc4348b08f8a 100644 (file)
@@ -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);
        }