SignerInfo SignerInfo SignerInfo SignerInfo Class

Definition

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

public ref class SignerInfo sealed
public sealed class SignerInfo
type SignerInfo = class
Public NotInheritable Class SignerInfo
Inheritance
SignerInfoSignerInfoSignerInfoSignerInfo

Remarks

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.

Properties

Certificate Certificate Certificate Certificate

The Certificate property retrieves the signing certificate associated with the signer information.

CounterSignerInfos CounterSignerInfos CounterSignerInfos CounterSignerInfos

The CounterSignerInfos property retrieves the set of counter signers associated with the signer information.

DigestAlgorithm DigestAlgorithm DigestAlgorithm DigestAlgorithm

The DigestAlgorithm property retrieves the Oid object that represents the hash algorithm used in the computation of the signatures.

SignatureAlgorithm SignatureAlgorithm SignatureAlgorithm SignatureAlgorithm

Gets the identifier for the signature algorithm used by the current SignerInfo object.

SignedAttributes SignedAttributes SignedAttributes SignedAttributes

The 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.

SignerIdentifier SignerIdentifier SignerIdentifier SignerIdentifier

The SignerIdentifier property retrieves the certificate identifier of the signer associated with the signer information.

UnsignedAttributes UnsignedAttributes UnsignedAttributes UnsignedAttributes

The 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.

Version Version Version Version

The Version property retrieves the signer information version.

Methods

CheckHash() CheckHash() CheckHash() CheckHash()

The 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.

CheckSignature(Boolean) CheckSignature(Boolean) CheckSignature(Boolean) CheckSignature(Boolean)

The CheckSignature(Boolean) method verifies the digital signature of the message and, optionally, validates the certificate.

CheckSignature(X509Certificate2Collection, Boolean) CheckSignature(X509Certificate2Collection, Boolean) CheckSignature(X509Certificate2Collection, Boolean) CheckSignature(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.

ComputeCounterSignature() ComputeCounterSignature() ComputeCounterSignature() ComputeCounterSignature()

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.

ComputeCounterSignature(CmsSigner) ComputeCounterSignature(CmsSigner) ComputeCounterSignature(CmsSigner) ComputeCounterSignature(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.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetSignature() GetSignature() GetSignature() GetSignature()

Retrieves the signature for the current SignerInfo object.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveCounterSignature(Int32) RemoveCounterSignature(Int32) RemoveCounterSignature(Int32) RemoveCounterSignature(Int32)

The RemoveCounterSignature(Int32) method removes the countersignature at the specified index of the CounterSignerInfos collection.

RemoveCounterSignature(SignerInfo) RemoveCounterSignature(SignerInfo) RemoveCounterSignature(SignerInfo) RemoveCounterSignature(SignerInfo)

The RemoveCounterSignature(SignerInfo) method removes the countersignature for the specified SignerInfo object.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to