Skip to content

Commit

Permalink
Merged PR 34157: Update NuGet certificate thumbprints
Browse files Browse the repository at this point in the history
Update NuGet certificate thumbprints
  • Loading branch information
wtgodbe committed Oct 1, 2023
1 parent fe3cff5 commit bb5ae48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ internal class FirstPartyNuGetPackageSigningVerifier : IFirstPartyNuGetPackageSi
new(StringComparer.OrdinalIgnoreCase)
{
"3F9001EA83C560D712C24CF213C3D312CB3BFF51EE89435D3430BD06B5D0EECE",
"AA12DA22A49BCE7D5C1AE64CC1F3D892F150DA76140F210ABD2CBFFCA2C18A27"
"AA12DA22A49BCE7D5C1AE64CC1F3D892F150DA76140F210ABD2CBFFCA2C18A27",
"566A31882BE208BE4422F7CFD66ED09F5D4524A5994F50CCC8B05EC0528C1353"
};

private readonly HashSet<string> _upperFirstPartyCertificateThumbprints =
new(StringComparer.OrdinalIgnoreCase) { "51044706BD237B91B89B781337E6D62656C69F0FCFFBE8E43741367948127862" };
new(StringComparer.OrdinalIgnoreCase)
{
"51044706BD237B91B89B781337E6D62656C69F0FCFFBE8E43741367948127862",
"46011EDE1C147EB2BC731A539B7C047B7EE93E48B9D3C3BA710CE132BBDFAC6B"
};

private const string FirstPartyCertificateSubject =
"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,12 @@ public void GivenFirstPartyPackageItShouldReturnTrue()
{
var iosSamplePackage = DownloadSamplePackage(new PackageId("Microsoft.iOS.Ref"));
var androidSamplePackage = DownloadSamplePackage(new PackageId("Microsoft.Android.Ref"));
var mauiSamplePackage = DownloadSamplePackage(new PackageId("Microsoft.NET.Sdk.Maui.Manifest-8.0.100-rc.1.Msi.x64"));

var package = new FirstPartyNuGetPackageSigningVerifier();
package.IsFirstParty(new FilePath(iosSamplePackage)).Should().BeTrue();
package.IsFirstParty(new FilePath(androidSamplePackage)).Should().BeTrue();
package.IsFirstParty(new FilePath(mauiSamplePackage)).Should().BeTrue();
}

private string GetShaFromSamplePackage(string samplePackage)
Expand Down

0 comments on commit bb5ae48

Please sign in to comment.