diff options
author | beck <> | 2000-03-19 11:13:58 +0000 |
---|---|---|
committer | beck <> | 2000-03-19 11:13:58 +0000 |
commit | 796d609550df3a33fc11468741c5d2f6d3df4c11 (patch) | |
tree | 6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libssl/s23_lib.c | |
parent | 5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff) | |
download | openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2 openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip |
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'src/lib/libssl/s23_lib.c')
-rw-r--r-- | src/lib/libssl/s23_lib.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/libssl/s23_lib.c b/src/lib/libssl/s23_lib.c index 822a395837..dded7a19c5 100644 --- a/src/lib/libssl/s23_lib.c +++ b/src/lib/libssl/s23_lib.c | |||
@@ -67,7 +67,7 @@ static int ssl23_write(SSL *s, const void *buf, int len); | |||
67 | static long ssl23_default_timeout(void ); | 67 | static long ssl23_default_timeout(void ); |
68 | static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p); | 68 | static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p); |
69 | static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p); | 69 | static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p); |
70 | char *SSL23_version_str="SSLv2/3 compatibility" OPENSSL_VERSION_PTEXT; | 70 | const char *SSL23_version_str="SSLv2/3 compatibility" OPENSSL_VERSION_PTEXT; |
71 | 71 | ||
72 | static SSL_METHOD SSLv23_data= { | 72 | static SSL_METHOD SSLv23_data= { |
73 | TLS1_VERSION, | 73 | TLS1_VERSION, |
@@ -92,6 +92,9 @@ static SSL_METHOD SSLv23_data= { | |||
92 | ssl_bad_method, | 92 | ssl_bad_method, |
93 | ssl23_default_timeout, | 93 | ssl23_default_timeout, |
94 | &ssl3_undef_enc_method, | 94 | &ssl3_undef_enc_method, |
95 | ssl_undefined_function, | ||
96 | ssl3_callback_ctrl, | ||
97 | ssl3_ctx_callback_ctrl, | ||
95 | }; | 98 | }; |
96 | 99 | ||
97 | static long ssl23_default_timeout(void) | 100 | static long ssl23_default_timeout(void) |
@@ -106,7 +109,11 @@ SSL_METHOD *sslv23_base_method(void) | |||
106 | 109 | ||
107 | static int ssl23_num_ciphers(void) | 110 | static int ssl23_num_ciphers(void) |
108 | { | 111 | { |
109 | return(ssl3_num_ciphers()+ssl2_num_ciphers()); | 112 | return(ssl3_num_ciphers() |
113 | #ifndef NO_SSL2 | ||
114 | + ssl2_num_ciphers() | ||
115 | #endif | ||
116 | ); | ||
110 | } | 117 | } |
111 | 118 | ||
112 | static SSL_CIPHER *ssl23_get_cipher(unsigned int u) | 119 | static SSL_CIPHER *ssl23_get_cipher(unsigned int u) |
@@ -116,7 +123,11 @@ static SSL_CIPHER *ssl23_get_cipher(unsigned int u) | |||
116 | if (u < uu) | 123 | if (u < uu) |
117 | return(ssl3_get_cipher(u)); | 124 | return(ssl3_get_cipher(u)); |
118 | else | 125 | else |
126 | #ifndef NO_SSL2 | ||
119 | return(ssl2_get_cipher(u-uu)); | 127 | return(ssl2_get_cipher(u-uu)); |
128 | #else | ||
129 | return(NULL); | ||
130 | #endif | ||
120 | } | 131 | } |
121 | 132 | ||
122 | /* This function needs to check if the ciphers required are actually | 133 | /* This function needs to check if the ciphers required are actually |
@@ -132,8 +143,10 @@ static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p) | |||
132 | ((unsigned long)p[1]<<8L)|(unsigned long)p[2]; | 143 | ((unsigned long)p[1]<<8L)|(unsigned long)p[2]; |
133 | c.id=id; | 144 | c.id=id; |
134 | cp=ssl3_get_cipher_by_char(p); | 145 | cp=ssl3_get_cipher_by_char(p); |
146 | #ifndef NO_SSL2 | ||
135 | if (cp == NULL) | 147 | if (cp == NULL) |
136 | cp=ssl2_get_cipher_by_char(p); | 148 | cp=ssl2_get_cipher_by_char(p); |
149 | #endif | ||
137 | return(cp); | 150 | return(cp); |
138 | } | 151 | } |
139 | 152 | ||