Skip to content

Commit

Permalink
Signing: enable signature verification by default on Linux in .NET 8 …
Browse files Browse the repository at this point in the history
…SDK (#5006)

Resolve NuGet/Home#11262.
  • Loading branch information
dtivel committed Jan 18, 2023
1 parent 4499a40 commit 9836b44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public override bool CanVerifySignedPackages(SignedPackageVerifierSettings verif
string signVerifyEnvVariable = _environmentVariableReader.GetEnvironmentVariable(
EnvironmentVariableConstants.DotNetNuGetSignatureVerification);

bool canVerify = false;
bool canVerify = RuntimeEnvironmentHelper.IsLinux;

if (!string.IsNullOrEmpty(signVerifyEnvVariable))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2102,7 +2102,7 @@ public void CanVerifySignedPackages_ReturnsValueBasedOnOperatingSystemAndFramewo

private static bool CanVerifySignedPackages(IEnvironmentVariableReader environmentVariableReader = null)
{
return (RuntimeEnvironmentHelper.IsWindows ||
return (RuntimeEnvironmentHelper.IsWindows || RuntimeEnvironmentHelper.IsLinux ||
IsVerificationEnabledByEnvironmentVariable(environmentVariableReader)) &&
#if IS_SIGNING_SUPPORTED
true;
Expand Down

0 comments on commit 9836b44

Please sign in to comment.