MEDIUM: ssl: add 300s supported time skew on OCSP response update.
authorEmeric Brun <ebrun@haproxy.com>
Thu, 19 Jun 2014 12:16:17 +0000 (14:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Jun 2014 12:37:30 +0000 (14:37 +0200)
OCSP_MAX_RESPONSE_TIME_SKEW can be set to a different value at
compilation (default is 300 seconds).

include/common/defaults.h
src/ssl_sock.c

index 0d18281..c53db08 100644 (file)
 #define OCSP_MAX_CERTID_ASN1_LENGTH 128
 #endif
 
+#ifndef OCSP_MAX_RESPONSE_TIME_SKEW
+#define OCSP_MAX_RESPONSE_TIME_SKEW 300
+#endif
 #endif /* _COMMON_DEFAULTS_H */
index e0be9cc..ad4b1ca 100644 (file)
@@ -179,7 +179,7 @@ static int ssl_sock_load_ocsp_response(struct chunk *ocsp_response, struct certi
                goto out;
        }
 
-       rc = OCSP_check_validity(thisupd, nextupd, 0, -1);
+       rc = OCSP_check_validity(thisupd, nextupd, OCSP_MAX_RESPONSE_TIME_SKEW, -1);
        if (!rc) {
                memprintf(err, "OCSP single response: no longer valid.");
                goto out;