diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/s23_srvr.c | 59 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s23_srvr.c | 59 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/t1_srvr.c | 76 | ||||
-rw-r--r-- | src/lib/libssl/t1_srvr.c | 76 |
4 files changed, 122 insertions, 148 deletions
diff --git a/src/lib/libssl/s23_srvr.c b/src/lib/libssl/s23_srvr.c index d4ca586c2d..d0699a55d7 100644 --- a/src/lib/libssl/s23_srvr.c +++ b/src/lib/libssl/s23_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s23_srvr.c,v 1.43 2015/08/29 17:15:52 doug Exp $ */ | 1 | /* $OpenBSD: s23_srvr.c,v 1.44 2015/09/11 14:47:56 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -117,59 +117,8 @@ | |||
117 | #include <openssl/evp.h> | 117 | #include <openssl/evp.h> |
118 | #include <openssl/objects.h> | 118 | #include <openssl/objects.h> |
119 | 119 | ||
120 | static const SSL_METHOD *ssl23_get_server_method(int ver); | ||
121 | int ssl23_get_client_hello(SSL *s); | 120 | int ssl23_get_client_hello(SSL *s); |
122 | 121 | ||
123 | const SSL_METHOD SSLv23_server_method_data = { | ||
124 | .version = TLS1_2_VERSION, | ||
125 | .ssl_new = tls1_new, | ||
126 | .ssl_clear = tls1_clear, | ||
127 | .ssl_free = tls1_free, | ||
128 | .ssl_accept = ssl23_accept, | ||
129 | .ssl_connect = ssl_undefined_function, | ||
130 | .ssl_read = ssl23_read, | ||
131 | .ssl_peek = ssl23_peek, | ||
132 | .ssl_write = ssl23_write, | ||
133 | .ssl_shutdown = ssl_undefined_function, | ||
134 | .ssl_renegotiate = ssl_undefined_function, | ||
135 | .ssl_renegotiate_check = ssl_ok, | ||
136 | .ssl_get_message = ssl3_get_message, | ||
137 | .ssl_read_bytes = ssl3_read_bytes, | ||
138 | .ssl_write_bytes = ssl3_write_bytes, | ||
139 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
140 | .ssl_ctrl = ssl3_ctrl, | ||
141 | .ssl_ctx_ctrl = ssl3_ctx_ctrl, | ||
142 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
143 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
144 | .ssl_pending = ssl_undefined_const_function, | ||
145 | .num_ciphers = ssl3_num_ciphers, | ||
146 | .get_cipher = ssl3_get_cipher, | ||
147 | .get_ssl_method = ssl23_get_server_method, | ||
148 | .get_timeout = ssl23_default_timeout, | ||
149 | .ssl3_enc = &ssl3_undef_enc_method, | ||
150 | .ssl_version = ssl_undefined_void_function, | ||
151 | .ssl_callback_ctrl = ssl3_callback_ctrl, | ||
152 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, | ||
153 | }; | ||
154 | |||
155 | const SSL_METHOD * | ||
156 | SSLv23_server_method(void) | ||
157 | { | ||
158 | return &SSLv23_server_method_data; | ||
159 | } | ||
160 | |||
161 | static const SSL_METHOD * | ||
162 | ssl23_get_server_method(int ver) | ||
163 | { | ||
164 | if (ver == TLS1_VERSION) | ||
165 | return (TLSv1_server_method()); | ||
166 | if (ver == TLS1_1_VERSION) | ||
167 | return (TLSv1_1_server_method()); | ||
168 | if (ver == TLS1_2_VERSION) | ||
169 | return (TLSv1_2_server_method()); | ||
170 | return (NULL); | ||
171 | } | ||
172 | |||
173 | int | 122 | int |
174 | ssl23_accept(SSL *s) | 123 | ssl23_accept(SSL *s) |
175 | { | 124 | { |
@@ -555,9 +504,3 @@ ssl23_get_client_hello(SSL *s) | |||
555 | 504 | ||
556 | return (SSL_accept(s)); | 505 | return (SSL_accept(s)); |
557 | } | 506 | } |
558 | |||
559 | const SSL_METHOD * | ||
560 | TLS_server_method(void) | ||
561 | { | ||
562 | return &SSLv23_server_method_data; | ||
563 | } | ||
diff --git a/src/lib/libssl/src/ssl/s23_srvr.c b/src/lib/libssl/src/ssl/s23_srvr.c index d4ca586c2d..d0699a55d7 100644 --- a/src/lib/libssl/src/ssl/s23_srvr.c +++ b/src/lib/libssl/src/ssl/s23_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s23_srvr.c,v 1.43 2015/08/29 17:15:52 doug Exp $ */ | 1 | /* $OpenBSD: s23_srvr.c,v 1.44 2015/09/11 14:47:56 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -117,59 +117,8 @@ | |||
117 | #include <openssl/evp.h> | 117 | #include <openssl/evp.h> |
118 | #include <openssl/objects.h> | 118 | #include <openssl/objects.h> |
119 | 119 | ||
120 | static const SSL_METHOD *ssl23_get_server_method(int ver); | ||
121 | int ssl23_get_client_hello(SSL *s); | 120 | int ssl23_get_client_hello(SSL *s); |
122 | 121 | ||
123 | const SSL_METHOD SSLv23_server_method_data = { | ||
124 | .version = TLS1_2_VERSION, | ||
125 | .ssl_new = tls1_new, | ||
126 | .ssl_clear = tls1_clear, | ||
127 | .ssl_free = tls1_free, | ||
128 | .ssl_accept = ssl23_accept, | ||
129 | .ssl_connect = ssl_undefined_function, | ||
130 | .ssl_read = ssl23_read, | ||
131 | .ssl_peek = ssl23_peek, | ||
132 | .ssl_write = ssl23_write, | ||
133 | .ssl_shutdown = ssl_undefined_function, | ||
134 | .ssl_renegotiate = ssl_undefined_function, | ||
135 | .ssl_renegotiate_check = ssl_ok, | ||
136 | .ssl_get_message = ssl3_get_message, | ||
137 | .ssl_read_bytes = ssl3_read_bytes, | ||
138 | .ssl_write_bytes = ssl3_write_bytes, | ||
139 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
140 | .ssl_ctrl = ssl3_ctrl, | ||
141 | .ssl_ctx_ctrl = ssl3_ctx_ctrl, | ||
142 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
143 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
144 | .ssl_pending = ssl_undefined_const_function, | ||
145 | .num_ciphers = ssl3_num_ciphers, | ||
146 | .get_cipher = ssl3_get_cipher, | ||
147 | .get_ssl_method = ssl23_get_server_method, | ||
148 | .get_timeout = ssl23_default_timeout, | ||
149 | .ssl3_enc = &ssl3_undef_enc_method, | ||
150 | .ssl_version = ssl_undefined_void_function, | ||
151 | .ssl_callback_ctrl = ssl3_callback_ctrl, | ||
152 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, | ||
153 | }; | ||
154 | |||
155 | const SSL_METHOD * | ||
156 | SSLv23_server_method(void) | ||
157 | { | ||
158 | return &SSLv23_server_method_data; | ||
159 | } | ||
160 | |||
161 | static const SSL_METHOD * | ||
162 | ssl23_get_server_method(int ver) | ||
163 | { | ||
164 | if (ver == TLS1_VERSION) | ||
165 | return (TLSv1_server_method()); | ||
166 | if (ver == TLS1_1_VERSION) | ||
167 | return (TLSv1_1_server_method()); | ||
168 | if (ver == TLS1_2_VERSION) | ||
169 | return (TLSv1_2_server_method()); | ||
170 | return (NULL); | ||
171 | } | ||
172 | |||
173 | int | 122 | int |
174 | ssl23_accept(SSL *s) | 123 | ssl23_accept(SSL *s) |
175 | { | 124 | { |
@@ -555,9 +504,3 @@ ssl23_get_client_hello(SSL *s) | |||
555 | 504 | ||
556 | return (SSL_accept(s)); | 505 | return (SSL_accept(s)); |
557 | } | 506 | } |
558 | |||
559 | const SSL_METHOD * | ||
560 | TLS_server_method(void) | ||
561 | { | ||
562 | return &SSLv23_server_method_data; | ||
563 | } | ||
diff --git a/src/lib/libssl/src/ssl/t1_srvr.c b/src/lib/libssl/src/ssl/t1_srvr.c index 3c6ac541f8..902cd93cd7 100644 --- a/src/lib/libssl/src/ssl/t1_srvr.c +++ b/src/lib/libssl/src/ssl/t1_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t1_srvr.c,v 1.18 2015/02/06 08:30:23 jsing Exp $ */ | 1 | /* $OpenBSD: t1_srvr.c,v 1.19 2015/09/11 14:47:56 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -67,6 +67,38 @@ | |||
67 | 67 | ||
68 | static const SSL_METHOD *tls1_get_server_method(int ver); | 68 | static const SSL_METHOD *tls1_get_server_method(int ver); |
69 | 69 | ||
70 | const SSL_METHOD TLS_server_method_data = { | ||
71 | .version = TLS1_2_VERSION, | ||
72 | .ssl_new = tls1_new, | ||
73 | .ssl_clear = tls1_clear, | ||
74 | .ssl_free = tls1_free, | ||
75 | .ssl_accept = ssl23_accept, | ||
76 | .ssl_connect = ssl_undefined_function, | ||
77 | .ssl_read = ssl23_read, | ||
78 | .ssl_peek = ssl23_peek, | ||
79 | .ssl_write = ssl23_write, | ||
80 | .ssl_shutdown = ssl_undefined_function, | ||
81 | .ssl_renegotiate = ssl_undefined_function, | ||
82 | .ssl_renegotiate_check = ssl_ok, | ||
83 | .ssl_get_message = ssl3_get_message, | ||
84 | .ssl_read_bytes = ssl3_read_bytes, | ||
85 | .ssl_write_bytes = ssl3_write_bytes, | ||
86 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
87 | .ssl_ctrl = ssl3_ctrl, | ||
88 | .ssl_ctx_ctrl = ssl3_ctx_ctrl, | ||
89 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
90 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
91 | .ssl_pending = ssl_undefined_const_function, | ||
92 | .num_ciphers = ssl3_num_ciphers, | ||
93 | .get_cipher = ssl3_get_cipher, | ||
94 | .get_ssl_method = tls1_get_server_method, | ||
95 | .get_timeout = ssl23_default_timeout, | ||
96 | .ssl3_enc = &ssl3_undef_enc_method, | ||
97 | .ssl_version = ssl_undefined_void_function, | ||
98 | .ssl_callback_ctrl = ssl3_callback_ctrl, | ||
99 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, | ||
100 | }; | ||
101 | |||
70 | const SSL_METHOD TLSv1_server_method_data = { | 102 | const SSL_METHOD TLSv1_server_method_data = { |
71 | .version = TLS1_VERSION, | 103 | .version = TLS1_VERSION, |
72 | .ssl_new = tls1_new, | 104 | .ssl_new = tls1_new, |
@@ -163,32 +195,44 @@ const SSL_METHOD TLSv1_2_server_method_data = { | |||
163 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, | 195 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, |
164 | }; | 196 | }; |
165 | 197 | ||
198 | static const SSL_METHOD * | ||
199 | tls1_get_server_method(int ver) | ||
200 | { | ||
201 | if (ver == TLS1_2_VERSION) | ||
202 | return (TLSv1_2_server_method()); | ||
203 | if (ver == TLS1_1_VERSION) | ||
204 | return (TLSv1_1_server_method()); | ||
205 | if (ver == TLS1_VERSION) | ||
206 | return (TLSv1_server_method()); | ||
207 | return (NULL); | ||
208 | } | ||
209 | |||
166 | const SSL_METHOD * | 210 | const SSL_METHOD * |
167 | TLSv1_server_method(void) | 211 | SSLv23_server_method(void) |
168 | { | 212 | { |
169 | return &TLSv1_server_method_data; | 213 | return (TLS_server_method()); |
170 | } | 214 | } |
171 | 215 | ||
172 | const SSL_METHOD * | 216 | const SSL_METHOD * |
173 | TLSv1_1_server_method(void) | 217 | TLS_server_method(void) |
174 | { | 218 | { |
175 | return &TLSv1_1_server_method_data; | 219 | return (&TLS_server_method_data); |
176 | } | 220 | } |
177 | 221 | ||
178 | const SSL_METHOD * | 222 | const SSL_METHOD * |
179 | TLSv1_2_server_method(void) | 223 | TLSv1_server_method(void) |
180 | { | 224 | { |
181 | return &TLSv1_2_server_method_data; | 225 | return (&TLSv1_server_method_data); |
182 | } | 226 | } |
183 | 227 | ||
184 | static const SSL_METHOD * | 228 | const SSL_METHOD * |
185 | tls1_get_server_method(int ver) | 229 | TLSv1_1_server_method(void) |
186 | { | 230 | { |
187 | if (ver == TLS1_2_VERSION) | 231 | return (&TLSv1_1_server_method_data); |
188 | return (TLSv1_2_server_method()); | 232 | } |
189 | if (ver == TLS1_1_VERSION) | 233 | |
190 | return (TLSv1_1_server_method()); | 234 | const SSL_METHOD * |
191 | if (ver == TLS1_VERSION) | 235 | TLSv1_2_server_method(void) |
192 | return (TLSv1_server_method()); | 236 | { |
193 | return (NULL); | 237 | return (&TLSv1_2_server_method_data); |
194 | } | 238 | } |
diff --git a/src/lib/libssl/t1_srvr.c b/src/lib/libssl/t1_srvr.c index 3c6ac541f8..902cd93cd7 100644 --- a/src/lib/libssl/t1_srvr.c +++ b/src/lib/libssl/t1_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t1_srvr.c,v 1.18 2015/02/06 08:30:23 jsing Exp $ */ | 1 | /* $OpenBSD: t1_srvr.c,v 1.19 2015/09/11 14:47:56 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -67,6 +67,38 @@ | |||
67 | 67 | ||
68 | static const SSL_METHOD *tls1_get_server_method(int ver); | 68 | static const SSL_METHOD *tls1_get_server_method(int ver); |
69 | 69 | ||
70 | const SSL_METHOD TLS_server_method_data = { | ||
71 | .version = TLS1_2_VERSION, | ||
72 | .ssl_new = tls1_new, | ||
73 | .ssl_clear = tls1_clear, | ||
74 | .ssl_free = tls1_free, | ||
75 | .ssl_accept = ssl23_accept, | ||
76 | .ssl_connect = ssl_undefined_function, | ||
77 | .ssl_read = ssl23_read, | ||
78 | .ssl_peek = ssl23_peek, | ||
79 | .ssl_write = ssl23_write, | ||
80 | .ssl_shutdown = ssl_undefined_function, | ||
81 | .ssl_renegotiate = ssl_undefined_function, | ||
82 | .ssl_renegotiate_check = ssl_ok, | ||
83 | .ssl_get_message = ssl3_get_message, | ||
84 | .ssl_read_bytes = ssl3_read_bytes, | ||
85 | .ssl_write_bytes = ssl3_write_bytes, | ||
86 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
87 | .ssl_ctrl = ssl3_ctrl, | ||
88 | .ssl_ctx_ctrl = ssl3_ctx_ctrl, | ||
89 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
90 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
91 | .ssl_pending = ssl_undefined_const_function, | ||
92 | .num_ciphers = ssl3_num_ciphers, | ||
93 | .get_cipher = ssl3_get_cipher, | ||
94 | .get_ssl_method = tls1_get_server_method, | ||
95 | .get_timeout = ssl23_default_timeout, | ||
96 | .ssl3_enc = &ssl3_undef_enc_method, | ||
97 | .ssl_version = ssl_undefined_void_function, | ||
98 | .ssl_callback_ctrl = ssl3_callback_ctrl, | ||
99 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, | ||
100 | }; | ||
101 | |||
70 | const SSL_METHOD TLSv1_server_method_data = { | 102 | const SSL_METHOD TLSv1_server_method_data = { |
71 | .version = TLS1_VERSION, | 103 | .version = TLS1_VERSION, |
72 | .ssl_new = tls1_new, | 104 | .ssl_new = tls1_new, |
@@ -163,32 +195,44 @@ const SSL_METHOD TLSv1_2_server_method_data = { | |||
163 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, | 195 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, |
164 | }; | 196 | }; |
165 | 197 | ||
198 | static const SSL_METHOD * | ||
199 | tls1_get_server_method(int ver) | ||
200 | { | ||
201 | if (ver == TLS1_2_VERSION) | ||
202 | return (TLSv1_2_server_method()); | ||
203 | if (ver == TLS1_1_VERSION) | ||
204 | return (TLSv1_1_server_method()); | ||
205 | if (ver == TLS1_VERSION) | ||
206 | return (TLSv1_server_method()); | ||
207 | return (NULL); | ||
208 | } | ||
209 | |||
166 | const SSL_METHOD * | 210 | const SSL_METHOD * |
167 | TLSv1_server_method(void) | 211 | SSLv23_server_method(void) |
168 | { | 212 | { |
169 | return &TLSv1_server_method_data; | 213 | return (TLS_server_method()); |
170 | } | 214 | } |
171 | 215 | ||
172 | const SSL_METHOD * | 216 | const SSL_METHOD * |
173 | TLSv1_1_server_method(void) | 217 | TLS_server_method(void) |
174 | { | 218 | { |
175 | return &TLSv1_1_server_method_data; | 219 | return (&TLS_server_method_data); |
176 | } | 220 | } |
177 | 221 | ||
178 | const SSL_METHOD * | 222 | const SSL_METHOD * |
179 | TLSv1_2_server_method(void) | 223 | TLSv1_server_method(void) |
180 | { | 224 | { |
181 | return &TLSv1_2_server_method_data; | 225 | return (&TLSv1_server_method_data); |
182 | } | 226 | } |
183 | 227 | ||
184 | static const SSL_METHOD * | 228 | const SSL_METHOD * |
185 | tls1_get_server_method(int ver) | 229 | TLSv1_1_server_method(void) |
186 | { | 230 | { |
187 | if (ver == TLS1_2_VERSION) | 231 | return (&TLSv1_1_server_method_data); |
188 | return (TLSv1_2_server_method()); | 232 | } |
189 | if (ver == TLS1_1_VERSION) | 233 | |
190 | return (TLSv1_1_server_method()); | 234 | const SSL_METHOD * |
191 | if (ver == TLS1_VERSION) | 235 | TLSv1_2_server_method(void) |
192 | return (TLSv1_server_method()); | 236 | { |
193 | return (NULL); | 237 | return (&TLSv1_2_server_method_data); |
194 | } | 238 | } |