This topic has not yet been rated - Rate this topic

SignatureVerificationResult Enumeration

Specifies most of the result codes for signature verification.

Namespace:  System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)
public enum SignatureVerificationResult
Member name Description
Valid The certificate verification result is valid.
AssemblyIdentityMismatch 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.
ContainingSignatureInvalid 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.
PublicKeyTokenMismatch 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 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.
SystemError A system-level error occurred while verifying trust.
InvalidSignerCertificate The certificate for the signer of the message is invalid or not found.
InvalidCountersignature One of the counter signatures is invalid.
InvalidCertificateSignature The signature of the certificate cannot be verified.
InvalidTimestamp The time stamp signature or certificate could not be verified or is malformed.
BadDigest The digital signature of the object did not verify.
BasicConstraintsNotObserved The basic constraint extension of a certificate has not been observed.
UnknownTrustProvider The certificate has an unknown trust provider.
UnknownVerificationAction The certificate has an unknown verification action.
BadSignatureFormat The signature format is invalid.
CertificateNotExplicitlyTrusted The certificate is not trusted explicitly.
MissingSignature The signature is missing.
CertificateExpired The certificate has expired.
InvalidTimePeriodNesting A certificate was issued after the issuing certificate has expired.
InvalidCertificateRole The certificate has an invalid role.
PathLengthConstraintViolated A path length constraint in the certification chain has been violated.
UnknownCriticalExtension A certificate contains an unknown extension that is marked critical.
CertificateUsageNotAllowed The certificate cannot be used for signing and verification.
IssuerChainingError A parent of a given certificate did not issue that child certificate.
CertificateMalformed The certificate is missing or has an empty value for an important field, such as a subject or issuer name.
UntrustedRootCertificate The root certificate is not trusted.
CouldNotBuildChain The chain could not be built.
GenericTrustFailure There is a general trust failure with the certificate.
CertificateRevoked The certificate has been revoked.
UntrustedTestRootCertificate The test root certificate is not trusted.
RevocationCheckFailure The revocation check failed.
InvalidCertificateUsage The certificate has an invalid usage.
CertificateExplicitlyDistrusted The certificate was explicitly marked as not trusted by the user.
UntrustedCertificationAuthority The certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider.
InvalidCertificatePolicy The certificate has an invalid policy.
InvalidCertificateName The certificate has an invalid name. The name is either not included in the permitted list or is explicitly excluded.

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.

.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ