-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for signing NuGet packages before publishing. (#70)
Both Azure Key Vault and Azure Trusted Signing are supported as certificate sources, using 'dotnet sign' for the signing implementation.
- Loading branch information
Showing
5 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace Faithlife.Build; | ||
|
||
/// <summary> | ||
/// Settings for signing packages using Azure Key Vault. | ||
/// </summary> | ||
public sealed class AzureKeyVaultSigningSettings | ||
{ | ||
/// <summary> | ||
/// The Azure Key Vault URL. | ||
/// </summary> | ||
public Uri? KeyVaultUrl { get; set; } | ||
|
||
/// <summary> | ||
/// The Azure Key Vault certificate name. | ||
/// </summary> | ||
public string? CertificateName { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Faithlife.Build; | ||
|
||
/// <summary> | ||
/// Settings for signing NuGet packages. | ||
/// </summary> | ||
/// <remarks>Only one of <see cref="TrustedSigningSettings"/> or <see cref="AzureKeyVaultSettings"/> must to specify the certificate to use for signing.</remarks> | ||
public sealed class DotNetSigningSettings | ||
{ | ||
/// <summary> | ||
/// Settings for signing packages using Azure Trusted Signing. | ||
/// </summary> | ||
public TrustedSigningSettings? TrustedSigningSettings { get; set; } | ||
|
||
/// <summary> | ||
/// Settings for signing packages using a certificate stored in Azure Key Vault. | ||
/// </summary> | ||
public AzureKeyVaultSigningSettings? AzureKeyVaultSettings { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace Faithlife.Build; | ||
|
||
/// <summary> | ||
/// Settings for signing packages using Azure Trusted Signing. | ||
/// </summary> | ||
/// <remarks>For more information, see <a href="https://learn.microsoft.com/en-us/azure/trusted-signing/overview">What is Trusted Signing?</a></remarks> | ||
public sealed class TrustedSigningSettings | ||
{ | ||
/// <summary> | ||
/// The Trusted Signing Account endpoint. The value must be a URI that aligns to the region that your Trusted Signing Account and Certificate Profile were created in. | ||
/// </summary> | ||
public Uri? EndpointUrl { get; set; } | ||
|
||
/// <summary> | ||
/// The Trusted Signing Account name. | ||
/// </summary> | ||
public string? Account { get; set; } | ||
|
||
/// <summary> | ||
/// The Certificate Profile name. | ||
/// </summary> | ||
public string? CertificateProfile { get; set; } | ||
} |