Skip to content

Commit

Permalink
add year param to leaf generator
Browse files Browse the repository at this point in the history
  • Loading branch information
gballigand committed Nov 3, 2023
1 parent e2e36e0 commit c51090c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bones.X509/X509CertificateHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c51090c

Please sign in to comment.