Skip to content

Commit 74a3ba1

Browse files
authored
Update NU3028/NU3037 documentation (#3131)
Resolve https://github.com/NuGet/docs.microsoft.com-nuget/issues/3130.
1 parent 64ed382 commit 74a3ba1

File tree

4 files changed

+41
-15
lines changed

4 files changed

+41
-15
lines changed

docs/TOC.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
### [Create a package with COM interop assemblies](create-packages/author-packages-with-COM-interop-assemblies.md)
5959
## Sign packages
6060
### [Sign a package](create-packages/sign-a-package.md)
61-
### [Signed package signatures and requirements](reference/signed-packages-reference.md)
61+
### [Signed-package signatures and requirements](reference/signed-packages-reference.md)
62+
### [Signed-package verification options](reference/Signed-Package-Verification-Options.md)
6263
# Publish packages
6364
## Publish to NuGet.org
6465
### [Publish a package](nuget-org/publish-a-package.md)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: NuGet Signed-Package Verification Options
3+
description: Options for NuGet signed-package verification
4+
author: dtivel
5+
ms.author: dtivel
6+
ms.date: 09/01/2023
7+
ms.topic: reference
8+
---
9+
10+
# NuGet signed-package verification options
11+
12+
## Retry untrusted root failures
13+
14+
> [!Note]
15+
> This issue only applies to Windows for root certificates in the [Microsoft Trusted Root Program](https://aka.ms/RootCert).
16+
17+
During certificate chain building, Windows fetches relevant 3rd party root certificates on first use and adds them as locally trusted root certificates. Internally, Windows initiates this network fetch with an RPC call, and if the system is sufficiently busy, this RPC call may fail. This failure results in the root certificate not being locally trusted. This issue may occur the first time a root certificate is observed, but once the root certificate has been locally trusted, the issue will not recur for that certificate. Typically, chain building will succeed with retries.
18+
19+
For NuGet users, symptoms of this issue are that the NuGet operation will typically succeed on retry and either of the following:
20+
21+
* [NU3028](errors-and-warnings/NU3028.md) with a message like "A certification chain processed correctly but terminated in a root certificate that is not trusted by the trust provider."
22+
* [NU3037](errors-and-warnings/NU3037.md) with a message like "The repository primary signature validity period has expired."
23+
24+
> [!Note]
25+
> This option is available starting from NuGet 6.0.0 and only applies to the Windows-specific failure described above. The option does not apply to any other scenario and has no effect on Linux or macOS.
26+
27+
You can opt-in to an experimental, automatic retry for untrusted root failures on Windows by setting an environment variable named `NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY` with a value consisting of 2 comma-delimited positive integers representing retry count and sleep interval in milliseconds, respectively. There are no default values; you need to pick retry values that are sensible for you.
28+
29+
For example, setting the environment variable to a value of `3,1000` like so:
30+
31+
<pre>set NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY=3,1000</pre>
32+
33+
...would try up to 4 times (initial try plus 3 retries) with 1 second (1,000 ms) between each try.

docs/reference/errors-and-warnings/NU3028.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,19 @@ f1_keywords:
1717
<pre>The author primary signature's timestamp found a chain building issue: The revocation function was unable to check revocation because the revocation server could not be reached. For more information, visit https://aka.ms/certificateRevocationMode</pre>
1818

1919
### Issue
20+
2021
Certificate chain building failed for the timestamp signature. The timestamp signing certificate is untrusted, revoked, or revocation information for the certificate is unavailable.
2122

22-
On Windows only, this issue may occur the first time a root certificate is observed. During certificate chain building, Windows fetches relevant 3rd party root certificates on first use and adds them as locally trusted root certificates. Internally, Windows initiates this network fetch with an RPC call, and if the system is sufficiently busy, this RPC call may fail. This failure results in the root certificate not being locally trusted. For NuGet users, the resulting error is "A certification chain processed correctly but terminated in a root certificate that is not trusted by the trust provider."
23+
On Windows only, NU3028 may occur the first time a root certificate is observed and with the message "A certification chain processed correctly but terminated in a root certificate that is not trusted by the trust provider." If the issue is resolved with retries, [there is an option which may help](../Signed-Package-Verification-Options.md#retry-untrusted-root-failures).
2324

2425
### Solution
26+
2527
Use a trusted and valid certificate. Check internet connectivity.
2628

2729
For Linux and macOS, see [NuGet signed-package verification](/dotnet/core/tools/nuget-signed-package-verification). Specifically for untrusted root certificate warnings/errors on Linux and macOS, also see [NU3042](NU3042.md).
2830

2931
#### Revocation check mode
32+
3033
> [!Note]
3134
> This option is available starting from NuGet 4.8.1.
3235
@@ -40,18 +43,6 @@ When the revocation check mode is set to `offline`, the warning will be downgrad
4043

4144
<pre>The author primary signature's timestamp found a chain building issue: The revocation function was unable to check revocation because the certificate is not available in the cached certificate revocation list and NUGET_CERT_REVOCATION_MODE environment variable has been set to offline. For more information, visit https://aka.ms/certificateRevocationMode.</pre>
4245

43-
#### Retry untrusted root failures
44-
> [!Note]
45-
> This option is available starting from NuGet 6.0.0 Preview 5 and only applies to the Windows-specific failure described in the [Issue](#issue) section.
46-
47-
Retrying will typically succeed. You can opt-in to an experimental, automatic retry for untrusted root failures on Windows by setting an environment variable named `NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY` with a value consisting of 2 comma-delimited positive integers representing retry count and sleep interval in milliseconds, respectively. There are no default values; you need to pick retry values that are sensible for you.
48-
49-
For example, setting the environment variable to a value of `3,1000` like so:
50-
51-
<pre>set NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY=3,1000</pre>
52-
53-
...would try up to 4 times (initial try plus 3 retries) with 1 second (1,000 ms) between each try.
54-
5546
> [!Note]
5647
> NU3028 is raised as an error in most cases.
57-
> When NuGet’s [signature validation mode](../../consume-packages/installing-signed-packages.md#configure-package-signature-requirements) is set to accept (default), NU3028 is raised as a warning in some cases.
48+
> When NuGet’s [signature validation mode](../../consume-packages/installing-signed-packages.md#configure-package-signature-requirements) is set to accept (default), NU3028 is raised as a warning in some cases.

docs/reference/errors-and-warnings/NU3037.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ A NuGet package signature has expired.
1818
A package signature shares the same validity period as the certificate used to generate the signature. A package signature is invalid outside of that validity period.
1919
To ensure long-term validity --- even beyond the signing certificate’s validity period --- a package signature should be timestamped with a trusted timestamp. Trusted timestamps must be added while a package signature is still valid and not expired.
2020

21+
On Windows only, NU3037 may occur the first time a root certificate is observed and with the message "The repository primary signature validity period has expired." If the issue is resolved with retries, [there is an option which may help](../Signed-Package-Verification-Options.md#retry-untrusted-root-failures).
2122

2223
### Solution
2324

0 commit comments

Comments
 (0)