]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: ocsp response with 'revoked' status is correct
authorEmmanuel Hocdet <manu@gandi.net>
Tue, 10 Oct 2017 13:18:52 +0000 (15:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 22 Oct 2017 08:01:26 +0000 (10:01 +0200)
ocsp_status can be 'good', 'revoked', or 'unknown'. 'revoked' status
is a correct status and should not be dropped.
In case of certificate with OCSP must-stapling extension, response with
'revoked' status must be provided as well as 'good' status.

This patch can be backported in 1.7, 1.6 and 1.5.

src/ssl_sock.c

index 6096f4608ad935ba086cd903d767d2410ae447bd..7b8570c7490d2d8d8ea88976c43cd652cdb9d0c0 100644 (file)
@@ -621,8 +621,8 @@ static int ssl_sock_load_ocsp_response(struct chunk *ocsp_response, struct certi
        id = (OCSP_CERTID*)OCSP_SINGLERESP_get0_id(sr);
 
        rc = OCSP_single_get0_status(sr, &reason, &revtime, &thisupd, &nextupd);
-       if (rc != V_OCSP_CERTSTATUS_GOOD) {
-               memprintf(err, "OCSP single response: certificate status not good");
+       if (rc == V_OCSP_CERTSTATUS_UNKNOWN) {
+               memprintf(err, "OCSP single response: certificate status is unknown");
                goto out;
        }