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
title: "Breaking change - SHA-1 fingerprint support deprecated in dotnet nuget sign"
3
+
description: "Learn about the breaking change in .NET 10 where SHA-1 fingerprint support is deprecated in dotnet nuget sign command, promoting NU3043 warning to error."
# SHA-1 fingerprint support deprecated in `dotnet nuget sign`
10
+
11
+
Starting in .NET 10, the [NU3043](/nuget/reference/errors-and-warnings/nu3043) warning is promoted to an error when using SHA-1 fingerprints with the [`dotnet nuget sign` command](../../../tools/dotnet-nuget-sign.md). This change enforces the use of only strong, approved hash algorithms (SHA-2 family) for signing operations.
12
+
13
+
## Version introduced
14
+
15
+
.NET 10 Preview 1
16
+
17
+
## Previous behavior
18
+
19
+
In .NET 9 SDK, the `dotnet nuget sign` command accepted certificate fingerprints using SHA-1 and SHA-2 family algorithms (SHA256, SHA384, SHA512). If a SHA-1 fingerprint was used, a warning (NU3043) was issued, indicating the use of an insecure hashing algorithm, but the operation continued successfully.
20
+
21
+
## New behavior
22
+
23
+
Starting in .NET 10, the NU3043 warning is elevated to an error. This change blocks the use of SHA-1 fingerprints with the `--certificate-fingerprint` option in the `dotnet nuget sign` command, improving overall signing security.
24
+
25
+
## Type of breaking change
26
+
27
+
This is a [behavioral change](../../categories.md#behavioral-change).
28
+
29
+
## Reason for change
30
+
31
+
This change was made to enforce stronger security standards by disallowing the use of SHA-1 for certificate fingerprinting. SHA-1 is considered cryptographically weak and vulnerable to collision attacks.
32
+
33
+
## Recommended action
34
+
35
+
Update the usage of `dotnet nuget sign` to use fingerprints from the SHA-2 family only:
Copy file name to clipboardExpand all lines: docs/core/tools/dotnet-nuget-sign.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: dotnet nuget sign command
3
3
description: The dotnet nuget sign command signs all the packages matching the first argument with a certificate.
4
4
author: heng-liu
5
-
ms.date: 07/07/2021
5
+
ms.date: 08/11/2025
6
6
---
7
7
# dotnet nuget sign
8
8
@@ -36,8 +36,8 @@ dotnet nuget sign -h|--help
36
36
37
37
The `dotnet nuget sign` command signs all the packages matching the first argument with a certificate. The certificate with the private key can be obtained from a file or from a certificate installed in a certificate store by providing a subject name or a SHA-1 fingerprint.
38
38
39
-
> [!NOTE]
40
-
> This command requires a certificate root store that is valid for both code signing and timestamping. Also, this command may not be supported on some combinations of operating system and .NET SDK. For more information, see [NuGet signed package verification](nuget-signed-package-verification.md).
39
+
> [!NOTE]
40
+
> This command requires a certificate root store that's valid for both code signing and timestamping. Also, this command might not be supported on some combinations of operating system and .NET SDK. For more information, see [NuGet signed package verification](nuget-signed-package-verification.md).
41
41
42
42
## Arguments
43
43
@@ -73,10 +73,9 @@ The `dotnet nuget sign` command signs all the packages matching the first argume
73
73
74
74
Specifies the fingerprint of the certificate used to search a local certificate store for the certificate.
75
75
76
-
Starting with .NET 9, this option can be used to specify the SHA-1, SHA-256, SHA-384, or SHA-512 fingerprint of the certificate.
77
-
However, a `NU3043` warning is raised when a SHA-1 certificate fingerprint is used because it is no longer considered secure.
76
+
Starting with .NET 9, this option can be used to specify the SHA-1, SHA-256, SHA-384, or SHA-512 fingerprint of the certificate. However, a `NU3043` warning is raised when a SHA-1 certificate fingerprint is used because it's no longer considered secure. In .NET 10 and later versions, [the warning is elevated to an error](../compatibility/sdk/10.0/dotnet-nuget-sign-sha1-deprecated.md). Only SHA-2 family fingerprints (SHA-256, SHA-384, and SHA-512) are supported.
78
77
79
-
All the previous versions of the .NET SDK continue to accept only SHA-1 certificate fingerprint.
78
+
All pre-.NET 9 versions of the .NET SDK continue to accept only SHA-1 certificate fingerprint.
80
79
81
80
-**`--certificate-password <PASSWORD>`**
82
81
@@ -123,10 +122,10 @@ The `dotnet nuget sign` command signs all the packages matching the first argume
- Sign *foo.nupkg* with certificate (password protected) matches with the specified SHA-1 fingerprint in the default certificate store (CurrentUser\My):
125
+
- Sign *foo.nupkg* with certificate (password protected) matches with the specified SHA-256 fingerprint in the default certificate store (CurrentUser\My):
- Sign *foo.nupkg* with certificate (password protected) matches with the specified subject name :::no-loc text="\"Test certificate for testing signing\""::: in the default certificate store (CurrentUser\My):
@@ -135,10 +134,10 @@ The `dotnet nuget sign` command signs all the packages matching the first argume
0 commit comments