A faster (and more general, and better documented) replacement for mklink.sh.
[openssl.git] / ssl / s3_srvr.c
index 60bdf262fcd2c793ca2954f3c7339c09829466c8..154b6ada3473e4861ddb700d069bd71bef4a3888 100644 (file)
 #include <openssl/buffer.h>
 #include <openssl/rand.h>
 #include <openssl/objects.h>
+#include <openssl/md5.h>
+#include <openssl/sha.h>
 #include <openssl/evp.h>
 #include <openssl/x509.h>
 #include "ssl_locl.h"
 
-#define BREAK  break
-/* SSLerr(SSL_F_SSL3_ACCEPT,ERR_R_MALLOC_FAILURE);
- * SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,ERR_R_MALLOC_FAILURE);
- * SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE);
- * SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,ERR_R_MALLOC_FAILURE);
- * SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,ERR_R_MALLOC_FAILURE);
- */
-
-#ifndef NOPROTO
 static SSL_METHOD *ssl3_get_server_method(int ver);
 static int ssl3_get_client_hello(SSL *s);
 static int ssl3_send_server_hello(SSL *s);
@@ -86,21 +79,6 @@ static int ssl3_get_client_key_exchange(SSL *s);
 static int ssl3_get_client_certificate(SSL *s);
 static int ssl3_send_hello_request(SSL *s);
 
-#else
-
-static SSL_METHOD *ssl3_get_server_method();
-static int ssl3_get_client_hello();
-static int ssl3_send_server_hello();
-static int ssl3_send_server_key_exchange();
-static int ssl3_send_certificate_request();
-static int ssl3_send_server_done();
-static int ssl3_get_cert_verify();
-static int ssl3_get_client_key_exchange();
-static int ssl3_get_client_certificate();
-static int ssl3_send_hello_request();
-
-#endif
-
 static SSL_METHOD *ssl3_get_server_method(int ver)
        {
        if (ver == SSL3_VERSION)
@@ -1207,8 +1185,10 @@ static int ssl3_get_client_key_exchange(SSL *s)
        long n;
        unsigned long l;
        unsigned char *p;
+#ifndef NO_RSA
        RSA *rsa=NULL;
        EVP_PKEY *pkey=NULL;
+#endif
 #ifndef NO_DH
        BIGNUM *pub=NULL;
        DH *dh_srvr;