diff options
| author | doug <> | 2017-08-29 19:20:13 +0000 | 
|---|---|---|
| committer | doug <> | 2017-08-29 19:20:13 +0000 | 
| commit | 5635919e838b12ddb9bac1770b102c0ddfa4795c (patch) | |
| tree | 55509e3bb02d32f97b0b615b7ec29aa9ec8316ac /src | |
| parent | 036af8dc05d5b5185632d7b2ac83304af30455dc (diff) | |
| download | openbsd-5635919e838b12ddb9bac1770b102c0ddfa4795c.tar.gz openbsd-5635919e838b12ddb9bac1770b102c0ddfa4795c.tar.bz2 openbsd-5635919e838b12ddb9bac1770b102c0ddfa4795c.zip | |
When OCSP status type is unknown, ignore the extension.
This needs to skip past the CBS data or it will be treated as a decode
error even though it returns 1.
ok jsing@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_tlsext.c | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c index 6b60ccd27f..340ebeda5c 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.13 2017/08/29 17:24:12 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_tlsext.c,v 1.14 2017/08/29 19:20:13 doug Exp $ */ | 
| 2 | /* | 2 | /* | 
| 3 | * Copyright (c) 2016, 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2016, 2017 Joel Sing <jsing@openbsd.org> | 
| 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> | 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> | 
| @@ -776,6 +776,11 @@ tlsext_ocsp_clienthello_parse(SSL *s, CBS *cbs, int *alert) | |||
| 776 | if (status_type != TLSEXT_STATUSTYPE_ocsp) { | 776 | if (status_type != TLSEXT_STATUSTYPE_ocsp) { | 
| 777 | /* ignore unknown status types */ | 777 | /* ignore unknown status types */ | 
| 778 | s->tlsext_status_type = -1; | 778 | s->tlsext_status_type = -1; | 
| 779 | |||
| 780 | if (!CBS_skip(cbs, CBS_len(cbs))) { | ||
| 781 | *alert = TLS1_AD_INTERNAL_ERROR; | ||
| 782 | return 0; | ||
| 783 | } | ||
| 779 | return 1; | 784 | return 1; | 
| 780 | } | 785 | } | 
| 781 | s->tlsext_status_type = status_type; | 786 | s->tlsext_status_type = status_type; | 
