dotnet / sign

Code Signing CLI tool supporting Authenticode, NuGet, VSIX, and ClickOnce
MIT License
439 stars 84 forks source link

Add command to download/export certificates from Trusted Signing #732

Open mjcheetham opened 4 days ago

mjcheetham commented 4 days ago

Add a new command export to the CLI that allows users to export a certificate (the public parts) from, initially, just the Trusted Signing service to a file on disk. This is particularly useful for users who need a copy of the latest Trusted Signing certificate to upload to a third-party service such as NuGet.org to allow verification of the signed packages that are published there.

This pull request is organised in three commits that can be reviewed individually and are as follows:

  1. Extract a base class from the TrustedSigningCommand to allow sharing of options for Trusted Signing account info.

  2. Add (I)Exporter that can export a certificate to a file on disk from a certificate provider.

  3. Add an implementation for the export certificate command for Trusted Signing.

Open questions

Alternative implementations