summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s23_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/s23_lib.c')
-rw-r--r--src/lib/libssl/s23_lib.c17
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);
67static long ssl23_default_timeout(void ); 67static long ssl23_default_timeout(void );
68static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p); 68static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p);
69static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p); 69static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p);
70char *SSL23_version_str="SSLv2/3 compatibility" OPENSSL_VERSION_PTEXT; 70const char *SSL23_version_str="SSLv2/3 compatibility" OPENSSL_VERSION_PTEXT;
71 71
72static SSL_METHOD SSLv23_data= { 72static 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
97static long ssl23_default_timeout(void) 100static long ssl23_default_timeout(void)
@@ -106,7 +109,11 @@ SSL_METHOD *sslv23_base_method(void)
106 109
107static int ssl23_num_ciphers(void) 110static 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
112static SSL_CIPHER *ssl23_get_cipher(unsigned int u) 119static 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