Get rid of redundant multiplications in bn_div_words.
[openssl.git] / ssl / s2_lib.c
index ad23ce1dc5439419cac1325a23ee8226998fb609..ff804d8e0d1b0b66b578feead844914f74dc19d4 100644 (file)
  * [including the GNU Public Licence.]
  */
 
+#ifndef NO_RSA
 #include <stdio.h>
 #include <openssl/rsa.h>
 #include <openssl/objects.h>
+#include <openssl/md5.h>
 #include "ssl_locl.h"
 
 static long ssl2_default_timeout(void );
@@ -66,7 +68,7 @@ const char *ssl2_version_str="SSLv2" OPENSSL_VERSION_PTEXT;
 
 #define SSL2_NUM_CIPHERS (sizeof(ssl2_ciphers)/sizeof(SSL_CIPHER))
 
-SSL_CIPHER ssl2_ciphers[]={
+OPENSSL_GLOBAL SSL_CIPHER ssl2_ciphers[]={
 /* NULL_WITH_MD5 v3 */
 #if 0
        {
@@ -359,6 +361,11 @@ void ssl2_generate_key_material(SSL *s)
        unsigned char *km;
        unsigned char c='0';
 
+#ifdef CHARSET_EBCDIC
+       c = os_toascii['0']; /* Must be an ASCII '0', not EBCDIC '0',
+                               see SSLv2 docu */
+#endif
+
        km=s->s2->key_material;
        for (i=0; i<s->s2->key_material_length; i+=MD5_DIGEST_LENGTH)
                {
@@ -414,4 +421,4 @@ int ssl2_shutdown(SSL *s)
        s->shutdown=(SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
        return(1);
        }
-
+#endif