private static bool CheckSignatureFormat()

in net/JetBrains.DownloadPgpVerifier/src/PgpSignaturesVerifier.cs [185:204]


    private static bool CheckSignatureFormat(PgpSignature signature, Action<string> onError)
    {
      if (signature == null) throw new ArgumentNullException(nameof(signature));
      if (onError == null) throw new ArgumentNullException(nameof(onError));
      if (signature.HashAlgorithm != HashAlgorithmTag.Sha256 &&
          signature.HashAlgorithm != HashAlgorithmTag.Sha384 &&
          signature.HashAlgorithm != HashAlgorithmTag.Sha512)
      {
        onError($"Only hashAlgorithms SHA256/384/512 are supported. See https://tools.ietf.org/html/rfc4880#section-9.4. SignKeyID={signature.KeyId:X16}");
        return false;
      }

      if (signature.KeyAlgorithm != PublicKeyAlgorithmTag.RsaGeneral)
      {
        onError($"Only keyAlgorithm = 1 (RSA (Encrypt or Sign)) is supported. See https://tools.ietf.org/html/rfc4880#section-9.1. SignKeyID={signature.KeyId:X16}");
        return false;
      }

      return true;
    }