diff options
author | jsing <> | 2022-03-18 18:01:17 +0000 |
---|---|---|
committer | jsing <> | 2022-03-18 18:01:17 +0000 |
commit | 0e61ffd3664ad47d85cf1ae3ebcbca2c678f3164 (patch) | |
tree | bcf4eae8648772fd8a2b4679eeec559e7b0fb865 | |
parent | 6107421d301da846b3038da564727953439669fc (diff) | |
download | openbsd-0e61ffd3664ad47d85cf1ae3ebcbca2c678f3164.tar.gz openbsd-0e61ffd3664ad47d85cf1ae3ebcbca2c678f3164.tar.bz2 openbsd-0e61ffd3664ad47d85cf1ae3ebcbca2c678f3164.zip |
Simplify SSL_do_handshake().
ok inoguchi@ tb@
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 86142fa46f..6adc28a5e3 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.289 2022/02/06 16:11:58 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.290 2022/03/18 18:01:17 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 | * |
@@ -2566,8 +2566,6 @@ SSL_get_error(const SSL *s, int i) | |||
2566 | int | 2566 | int |
2567 | SSL_do_handshake(SSL *s) | 2567 | SSL_do_handshake(SSL *s) |
2568 | { | 2568 | { |
2569 | int ret = 1; | ||
2570 | |||
2571 | if (s->internal->handshake_func == NULL) { | 2569 | if (s->internal->handshake_func == NULL) { |
2572 | SSLerror(s, SSL_R_CONNECTION_TYPE_NOT_SET); | 2570 | SSLerror(s, SSL_R_CONNECTION_TYPE_NOT_SET); |
2573 | return (-1); | 2571 | return (-1); |
@@ -2575,10 +2573,10 @@ SSL_do_handshake(SSL *s) | |||
2575 | 2573 | ||
2576 | s->method->ssl_renegotiate_check(s); | 2574 | s->method->ssl_renegotiate_check(s); |
2577 | 2575 | ||
2578 | if (SSL_in_init(s) || SSL_in_before(s)) { | 2576 | if (!SSL_in_init(s) && !SSL_in_before(s)) |
2579 | ret = s->internal->handshake_func(s); | 2577 | return 1; |
2580 | } | 2578 | |
2581 | return (ret); | 2579 | return s->internal->handshake_func(s); |
2582 | } | 2580 | } |
2583 | 2581 | ||
2584 | /* | 2582 | /* |