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 warning is promoted to an error when using SHA-1 fingerprints with the `dotnet nuget sign` command. 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 with .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
+
To enforce stronger security standards by disallowing the use of SHA-1 for certificate fingerprinting, which 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:
36
+
37
+
-**SHA256** (recommended)
38
+
-**SHA384**
39
+
-**SHA512**
40
+
41
+
SHA-1 fingerprints must be removed or replaced to avoid NU3043 errors in .NET 10+.
42
+
43
+
To generate SHA-256 fingerprints for certificates, you can use PowerShell:
Copy file name to clipboardExpand all lines: docs/core/tools/dotnet-nuget-sign.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,8 @@ The `dotnet nuget sign` command signs all the packages matching the first argume
76
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
77
However, a `NU3043` warning is raised when a SHA-1 certificate fingerprint is used because it is no longer considered secure.
78
78
79
+
Starting with .NET 10, the `NU3043` warning is promoted to an error when using SHA-1 fingerprints, effectively blocking the use of SHA-1 for signing operations. Only SHA-2 family fingerprints (SHA-256, SHA-384, SHA-512) are supported.
80
+
79
81
All the previous versions of the .NET SDK continue to accept only SHA-1 certificate fingerprint.
80
82
81
83
-**`--certificate-password <PASSWORD>`**
@@ -123,10 +125,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):
128
+
- 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 +137,10 @@ The `dotnet nuget sign` command signs all the packages matching the first argume
0 commit comments