diff --git a/cups/tls-gnutls.c b/cups/tls-gnutls.c index f7ac74952..ba51d0ca6 100644 --- a/cups/tls-gnutls.c +++ b/cups/tls-gnutls.c @@ -1836,7 +1836,7 @@ _httpTLSStart(http_t *http) // I - Connection to server } } - have_creds = !access(crtfile, R_OK) && !access(keyfile, R_OK); + have_creds = !access(crtfile, R_OK) && !access(keyfile, R_OK) && cupsGetCredentialsExpiration(crtfile) > time(NULL); } if (!have_creds && tls_auto_create && cn) diff --git a/cups/tls-openssl.c b/cups/tls-openssl.c index 6396a03e2..cac26f29b 100644 --- a/cups/tls-openssl.c +++ b/cups/tls-openssl.c @@ -1900,7 +1900,7 @@ _httpTLSStart(http_t *http) // I - Connection to server } } - have_creds = !access(crtfile, R_OK) && !access(keyfile, R_OK); + have_creds = !access(crtfile, R_OK) && !access(keyfile, R_OK) && cupsGetCredentialsExpiration(crtfile) > time(NULL); } if (!have_creds && tls_auto_create && cn)