Add missing #ifndefs that caused missing symbols when building libssl
[openssl.git] / ssl / s2_clnt.c
index 956c0280c99b24c0dde1632fec6d31726d3a1890..f05b76a66af85c0297485eea7e1f9e545570538c 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#ifndef NO_RSA
+#include "ssl_locl.h"
+#ifndef NO_SSL2
 #include <stdio.h>
 #include <openssl/rand.h>
 #include <openssl/buffer.h>
 #include <openssl/objects.h>
-#include "ssl_locl.h"
 #include <openssl/evp.h>
 
 static SSL_METHOD *ssl2_get_client_method(int ver);
@@ -108,7 +108,7 @@ int ssl2_connect(SSL *s)
        void (*cb)()=NULL;
        int new_state,state;
 
-       RAND_seed(&l,sizeof(l));
+       RAND_add(&l,sizeof(l),0);
        ERR_clear_error();
        clear_sys_error();
 
@@ -310,7 +310,13 @@ static int get_server_hello(SSL *s)
                                        SSL_R_PEER_ERROR);
                        return(-1);
                        }
+#ifdef __APPLE_CC__
+               /* The Rhapsody 5.5 (a.k.a. MacOS X) compiler bug
+                * workaround. <appro@fy.chalmers.se> */
+               s->hit=(i=*(p++))?1:0;
+#else
                s->hit=(*(p++))?1:0;
+#endif
                s->s2->tmp.cert_type= *(p++);
                n2s(p,i);
                if (i < s->version) s->version=i;
@@ -968,4 +974,10 @@ end:
        EVP_PKEY_free(pkey);
        return(i);
        }
+#else /* !NO_SSL2 */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
 #endif