diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2000-01-14 05:24:08 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2000-01-14 05:24:08 +0000 |
commit | ce600b6ae6922a6fbb5bcd27f351144ebf41fca2 (patch) | |
tree | 9709a71d8935f65f33448c2d66190c7771d06e4b | |
parent | a9d565fcd23943d5d694b99d27cd841cc7423e6a (diff) | |
download | src-test2-ce600b6ae6922a6fbb5bcd27f351144ebf41fca2.tar.gz src-test2-ce600b6ae6922a6fbb5bcd27f351144ebf41fca2.zip |
Notes
-rw-r--r-- | crypto/openssl/ssl/s23_clnt.c | 9 | ||||
-rw-r--r-- | crypto/openssl/ssl/s23_lib.c | 14 | ||||
-rw-r--r-- | crypto/openssl/ssl/s23_srvr.c | 9 | ||||
-rw-r--r-- | crypto/openssl/ssl/s2_clnt.c | 4 | ||||
-rw-r--r-- | crypto/openssl/ssl/s2_enc.c | 5 | ||||
-rw-r--r-- | crypto/openssl/ssl/s2_lib.c | 4 | ||||
-rw-r--r-- | crypto/openssl/ssl/s2_meth.c | 4 | ||||
-rw-r--r-- | crypto/openssl/ssl/s2_pkt.c | 6 | ||||
-rw-r--r-- | crypto/openssl/ssl/s2_srvr.c | 4 |
9 files changed, 54 insertions, 5 deletions
diff --git a/crypto/openssl/ssl/s23_clnt.c b/crypto/openssl/ssl/s23_clnt.c index 299d2ae5d28e..a5eca37672ba 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) && diff --git a/crypto/openssl/ssl/s23_lib.c b/crypto/openssl/ssl/s23_lib.c index 822a3958372d..5e029d19a82e 100644 --- a/crypto/openssl/ssl/s23_lib.c +++ b/crypto/openssl/ssl/s23_lib.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> @@ -106,7 +108,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 +122,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 +142,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); } diff --git a/crypto/openssl/ssl/s23_srvr.c b/crypto/openssl/ssl/s23_srvr.c index e4122f2d78df..b4836c1ba61c 100644 --- a/crypto/openssl/ssl/s23_srvr.c +++ b/crypto/openssl/ssl/s23_srvr.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> @@ -67,8 +69,10 @@ static SSL_METHOD *ssl23_get_server_method(int ver); int ssl23_get_client_hello(SSL *s); static SSL_METHOD *ssl23_get_server_method(int ver) { +#ifndef NO_SSL2 if (ver == SSL2_VERSION) return(SSLv2_server_method()); +#endif if (ver == SSL3_VERSION) return(SSLv3_server_method()); else if (ver == TLS1_VERSION) @@ -404,6 +408,10 @@ next_bit: if (type == 1) { +#ifdef NO_SSL2 + SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_UNKNOWN_PROTOCOL); + goto err; +#else /* we are talking sslv2 */ /* we need to clean up the SSLv3/TLSv1 setup and put in the * sslv2 stuff. */ @@ -442,6 +450,7 @@ next_bit: s->method=SSLv2_server_method(); s->handshake_func=s->method->ssl_accept; +#endif } if ((type == 2) || (type == 3)) diff --git a/crypto/openssl/ssl/s2_clnt.c b/crypto/openssl/ssl/s2_clnt.c index 1fe8bd627dbe..74d76be1dca4 100644 --- a/crypto/openssl/ssl/s2_clnt.c +++ b/crypto/openssl/ssl/s2_clnt.c @@ -54,9 +54,11 @@ * 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$ */ -#ifndef NO_RSA +#ifndef NO_SSL2 #include <stdio.h> #include <openssl/rand.h> #include <openssl/buffer.h> diff --git a/crypto/openssl/ssl/s2_enc.c b/crypto/openssl/ssl/s2_enc.c index 09835008a99d..b3b2218e502d 100644 --- a/crypto/openssl/ssl/s2_enc.c +++ b/crypto/openssl/ssl/s2_enc.c @@ -54,8 +54,12 @@ * 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$ */ +#ifndef NO_SSL2 + #include <stdio.h> #include "ssl_locl.h" @@ -178,3 +182,4 @@ void ssl2_mac(SSL *s, unsigned char *md, int send) /* some would say I should zero the md context */ } +#endif diff --git a/crypto/openssl/ssl/s2_lib.c b/crypto/openssl/ssl/s2_lib.c index ff804d8e0d1b..c0ed7ecb9c64 100644 --- a/crypto/openssl/ssl/s2_lib.c +++ b/crypto/openssl/ssl/s2_lib.c @@ -54,9 +54,11 @@ * 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$ */ -#ifndef NO_RSA +#ifndef NO_SSL2 #include <stdio.h> #include <openssl/rsa.h> #include <openssl/objects.h> diff --git a/crypto/openssl/ssl/s2_meth.c b/crypto/openssl/ssl/s2_meth.c index e2add164ddbe..0e93c9920467 100644 --- a/crypto/openssl/ssl/s2_meth.c +++ b/crypto/openssl/ssl/s2_meth.c @@ -54,9 +54,11 @@ * 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$ */ -#ifndef NO_RSA +#ifndef NO_SSL2 #include <stdio.h> #include <openssl/objects.h> #include "ssl_locl.h" diff --git a/crypto/openssl/ssl/s2_pkt.c b/crypto/openssl/ssl/s2_pkt.c index a1bb5bca4b80..5330d791ac28 100644 --- a/crypto/openssl/ssl/s2_pkt.c +++ b/crypto/openssl/ssl/s2_pkt.c @@ -54,8 +54,12 @@ * 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$ */ +#ifndef NO_SSL2 + #include <stdio.h> #include <errno.h> #define USE_SOCKETS @@ -638,3 +642,5 @@ static int ssl_mt_error(int n) } return(ret); } + +#endif diff --git a/crypto/openssl/ssl/s2_srvr.c b/crypto/openssl/ssl/s2_srvr.c index 9aeedef55f62..8dd19f9e206e 100644 --- a/crypto/openssl/ssl/s2_srvr.c +++ b/crypto/openssl/ssl/s2_srvr.c @@ -54,9 +54,11 @@ * 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$ */ -#ifndef NO_RSA +#ifndef NO_SSL2 #include <stdio.h> #include <openssl/bio.h> #include <openssl/rand.h> |