diff options
| author | tb <> | 2020-05-23 12:52:54 +0000 |
|---|---|---|
| committer | tb <> | 2020-05-23 12:52:54 +0000 |
| commit | 0cc3e8df7b9aba3df87c3ae71630950a0b4c8f9e (patch) | |
| tree | b7ddb282ade1580be6b6d1443dfde0d4e185a5bd /src | |
| parent | de1e10da3eb6812988b91a8bc92946265f684aa5 (diff) | |
| download | openbsd-0cc3e8df7b9aba3df87c3ae71630950a0b4c8f9e.tar.gz openbsd-0cc3e8df7b9aba3df87c3ae71630950a0b4c8f9e.tar.bz2 openbsd-0cc3e8df7b9aba3df87c3ae71630950a0b4c8f9e.zip | |
In ssl_lib.c revision 1.217, jsing enabled SSL_MODE_AUTO_RETRY by
default. To avoid hanging on a blocking read, we need to clear the
SSL_MODE_AUTO_RETRY flag in the s_client and the s_server.
ok beck inoguchi jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.bin/openssl/s_client.c | 5 | ||||
| -rw-r--r-- | src/usr.bin/openssl/s_server.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/s_client.c b/src/usr.bin/openssl/s_client.c index 88b098286a..cc886b11e6 100644 --- a/src/usr.bin/openssl/s_client.c +++ b/src/usr.bin/openssl/s_client.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s_client.c,v 1.45 2020/05/22 16:11:23 deraadt Exp $ */ | 1 | /* $OpenBSD: s_client.c,v 1.46 2020/05/23 12:52:54 tb 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 | * |
| @@ -653,6 +653,9 @@ s_client_main(int argc, char **argv) | |||
| 653 | ERR_print_errors(bio_err); | 653 | ERR_print_errors(bio_err); |
| 654 | goto end; | 654 | goto end; |
| 655 | } | 655 | } |
| 656 | |||
| 657 | SSL_CTX_clear_mode(ctx, SSL_MODE_AUTO_RETRY); | ||
| 658 | |||
| 656 | if (vpm) | 659 | if (vpm) |
| 657 | SSL_CTX_set1_param(ctx, vpm); | 660 | SSL_CTX_set1_param(ctx, vpm); |
| 658 | 661 | ||
diff --git a/src/usr.bin/openssl/s_server.c b/src/usr.bin/openssl/s_server.c index e0838b2b50..dbf59ad854 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.36 2020/05/23 09:02:02 tb Exp $ */ | 1 | /* $OpenBSD: s_server.c,v 1.37 2020/05/23 12:52:54 tb 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 | * |
| @@ -968,6 +968,8 @@ s_server_main(int argc, char *argv[]) | |||
| 968 | goto end; | 968 | goto end; |
| 969 | } | 969 | } |
| 970 | 970 | ||
| 971 | SSL_CTX_clear_mode(ctx, SSL_MODE_AUTO_RETRY); | ||
| 972 | |||
| 971 | if (!SSL_CTX_set_min_proto_version(ctx, min_version)) | 973 | if (!SSL_CTX_set_min_proto_version(ctx, min_version)) |
| 972 | goto end; | 974 | goto end; |
| 973 | if (!SSL_CTX_set_max_proto_version(ctx, max_version)) | 975 | if (!SSL_CTX_set_max_proto_version(ctx, max_version)) |
