Skip to content

Commit

Permalink
Add GetSignedFileSubject
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Dec 5, 2024
1 parent 943b53c commit f2d361a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Tests
- Test `AzureKeyVaultConfig` with `AZURE_KEY_VAULT_FILE` environment variable.
- Test `NuGetKeyVaultSignTool` in a package.
- Test `AzureSignTool` in a assembly file.
- Test `AzureSignTool` in a assembly file, show subject with `GetSignedFileSubject`.

[vNext]: ../../compare/1.0.0...HEAD
[1.0.0]: ../../compare/1.0.0
7 changes: 7 additions & 0 deletions Nuke.NuGetKeyVaultSignTool/AzureSignToolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ public void SignFile(string fileName)
Console.WriteLine($"{fileName} - {fileLengthSigned} {fileLength}");

Assert.Greater(fileLengthSigned, fileLength);

Console.WriteLine(GetSignedFileSubject(fileName));
}

private string GetSignedFileSubject(string fileName)
{
return System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile(fileName).Subject;
}
}
}

0 comments on commit f2d361a

Please sign in to comment.