NuGet 警告 NU3022

シナリオ 1

Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The primary signature's timestamp certificate has an unsupported signature algorithm.

問題点

パッケージの署名のタイムスタンプに使用される証明書には、サポートされていない署名アルゴリズムがあります。

解決策

タイムスタンプ オーソリティの署名証明書に、次のいずれかの署名アルゴリズムがあることを確認してください。

  • sha256WithRSAEncryption
  • sha384WithRSAEncryption
  • sha512WithRSAEncryption

シナリオ 2

Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The timestamp certificate has an unsupported signature algorithm (SHA1). The following algorithms are supported: SHA256RSA, SHA384RSA, SHA512RSA.

問題点

パッケージの署名のタイムスタンプに使用される証明書には、サポートされていない署名アルゴリズムがあります。

解決策

タイムスタンプ オーソリティ署名証明書に次のいずれかの署名アルゴリズムが含まれるように、nuget sign オプションを使用して NuGet ドキュメントの説明に従って、-Timestamper コマンドを使用してパッケージに再署名するようパッケージ作成者に要求してください。

  • sha256WithRSAEncryption
  • sha384WithRSAEncryption
  • sha512WithRSAEncryption

Note

nuget verify -signatures コマンドを実行すると、NU3022 がエラーとして発生します。 それ以外の場合、NU3022 は警告として発生します。