BUG/MINOR: ssl: Use 'date' instead of 'now' in ocsp stapling callback

In the OCSP response callback, instead of using the actual date of the
system, the scheduler's 'now' timer is used when checking a response's
validity.

This patch can be backported to all stable versions.
This commit is contained in:
Remi Tricot-Le Breton 2023-03-02 15:49:55 +01:00 committed by William Lallemand
parent 56ab607c40
commit 8c20a74c90

View File

@ -160,7 +160,7 @@ int ssl_sock_ocsp_stapling_cbk(SSL *ssl, void *arg)
if (!ocsp ||
!ocsp->response.area ||
!ocsp->response.data ||
(ocsp->expire < now.tv_sec))
(ocsp->expire < date.tv_sec))
return SSL_TLSEXT_ERR_NOACK;
ssl_buf = OPENSSL_malloc(ocsp->response.data);