SignerInfo Class

SignerInfo Class

The SignerInfo class represents a signer associated with a SignedCms object that represents a CMS/PKCS #7 message.

System.Object
  System.Security.Cryptography.Pkcs.SignerInfo

Namespace:  System.Security.Cryptography.Pkcs
Assembly:  System.Security (in System.Security.dll)

[HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
public sealed class SignerInfo

The SignerInfo type exposes the following members.

  NameDescription
Public propertyCertificateThe Certificate property retrieves the signing certificate associated with the signer information.
Public propertyCounterSignerInfosThe CounterSignerInfos property retrieves the set of counter signers associated with the signer information.
Public propertyDigestAlgorithmThe DigestAlgorithm property retrieves the Oid object that represents the hash algorithm used in the computation of the signatures.
Public propertySignedAttributesThe SignedAttributes property retrieves the CryptographicAttributeObjectCollection collection of signed attributes that is associated with the signer information. Signed attributes are signed along with the rest of the message content.
Public propertySignerIdentifierThe SignerIdentifier property retrieves the certificate identifier of the signer associated with the signer information.
Public propertyUnsignedAttributesThe UnsignedAttributes property retrieves the CryptographicAttributeObjectCollection collection of unsigned attributes that is associated with the SignerInfo content. Unsigned attributes can be modified without invalidating the signature.
Public propertyVersionThe Version property retrieves the signer information version.
Top

  NameDescription
Public methodCheckHashThe CheckHash method verifies the data integrity of the CMS/PKCS #7 message signer information. CheckHash is a specialized method used in specific security infrastructure applications in which the subject uses the HashOnly member of the SubjectIdentifierType enumeration when setting up a CmsSigner object. CheckHash does not authenticate the signer information because this method does not involve verifying a digital signature. For general-purpose checking of the integrity and authenticity of CMS/PKCS #7 message signer information and countersignatures, use the CheckSignature(Boolean) or CheckSignature(X509Certificate2Collection, Boolean) methods.
Public methodCheckSignature(Boolean)The CheckSignature(Boolean) method verifies the digital signature of the message and, optionally, validates the certificate.
Public methodCheckSignature(X509Certificate2Collection, Boolean)The CheckSignature(X509Certificate2Collection, Boolean) method verifies the digital signature of the message by using the specified collection of certificates and, optionally, validates the certificate.
Public methodComputeCounterSignature()The ComputeCounterSignature() method prompts the user to select a signing certificate, creates a countersignature, and adds the signature to the CMS/PKCS #7 message. Countersignatures are restricted to one level.
Public methodComputeCounterSignature(CmsSigner)The ComputeCounterSignature(CmsSigner) method creates a countersignature by using the specified signer and adds the signature to the CMS/PKCS #7 message. Countersignatures are restricted to one level.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRemoveCounterSignature(Int32)The RemoveCounterSignature method removes the countersignature at the specified index of the CounterSignerInfos collection.
Public methodRemoveCounterSignature(SignerInfo)The RemoveCounterSignature method removes the countersignature for the specified SignerInfo object.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The signatures represented by the SignerInfo class can be either over message content or a signature. The latter kind of signature is referred to as a countersignature.

This implementation of CMS/PKCS #7 supports only one level of countersignature. That is, a signature can be signed, which forms a countersignature, but that countersignature cannot be signed again.

This class does not have a public constructor; therefore, it cannot be publicly instantiated. It is a read-only class accessible from the SignedCms.SignerInfos property.

NoteNote

The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: MayLeakOnAbort. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, 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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2016 Microsoft