diff --git a/src/Bones.X509/X509CertificateHelper.cs b/src/Bones.X509/X509CertificateHelper.cs index 4852d1f..db6e2fe 100644 --- a/src/Bones.X509/X509CertificateHelper.cs +++ b/src/Bones.X509/X509CertificateHelper.cs @@ -94,7 +94,7 @@ public static X509Certificate2 CreateLeaf(this X509Certificate2 cert, string com var notBefore = DateTimeOffset.UtcNow.AddDays(-1); if (notBefore < cert.NotBefore) notBefore = new DateTimeOffset(cert.NotBefore); - var notAfter = DateTimeOffset.UtcNow.AddYears(2); + var notAfter = DateTimeOffset.UtcNow.AddYears(year); if (notAfter > cert.NotAfter) notAfter = new DateTimeOffset(cert.NotAfter); req.CertificateExtensions.Add(