You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Copy file name to clipboardExpand all lines: docs/reference/errors-and-warnings/NU3028.md
+5-14Lines changed: 5 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,16 +17,19 @@ f1_keywords:
17
17
<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>
18
18
19
19
### Issue
20
+
20
21
Certificate chain building failed for the timestamp signature. The timestamp signing certificate is untrusted, revoked, or revocation information for the certificate is unavailable.
21
22
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 observedand 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).
23
24
24
25
### Solution
26
+
25
27
Use a trusted and valid certificate. Check internet connectivity.
26
28
27
29
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).
28
30
29
31
#### Revocation check mode
32
+
30
33
> [!Note]
31
34
> This option is available starting from NuGet 4.8.1.
32
35
@@ -40,18 +43,6 @@ When the revocation check mode is set to `offline`, the warning will be downgrad
40
43
41
44
<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>
42
45
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:
...would try up to 4 times (initial try plus 3 retries) with 1 second (1,000 ms) between each try.
54
-
55
46
> [!Note]
56
47
> 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.
Copy file name to clipboardExpand all lines: docs/reference/errors-and-warnings/NU3037.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ A NuGet package signature has expired.
18
18
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.
19
19
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.
20
20
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).
0 commit comments