NuGet 警告 NU3014

方案 1

Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The signing certificate does not meet a minimum public key length requirement.

问题

用于对包进行签名的证书不符合最小公钥长度要求。

解决方案

请确保签名证书的 RSA 公钥长度 >= 2048 位。

方案 2

Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The primary signature's certificate does not meet a minimum public key length requirement.

问题

用于对包进行签名的证书不符合最小公钥长度要求。

解决方案

请务必使用长度 >= 2048 位的 RSA 公钥的签名证书对包进行签名。

注意

当 NuGet 的签名验证模式设为“接受”(默认值)时,NU3014 将显示为警告。 当 NuGet 的签名验证模式设为“需要”或在运行 nuget verify -signatures 命令时,NU3014 将从警告提升为错误。