Skip to content

Commit

Permalink
housekeeping: Update csproj to net5/6/netcoreapp3.1 (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson authored Sep 28, 2021
1 parent 68de4d7 commit 9940d2f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/GITSMimeSign.Tests/SignVerifyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private static X509Certificate2 Generate()
var serialNumber = new byte[8];
RandomNumberGenerator.Fill(serialNumber);
var now = DateTimeOffset.UtcNow;
var cert = request.Create(caFakeIssuer, now, now.AddDays(90), serialNumber);
var cert = request.Create(caFakeIssuer, now.AddDays(-1), now.AddDays(90), serialNumber);

var temp = cert.CopyWithPrivateKey(rsa);

Expand All @@ -101,7 +101,7 @@ private static X509Certificate2 GenerateCA(string subject)
new X509BasicConstraintsExtension(true, false, 0, true));

var now = DateTimeOffset.UtcNow;
return request.CreateSelfSigned(now, now.AddDays(90));
return request.CreateSelfSigned(now.AddDays(-2), now.AddDays(91));
}
}
}
2 changes: 2 additions & 0 deletions src/GITSMimeSign.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DBF691BE-CCA4-4C4E-A920-68AE7E22C4ED}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
..\.github\workflows\ci-build.yml = ..\.github\workflows\ci-build.yml
Directory.Build.props = Directory.Build.props
Directory.build.targets = Directory.build.targets
global.json = global.json
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
..\version.json = ..\version.json
EndProjectSection
EndProject
Expand Down
2 changes: 1 addition & 1 deletion src/GITSMimeSign/Actions/SignAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ internal static async Task<int> PerformSign(X509Certificate2 certificate, byte[]
cms.ComputeSignature(signer, false);

// If we are provided with a authority, add the timestamp certificate into our unsigned attributes.
if (timeStampAuthority != null)
if (timeStampAuthority is not null)
{
InfoOutputHelper.WriteLine("Stamping with RFC 3161 Time Stamp Authority: " + timeStampAuthority);
await TimeStamper.GetAndSetRfc3161Timestamp(cms, timeStampAuthority).ConfigureAwait(false);
Expand Down
3 changes: 2 additions & 1 deletion src/GITSMimeSign/GitSMimeSign.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<OutputType>Exe</OutputType>
<PackageId>GitSMimeSign</PackageId>
<PackAsTool>true</PackAsTool>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<ToolCommandName>gitsmimesign</ToolCommandName>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 9940d2f

Please sign in to comment.