summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-08-27 17:03:09 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-08-27 17:03:09 +0200
commitc089e019ef83a77b2fdca24d0875ef25f6b38f1a (patch)
tree92739d64ade101ab556d2ea8cc51499455baa456
parent5535cafa6b73c692c3181027f2050e9f3f249c79 (diff)
downloadgnutls-c089e019ef83a77b2fdca24d0875ef25f6b38f1a.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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c
index 4ddaed8d2b..4133e2381f 100644
--- a/lib/x509/ocsp.c
+++ b/lib/x509/ocsp.c
@@ -1257,6 +1257,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) {