diff options
author | kris <kris@FreeBSD.org> | 2000-01-14 05:24:08 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-01-14 05:24:08 +0000 |
commit | 728ac765652f2ea1ea6897cc052ffdd6ed23b476 (patch) | |
tree | 26f6dea2b9b83ed71d58737b3e56ea419c704587 /crypto/openssl/ssl/s23_clnt.c | |
parent | 2196bee6e9ecd81b3a9082420b701d56ff3c3e26 (diff) | |
download | FreeBSD-src-728ac765652f2ea1ea6897cc052ffdd6ed23b476.zip FreeBSD-src-728ac765652f2ea1ea6897cc052ffdd6ed23b476.tar.gz |
Fix breakage when NO_RSA specified.
Reviewed by: Ben Laurie <ben@openssl.org>
Diffstat (limited to 'crypto/openssl/ssl/s23_clnt.c')
-rw-r--r-- | crypto/openssl/ssl/s23_clnt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/openssl/ssl/s23_clnt.c b/crypto/openssl/ssl/s23_clnt.c index 299d2ae..a5eca37 100644 --- a/crypto/openssl/ssl/s23_clnt.c +++ b/crypto/openssl/ssl/s23_clnt.c @@ -54,6 +54,8 @@ * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] + * + * $FreeBSD$ */ #include <stdio.h> @@ -68,8 +70,10 @@ static int ssl23_client_hello(SSL *s); static int ssl23_get_server_hello(SSL *s); static SSL_METHOD *ssl23_get_client_method(int ver) { +#ifndef NO_SSL2 if (ver == SSL2_VERSION) return(SSLv2_client_method()); +#endif if (ver == SSL3_VERSION) return(SSLv3_client_method()); else if (ver == TLS1_VERSION) @@ -320,6 +324,10 @@ static int ssl23_get_server_hello(SSL *s) if ((p[0] & 0x80) && (p[2] == SSL2_MT_SERVER_HELLO) && (p[5] == 0x00) && (p[6] == 0x02)) { +#ifdef NO_SSL2 + SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_UNSUPPORTED_PROTOCOL); + goto err; +#else /* we are talking sslv2 */ /* we need to clean up the SSLv3 setup and put in the * sslv2 stuff. */ @@ -375,6 +383,7 @@ static int ssl23_get_server_hello(SSL *s) s->method=SSLv2_client_method(); s->handshake_func=s->method->ssl_connect; +#endif } else if ((p[0] == SSL3_RT_HANDSHAKE) && (p[1] == SSL3_VERSION_MAJOR) && |