SignatureVerificationResult 枚举
定义
指定签名验证的大部分结果代码。Specifies most of the result codes for signature verification.
public enum class SignatureVerificationResult
public enum SignatureVerificationResult
type SignatureVerificationResult =
Public Enum SignatureVerificationResult
- 继承
字段
| AssemblyIdentityMismatch | 1 | 在清单的 /asm:assembly/asm:assemblyIdentity 节点中指定的程序集的标识与 /asm:assembly/ds:signature/ds:KeyInfo/msrel:RelData/r:license/r:grant/as:ManifestInformation/as:assemblyIdentity 节点的 Authenticode 签名中的程序集的标识不匹配。The identity of the assembly specified in the /asm:assembly/asm:assemblyIdentity node of the manifest does not match the identity of the assembly in the Authenticode signature in the /asm:assembly/ds:signature/ds:KeyInfo/msrel:RelData/r:license/r:grant/as:ManifestInformation/as:assemblyIdentity node. |
| BadDigest | -2146869232 | 未验证对象的数字签名。The digital signature of the object did not verify. |
| BadSignatureFormat | -2146762749 | 签名格式无效。The signature format is invalid. |
| BasicConstraintsNotObserved | -2146869223 | 未观察到证书的基本约束扩展。The basic constraint extension of a certificate has not been observed. |
| CertificateExpired | -2146762495 | 证书已过期。The certificate has expired. |
| CertificateExplicitlyDistrusted | -2146762479 | 证书已被显式标记为不受用户信任。The certificate was explicitly marked as not trusted by the user. |
| CertificateMalformed | -2146762488 | 找不到证书,或某个重要字段(例如使用者或颁发者姓名)的值为空。The certificate is missing or has an empty value for an important field, such as a subject or issuer name. |
| CertificateNotExplicitlyTrusted | -2146762748 | 证书显式不受信任。The certificate is not trusted explicitly. |
| CertificateRevoked | -2146762484 | 证书已吊销。The certificate has been revoked. |
| CertificateUsageNotAllowed | -2146762490 | 证书不可用于签名和验证。The certificate cannot be used for signing and verification. |
| ContainingSignatureInvalid | 2 | 强名称签名不会在 AuthenticodeSignatureInformation 对象中进行验证。The strong name signature does not verify in the AuthenticodeSignatureInformation object. 因为强名称签名封装 Authenticode 签名,有人会使用他们选择的签名替换 Authenticode 签名。Because the strong name signature wraps the Authenticode signature, someone could replace the Authenticode signature with a signature of their choosing. 为了避免出现这种情况,如果强名称没有验证,则返回此错误代码,因为替换部分强名称签名会使强名称签名无效。To prevent this, this error code is returned if the strong name does not verify because substituting a part of the strong name signature will invalidate it. |
| CouldNotBuildChain | -2146762486 | 未能生成链。The chain could not be built. |
| GenericTrustFailure | -2146762485 | 对证书的一般信任失败。There is a general trust failure with the certificate. |
| InvalidCertificateName | -2146762476 | 证书名称无效。The certificate has an invalid name. 此名称既未包含在允许的列表中,也未被显式排除。The name is either not included in the permitted list or is explicitly excluded. |
| InvalidCertificatePolicy | -2146762477 | 证书的策略无效。The certificate has an invalid policy. |
| InvalidCertificateRole | -2146762493 | 证书的角色无效。The certificate has an invalid role. |
| InvalidCertificateSignature | -2146869244 | 无法验证证书的签名。The signature of the certificate cannot be verified. |
| InvalidCertificateUsage | -2146762480 | 证书的用法无效。The certificate has an invalid usage. |
| InvalidCountersignature | -2146869245 | 其中一个副署无效。One of the counter signatures is invalid. |
| InvalidSignerCertificate | -2146869246 | 消息的签署人的证书无效或找不到。The certificate for the signer of the message is invalid or not found. |
| InvalidTimePeriodNesting | -2146762494 | 颁发证书过期后颁发一个新证书。A certificate was issued after the issuing certificate has expired. |
| InvalidTimestamp | -2146869243 | 未能验证时间戳签名或证书,或者格式不正确。The time stamp signature or certificate could not be verified or is malformed. |
| IssuerChainingError | -2146762489 | 所给证书的父证书没有颁发此子证书。A parent of a given certificate did not issue that child certificate. |
| MissingSignature | -2146762496 | 缺少签名。The signature is missing. |
| PathLengthConstraintViolated | -2146762492 | 违反了证书链的路径长度限定。A path length constraint in the certification chain has been violated. |
| PublicKeyTokenMismatch | 3 | /asm:assembly/asm:AssemblyIdentity 节点中清单标识的公钥令牌与用于签署清单的密钥的公钥令牌不匹配。The public key token from the manifest identity in the /asm:assembly/asm:AssemblyIdentity node does not match the public key token of the key that is used to sign the manifest. |
| PublisherMismatch | 4 | /asm:assembly/asmv2:publisherIdentity 的发布者姓名与签名证书的使用者姓名不匹配,或者相同的 publisherIdentity 节点的颁发者密钥哈希与签名证书的密钥哈希不匹配。The publisher name from /asm:assembly/asmv2:publisherIdentity does not match the subject name of the signing certificate, or the issuer key hash from the same publisherIdentity node does not match the key hash of the signing certificate. |
| RevocationCheckFailure | -2146762482 | 吊销检查失败。The revocation check failed. |
| SystemError | -2146869247 | 验证信任关系时,系统层上出现了一个错误。A system-level error occurred while verifying trust. |
| UnknownCriticalExtension | -2146762491 | 证书包含标记为关键的未知扩展名。A certificate contains an unknown extension that is marked critical. |
| UnknownTrustProvider | -2146762751 | 证书有未知的信任提供程序。The certificate has an unknown trust provider. |
| UnknownVerificationAction | -2146762750 | 证书有未知的验证操作。The certificate has an unknown verification action. |
| UntrustedCertificationAuthority | -2146762478 | 已正确处理证书链,但其中一个 CA 证书未受到策略提供程序的信任。The certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider. |
| UntrustedRootCertificate | -2146762487 | 根证书不受信任。The root certificate is not trusted. |
| UntrustedTestRootCertificate | -2146762483 | 测试根证书不受信任。The test root certificate is not trusted. |
| Valid | 0 | 证书验证结果有效。The certificate verification result is valid. |
注解
验证成功后,将返回有效的结果。A successful verification returns the Valid result.
HRESULT 值通常由非托管的 Microsoft 加密 API (CAPI) 返回;其他值由托管验证设置。HRESULT values are generally returned by the unmanaged Microsoft Cryptographic API (CAPI); the other values are set by managed verification. 此枚举不是所有可能的 HRESULT 值的完整,可能会发生更改。This enumeration is not comprehensive of all possible HRESULT values and is subject to change.