diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-08-27 17:00:22 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-08-27 17:01:56 +0200 |
commit | 964632f37dfdfb914ebc5e49db4fa29af35b1de9 (patch) | |
tree | fbc01c5f9f8496cf64abb9b7bda2aa194644cc53 | |
parent | 9bb4ca9ec8ed504429d582ac3de28aaf8d88b1e8 (diff) | |
download | gnutls-964632f37dfdfb914ebc5e49db4fa29af35b1de9.tar.gz |
ocsp: corrected the comparison of the serial size in OCSP response
Previously the OCSP certificate check wouldn't verify the serial length
and could succeed in cases it shouldn't.
Reported by Stefan Buehler.
-rw-r--r-- | lib/x509/ocsp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c index 92db9b6aad..8181f2e070 100644 --- a/lib/x509/ocsp.c +++ b/lib/x509/ocsp.c @@ -1318,6 +1318,7 @@ gnutls_ocsp_resp_check_crt(gnutls_ocsp_resp_t resp, gnutls_assert(); goto cleanup; } + cserial.size = t; if (rserial.size != cserial.size || memcmp(cserial.data, rserial.data, rserial.size) != 0) { |