From: Nikos Mavrogiannopoulos Date: Sat, 27 Aug 2016 15:00:22 +0000 (+0200) Subject: ocsp: corrected the comparison of the serial size in OCSP response X-Git-Tag: gnutls_3_5_4~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=964632f37dfdfb914ebc5e49db4fa29af35b1de9;p=thirdparty%2Fgnutls.git 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. --- 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) {