diff options
author | tb <> | 2020-09-01 05:32:11 +0000 |
---|---|---|
committer | tb <> | 2020-09-01 05:32:11 +0000 |
commit | 9a896a8c68a5bbc7e0c50b709ff9c34e5453473e (patch) | |
tree | a89badeedfb5b8d164eaebe6f37737ae75e06e2c /src/lib/libssl/ssl_locl.h | |
parent | f9f2c6158d37416abbdd6c8cdf77912181bbbefc (diff) | |
download | openbsd-9a896a8c68a5bbc7e0c50b709ff9c34e5453473e.tar.gz openbsd-9a896a8c68a5bbc7e0c50b709ff9c34e5453473e.tar.bz2 openbsd-9a896a8c68a5bbc7e0c50b709ff9c34e5453473e.zip |
simplify tls1_process_ticket() exit path
tls1_process_ticket() - the only caller of tls_decrypt_ticket() - ends
in a switch over the return value of tls_decrypt_ticket() to decide
whether or not to set s->internal->tlsext_ticket_expected = 1.
Since tls_decrypt_ticket() already knows what it will return and
partly bases its decision on what to return on whether or not the
ticket needs to be renewed, it can also take care of setting this flag.
This way we don't need to have a confusing switch that conflates some
return values and sets this flag. Moreover, we can get rid of the ugly
TLS1_TICKET_DECRYPTED_RENEW whose only purpose is to signal that the
flag should be set.
ok jsing
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 18ff5b0c30..2f8ba1fc09 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.286 2020/08/31 14:34:01 tb Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.287 2020/09/01 05:32:11 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 | * |
@@ -1402,7 +1402,6 @@ int ssl_check_serverhello_tlsext(SSL *s); | |||
1402 | #define TLS1_TICKET_EMPTY 1 | 1402 | #define TLS1_TICKET_EMPTY 1 |
1403 | #define TLS1_TICKET_NOT_DECRYPTED 2 | 1403 | #define TLS1_TICKET_NOT_DECRYPTED 2 |
1404 | #define TLS1_TICKET_DECRYPTED 3 | 1404 | #define TLS1_TICKET_DECRYPTED 3 |
1405 | #define TLS1_TICKET_DECRYPTED_RENEW 4 | ||
1406 | 1405 | ||
1407 | int tls1_process_ticket(SSL *s, CBS *session_id, CBS *ext_block, | 1406 | int tls1_process_ticket(SSL *s, CBS *session_id, CBS *ext_block, |
1408 | int *alert, SSL_SESSION **ret); | 1407 | int *alert, SSL_SESSION **ret); |