Skip to content

Commit 36466b6

Browse files
committed
final updates
1 parent 4913900 commit 36466b6

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

docs/consume-packages/installing-signed-packages.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,35 @@ Signed packages don't require any specific action to be installed; however, if t
1616
1717
## Configure package signature requirements
1818

19-
*NuGet 4.9.0+ and Visual Studio version 15.9 and later on Windows*
19+
> [!Note]
20+
> Requires NuGet 4.9.0+ and Visual Studio version 15.9 and later on Windows
2021
21-
You can configure how NuGet clients validate package signatures by setting the `signatureValidationMode` to `require`.
22+
You can configure how NuGet clients validate package signatures by setting the `signatureValidationMode` to `require` in the [nuget.config](../reference/nuget-config-file) file using the [`nuget config`](../tools/cli-ref-config) command.
23+
24+
```cmd
25+
nuget.exe config -set signatureValidationMode=require
26+
```
2227

2328
```xml
2429
<config>
25-
<add key="signatureValidationMode" value="require" />
30+
<add key="signatureValidationMode" value="require" />
2631
</config>
2732
```
2833

29-
This mode will verify that all packages are signed by any of the certificates trusted in the `nuget.config` file. This file allows you to specify which authors and/or repositories are trusted based on the certificate's fingerprint.
34+
This mode will verify that all packages are signed by any of the certificates trusted in the `nuget.config` file. This file allows you to specify which authors and/or repositories are trusted based on the certificate's fingerprint.
3035

3136
### Trust package author
3237

33-
To trust packages based on the author signature use the `authors` element:
38+
To trust packages based on the author signature use the [`trusted-signers`](..tools/cli-ref-trusted-signers) command to set the `author` property in the nuget.config.
39+
40+
```cmd
41+
nuget.exe trusted-signers Add -Name MyCompanyCert -CertificateFingerprint CE40881FF5F0AD3E58965DA20A9F571EF1651A56933748E1BF1C99E537C4E039 -FingerprintAlgorithm SHA256
42+
```
3443

3544
```xml
3645
<trustedSigners>
3746
<author name="MyCompanyCert">
38-
<certificate fingerprint="AFD34FD..." hashAlgorithm="SHA256" allowUntrustedRoot="false" />
47+
<certificate fingerprint="CE40881FF5F0AD3E58965DA20A9F571EF1651A56933748E1BF1C99E537C4E039" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
3948
</author>
4049
</trustedSigners>
4150
```
@@ -73,9 +82,11 @@ Repository signatures include additional metadata to determine the owners of the
7382
</trustedSigners>
7483
```
7584

85+
If a package has multiple owners, and any one of those owners is in the trusted list, the package installation will succeed.
86+
7687
### Untrusted Root certificates
7788

78-
In some situations you may want to enable signing and verification using certificates that do not chain to a trusted root in the local machine. You can use the `allowUntrustedRoot` attribute to customize this behavior.
89+
In some situations you may want to enable verification using certificates that do not chain to a trusted root in the local machine. You can use the `allowUntrustedRoot` attribute to customize this behavior.
7990

8091
### Sync repository certificates
8192

0 commit comments

Comments
 (0)