Share via

SignatureVerificationResult Enum


Specifies most of the result codes for signature verification.

public enum class SignatureVerificationResult
public enum SignatureVerificationResult
type SignatureVerificationResult = 
Public Enum SignatureVerificationResult


AssemblyIdentityMismatch 1

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

The strong name signature does not verify in the AuthenticodeSignatureInformation object. 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

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

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

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 values are generally returned by the unmanaged Microsoft Cryptographic API (CAPI); the other values are set by managed verification. This enumeration is not comprehensive of all possible HRESULT values and is subject to change.

Applies to