From c0e80a44635a6cd962d12514419709030eb1dbeb Mon Sep 17 00:00:00 2001 From: Artem Skriabin Date: Tue, 25 Jun 2024 16:01:17 +0300 Subject: [PATCH] Use current time 2019 year to test old certificate --- internal/service/api/handlers/create_identity.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/service/api/handlers/create_identity.go b/internal/service/api/handlers/create_identity.go index 6e3eb62..f84c8ae 100644 --- a/internal/service/api/handlers/create_identity.go +++ b/internal/service/api/handlers/create_identity.go @@ -486,7 +486,8 @@ func validateCert(cert *x509.Certificate, masterCertsPem []byte) error { roots.AppendCertsFromPEM(masterCertsPem) foundCerts, err := cert.Verify(x509.VerifyOptions{ - Roots: roots, + Roots: roots, + CurrentTime: time.Unix(1561467563, 0), // Tuesday, June 25, 2019 12:59:23 }) if err != nil { return fmt.Errorf("invalid certificate: %w", err)