diff options
Diffstat (limited to 'src/usr.bin')
-rw-r--r-- | src/usr.bin/openssl/s_server.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/usr.bin/openssl/s_server.c b/src/usr.bin/openssl/s_server.c index 5ef801ad95..61b70a5569 100644 --- a/src/usr.bin/openssl/s_server.c +++ b/src/usr.bin/openssl/s_server.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s_server.c,v 1.10 2015/04/14 12:56:36 jsing Exp $ */ | 1 | /* $OpenBSD: s_server.c,v 1.11 2015/06/15 05:16:56 doug 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 | * |
@@ -226,7 +226,6 @@ static int s_quiet = 0; | |||
226 | static char *keymatexportlabel = NULL; | 226 | static char *keymatexportlabel = NULL; |
227 | static int keymatexportlen = 20; | 227 | static int keymatexportlen = 20; |
228 | 228 | ||
229 | static int hack = 0; | ||
230 | #ifndef OPENSSL_NO_ENGINE | 229 | #ifndef OPENSSL_NO_ENGINE |
231 | static char *engine_id = NULL; | 230 | static char *engine_id = NULL; |
232 | #endif | 231 | #endif |
@@ -263,7 +262,6 @@ s_server_init(void) | |||
263 | s_debug = 0; | 262 | s_debug = 0; |
264 | s_msg = 0; | 263 | s_msg = 0; |
265 | s_quiet = 0; | 264 | s_quiet = 0; |
266 | hack = 0; | ||
267 | #ifndef OPENSSL_NO_ENGINE | 265 | #ifndef OPENSSL_NO_ENGINE |
268 | engine_id = NULL; | 266 | engine_id = NULL; |
269 | #endif | 267 | #endif |
@@ -776,8 +774,6 @@ s_server_main(int argc, char *argv[]) | |||
776 | } | 774 | } |
777 | else if (strcmp(*argv, "-msg") == 0) { | 775 | else if (strcmp(*argv, "-msg") == 0) { |
778 | s_msg = 1; | 776 | s_msg = 1; |
779 | } else if (strcmp(*argv, "-hack") == 0) { | ||
780 | hack = 1; | ||
781 | } else if (strcmp(*argv, "-state") == 0) { | 777 | } else if (strcmp(*argv, "-state") == 0) { |
782 | state = 1; | 778 | state = 1; |
783 | } else if (strcmp(*argv, "-crlf") == 0) { | 779 | } else if (strcmp(*argv, "-crlf") == 0) { |
@@ -1029,8 +1025,6 @@ bad: | |||
1029 | SSL_CTX_set_quiet_shutdown(ctx, 1); | 1025 | SSL_CTX_set_quiet_shutdown(ctx, 1); |
1030 | if (bugs) | 1026 | if (bugs) |
1031 | SSL_CTX_set_options(ctx, SSL_OP_ALL); | 1027 | SSL_CTX_set_options(ctx, SSL_OP_ALL); |
1032 | if (hack) | ||
1033 | SSL_CTX_set_options(ctx, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG); | ||
1034 | SSL_CTX_set_options(ctx, off); | 1028 | SSL_CTX_set_options(ctx, off); |
1035 | /* | 1029 | /* |
1036 | * DTLS: partial reads end up discarding unread UDP bytes :-( Setting | 1030 | * DTLS: partial reads end up discarding unread UDP bytes :-( Setting |
@@ -1088,8 +1082,6 @@ bad: | |||
1088 | SSL_CTX_set_quiet_shutdown(ctx2, 1); | 1082 | SSL_CTX_set_quiet_shutdown(ctx2, 1); |
1089 | if (bugs) | 1083 | if (bugs) |
1090 | SSL_CTX_set_options(ctx2, SSL_OP_ALL); | 1084 | SSL_CTX_set_options(ctx2, SSL_OP_ALL); |
1091 | if (hack) | ||
1092 | SSL_CTX_set_options(ctx2, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG); | ||
1093 | SSL_CTX_set_options(ctx2, off); | 1085 | SSL_CTX_set_options(ctx2, off); |
1094 | /* | 1086 | /* |
1095 | * DTLS: partial reads end up discarding unread UDP bytes :-( | 1087 | * DTLS: partial reads end up discarding unread UDP bytes :-( |
@@ -1811,26 +1803,6 @@ www_body(char *hostname, int s, unsigned char *context) | |||
1811 | SSL_set_msg_callback_arg(con, bio_s_out); | 1803 | SSL_set_msg_callback_arg(con, bio_s_out); |
1812 | } | 1804 | } |
1813 | for (;;) { | 1805 | for (;;) { |
1814 | if (hack) { | ||
1815 | i = SSL_accept(con); | ||
1816 | switch (SSL_get_error(con, i)) { | ||
1817 | case SSL_ERROR_NONE: | ||
1818 | break; | ||
1819 | case SSL_ERROR_WANT_WRITE: | ||
1820 | case SSL_ERROR_WANT_READ: | ||
1821 | case SSL_ERROR_WANT_X509_LOOKUP: | ||
1822 | continue; | ||
1823 | case SSL_ERROR_SYSCALL: | ||
1824 | case SSL_ERROR_SSL: | ||
1825 | case SSL_ERROR_ZERO_RETURN: | ||
1826 | ret = 1; | ||
1827 | goto err; | ||
1828 | /* break; */ | ||
1829 | } | ||
1830 | |||
1831 | SSL_renegotiate(con); | ||
1832 | SSL_write(con, NULL, 0); | ||
1833 | } | ||
1834 | i = BIO_gets(io, buf, bufsize - 1); | 1806 | i = BIO_gets(io, buf, bufsize - 1); |
1835 | if (i < 0) { /* error */ | 1807 | if (i < 0) { /* error */ |
1836 | if (!BIO_should_retry(io)) { | 1808 | if (!BIO_should_retry(io)) { |