{"id":1888,"date":"2021-02-25T11:13:55","date_gmt":"2021-02-25T19:13:55","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=1888"},"modified":"2021-02-25T11:13:55","modified_gmt":"2021-02-25T19:13:55","slug":"the-nuget-org-repository-signing-certificate-will-be-updated-as-soon-as-march-15th-2021","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/the-nuget-org-repository-signing-certificate-will-be-updated-as-soon-as-march-15th-2021\/","title":{"rendered":"The NuGet.org repository signing certificate will be updated as soon as March 15th, 2021"},"content":{"rendered":"<p><strong>Action required:<\/strong> If you validate that packages are repository signed by NuGet.org using a <a href=\"https:\/\/docs.microsoft.com\/nuget\/consume-packages\/installing-signed-packages\">NuGet client policy<\/a>, <a href=\"https:\/\/docs.microsoft.com\/nuget\/reference\/cli-reference\/cli-ref-verify\"><code>NuGet.exe verify<\/code><\/a> command, or the <a href=\"https:\/\/docs.microsoft.com\/dotnet\/core\/tools\/dotnet-nuget-verify\"><code>dotnet nuget verify<\/code><\/a> command, please follow <a href=\"#allow-the-new-nuget-org-certificate\">these steps<\/a> by March 15th, 2021 to avoid potential disruptions when installing new NuGet.org packages. If you are unsure, we have outlined steps to <a href=\"#who-will-be-impacted\">check if you will be impacted<\/a>.<\/p>\n<p>Since 2018, NuGet.org has used an X.509 certificate to repository sign its NuGet packages. That certificate will be expiring on April 14th, 2021. <strong>As early as March 15th, a new certificate will replace it as the new NuGet.org repository signing certificate for NuGet packages.<\/strong> Existing packages already signed with the older certificate will retain their existing signature, but the older certificate will soon no longer be used to sign packages.<\/p>\n<p>You may recall a similar blog post a few months ago from when we <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/microsoft-author-signing-certificate-update\/\">updated the Microsoft author signing certificate<\/a>. The action required to accept the new NuGet.org repository signing certificate is very similar, but does have key differences outlined in the the instructions below.<\/p>\n<p><strong>Note:<\/strong> If you were previously affected by NuGet restore issues due to distrust of Symantec CA&#8217;s on the Debian family of Linux distributions, please see <a href=\"https:\/\/github.com\/NuGet\/Announcements\/issues\/49\">our guidance on that matter<\/a> for mitigations that may be necessary in addition to the actions outlined in this blogpost. If you were unaffected by the issue due to use of a non-Debian OS or have already applied one of the mitigations, the steps in this blogpost should be sufficient.<\/p>\n<p><strong>Current certificate SHA-256 fingerprint:<\/strong> <code>0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D<\/code><\/p>\n<p><strong>New certificate SHA-256 fingerprint:<\/strong> <code>5A2901D6ADA3D18260B9C6DFE2133C95D74B9EEF6AE0E5DC334C8454D1477DF4<\/code><\/p>\n<h2>Who will be impacted?<\/h2>\n<p><strong>1&#046; Customers who are using a NuGet client policy to enforce an allow list of trusted signers that includes NuGet.org.<\/strong><\/p>\n<p>To tell if you have a <a href=\"https:\/\/docs.microsoft.com\/nuget\/consume-packages\/installing-signed-packages\">NuGet client policy<\/a> configured, check for the following elements in your <a href=\"https:\/\/docs.microsoft.com\/nuget\/reference\/nuget-config-file\">nuget.config<\/a>. Keep in mind that you can have nuget.config files in <a href=\"https:\/\/docs.microsoft.com\/nuget\/consume-packages\/configuring-nuget-behavior#config-file-locations-and-uses\">multiple locations<\/a> with different scopes.<\/p>\n<pre><code>&lt;config&gt;\n  &lt;add key=\"signatureValidationMode\" value=\"require\" \/&gt;\n&lt;\/config&gt;\n\n\n&lt;trustedSigners&gt;  \n  &lt;repository name=\"nuget.org\" serviceIndex=\"https:\/\/api.nuget.org\/v3\/index.json\"&gt;\n    &lt;certificate fingerprint=\"0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D\" \n    hashAlgorithm=\"SHA256\" allowUntrustedRoot=\"false\" \/&gt;\n  &lt;\/repository&gt;\n&lt;\/trustedSigners&gt;\n<\/code><\/pre>\n<p><strong>2&#046; Customers who use <code>NuGet.exe verify<\/code> (Windows only) to verify that signed packages are repository signed by NuGet.org.<\/strong><\/p>\n<p>This will look like the following in your code:<\/p>\n<pre><code>NuGet.exe verify -Signatures &lt;PackagePath&gt; -CertificateFingerprint 0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D\n<\/code><\/pre>\n<p><strong>3&#046; Customers who use <code>dotnet nuget verify<\/code> to verify that signed packages are repository signed by NuGet.org.<\/strong><\/p>\n<p>This will look like the following in your code:<\/p>\n<pre><code>dotnet nuget verify &lt;PackagePath&gt; --certificate-fingerprint 0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D\n<\/code><\/pre>\n<p><strong>If none of the above scenarios apply to you, then you should be unaffected by the certificate update!<\/strong> NuGet.org packages signed with the new certificate should install in the same way as packages signed with the old certificate.<\/p>\n<h2>Allow the new NuGet.org certificate<\/h2>\n<h3>Client policy<\/h3>\n<p>If you are using a NuGet client policy to enforce an allow list of trusted signers, then you will need to add the new NuGet.org certificate to your allow list to avoid disruptions when installing NuGet.org packages signed with the new certificate. You should keep the older NuGet.org certificate as well to continue installing NuGet.org packages signed with the older certificate. If you try to install one of these newer NuGet.org packages without updating your trusted signers, you&#8217;ll get an <a href=\"https:\/\/docs.microsoft.com\/nuget\/reference\/errors-and-warnings\/nu3034\">NU3034 error<\/a> and the package will fail to install.<\/p>\n<p>You can explicitly trust the new NuGet.org repository signing certificate by adding to your nuget.config file the new certificate alongside any older certificates you may already have:<\/p>\n<pre><code>&lt;trustedSigners&gt;\n  &lt;repository name=\"nuget.org\" serviceIndex=\"https:\/\/api.nuget.org\/v3\/index.json\"&gt;\n    &lt;certificate fingerprint=\"0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D\" hashAlgorithm=\"SHA256\" allowUntrustedRoot=\"false\" \/&gt;\n    &lt;certificate fingerprint=\"5A2901D6ADA3D18260B9C6DFE2133C95D74B9EEF6AE0E5DC334C8454D1477DF4\" hashAlgorithm=\"SHA256\" allowUntrustedRoot=\"false\" \/&gt;\n  &lt;\/repository&gt;\n&lt;\/trustedSigners&gt;\n<\/code><\/pre>\n<h3>NuGet.exe verify<\/h3>\n<p>If you use <code>NuGet.exe verify<\/code> to verify that a signed package is repository signed by NuGet.org, you&#8217;ll need to update the command to handle either certificate like so:<\/p>\n<pre><code>NuGet.exe verify -Signatures &lt;PackagePath&gt; -CertificateFingerprint \"0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D;5A2901D6ADA3D18260B9C6DFE2133C95D74B9EEF6AE0E5DC334C8454D1477DF4\"\n<\/code><\/pre>\n<h3>dotnet nuget verify<\/h3>\n<p>Similarly, if you use <code>dotnet nuget verify<\/code> to verify that a signed package is repository signed by NuGet.org, you&#8217;ll need to update the command to handle either certificate like so:<\/p>\n<pre><code>dotnet nuget verify &lt;PackagePath&gt; --certificate-fingerprint 0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D --certificate-fingerprint 5A2901D6ADA3D18260B9C6DFE2133C95D74B9EEF6AE0E5DC334C8454D1477DF4\n<\/code><\/pre>\n<h2>Feedback<\/h2>\n<p>If you have any questions about how you may be impacted or run into issues while following the steps above, please don&#8217;t hesitate to <a href=\"https:\/\/www.nuget.org\/policies\/Contact\">contact us<\/a>.<\/p>\n<p>For more general NuGet feedback and suggestions:<\/p>\n<ul>\n<li>Check out our <a href=\"https:\/\/github.com\/NuGet\/Home\/wiki\/Submitting-Bugs-and-Suggestions\">documentation on submitting bugs and suggestions<\/a>.<\/li>\n<li>Schedule a time to <a href=\"https:\/\/aka.ms\/talktonuget\">talk to NuGet<\/a>.<\/li>\n<li>Reach out to us on Twitter \u2013 mention <a href=\"https:\/\/twitter.com\/nuget\">@nuget<\/a> in your tweets.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The current NuGet.org repository signing certificate will be updated as soon as March 15th, 2021. If you validate that packages are repository signed by NuGet.org, you will need to take steps to avoid disruptions when installing packages from NuGet.org.<\/p>\n","protected":false},"author":24894,"featured_media":608,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[7874,7931,7928,326],"tags":[104,7848,123,7938,7948],"class_list":["post-1888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nuget","category-nuget-org","category-other-announcements","category-security","tag-nuget","tag-nuget-org","tag-security","tag-signing","tag-verify"],"acf":[],"blog_post_summary":"<p>The current NuGet.org repository signing certificate will be updated as soon as March 15th, 2021. If you validate that packages are repository signed by NuGet.org, you will need to take steps to avoid disruptions when installing packages from NuGet.org.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/1888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/24894"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=1888"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/1888\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/608"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=1888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=1888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=1888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}