diff options
| author | tb <> | 2020-08-03 19:43:16 +0000 |
|---|---|---|
| committer | tb <> | 2020-08-03 19:43:16 +0000 |
| commit | b93f3e3ae34136250d6b92c4f5ec53c979356419 (patch) | |
| tree | 9eceec5a51a5796906bdf0dff81ee9af80d35dec /src | |
| parent | e9cd27a8fe1871d70e7986a755c746f3c3bfbca9 (diff) | |
| download | openbsd-b93f3e3ae34136250d6b92c4f5ec53c979356419.tar.gz openbsd-b93f3e3ae34136250d6b92c4f5ec53c979356419.tar.bz2 openbsd-b93f3e3ae34136250d6b92c4f5ec53c979356419.zip | |
Ensure clients only send a status_request in the CH
The current code might cause a client to send a status_request
containing a CertificateStatusRequest with its certificate. This
makes no sense.
Pointed out by Michael Forney
ok inoguchi jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/ssl_tlsext.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c index 1dba9849a1..920d026fff 100644 --- a/src/lib/libssl/ssl_tlsext.c +++ b/src/lib/libssl/ssl_tlsext.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_tlsext.c,v 1.79 2020/08/03 19:27:57 tb Exp $ */ | 1 | /* $OpenBSD: ssl_tlsext.c,v 1.80 2020/08/03 19:43:16 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> | 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> |
| @@ -853,8 +853,12 @@ tlsext_sni_client_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) | |||
| 853 | int | 853 | int |
| 854 | tlsext_ocsp_client_needs(SSL *s, uint16_t msg_type) | 854 | tlsext_ocsp_client_needs(SSL *s, uint16_t msg_type) |
| 855 | { | 855 | { |
| 856 | return (s->tlsext_status_type == TLSEXT_STATUSTYPE_ocsp && | 856 | if (SSL_IS_DTLS(s)) |
| 857 | s->version != DTLS1_VERSION); | 857 | return 0; |
| 858 | if (msg_type != SSL_TLSEXT_MSG_CH) | ||
| 859 | return 0; | ||
| 860 | |||
| 861 | return (s->tlsext_status_type == TLSEXT_STATUSTYPE_ocsp); | ||
| 858 | } | 862 | } |
| 859 | 863 | ||
| 860 | int | 864 | int |
