[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Pkcs7SignatureBuilder

Class Pkcs7SignatureBuilder

Namespace
GrapeCity.Documents.Pdf
Assembly
GcDocs.Pdf.dll

Implements the ISignatureBuilder interface, can be used to build a PKCS#7 signature.

public class Pkcs7SignatureBuilder : ISignatureBuilder
Inheritance
object
Pkcs7SignatureBuilder
Implements
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

Pkcs7SignatureBuilder()

Initializes a new instance of the Pkcs7SignatureBuilder class.

public Pkcs7SignatureBuilder()

Pkcs7SignatureBuilder(X509Certificate2, SignatureFormat, OID)

Initializes a new instance of the Pkcs7SignatureBuilder class.

public Pkcs7SignatureBuilder(X509Certificate2 signingCertificate, Pkcs7SignatureBuilder.SignatureFormat format = SignatureFormat.adbe_pkcs7_detached, OID hashAlgorithm = null)

Parameters

signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2

The certificate to use.

format Pkcs7SignatureBuilder.SignatureFormat

The signature format.

hashAlgorithm OID

The hash algorithm to use.

Pkcs7SignatureBuilder(X509Certificate2[], SignatureFormat, OID)

Initializes a new instance of the Pkcs7SignatureBuilder class.

public Pkcs7SignatureBuilder(X509Certificate2[] certificateChain, Pkcs7SignatureBuilder.SignatureFormat format = SignatureFormat.adbe_pkcs7_detached, OID hashAlgorithm = null)

Parameters

certificateChain System.Security.Cryptography.X509Certificates.X509Certificate2[]

The certificate chain to use.

format Pkcs7SignatureBuilder.SignatureFormat

The signature format.

hashAlgorithm OID

The hash algorithm to use.

Properties

CertificateChain

Gets or sets the certificate chain. The first certificate is used to sign the document.

public X509Certificate2[] CertificateChain { get; set; }

Property Value

System.Security.Cryptography.X509Certificates.X509Certificate2[]

Crls

Gets or sets the collection of certificate revocation lists (CRLs) to use. Items in this collection may be of the following types:

  • byte[]An encoded CRL list.
  • stringThe URL of a CRL (e.g. http://crl.cacert.org/revoke.crl).
  • System.UriThe System.Uri of a CRL.
  • System.Security.Cryptography.X509Certificates.X509Certificate2An X509Certificate2 object from which the URL of a CRL will be extracted.
An exception will be thrown if an object of an unsupported type is found in this collection.
public IList<object> Crls { get; set; }

Property Value

System.Collections.Generic.IList<T><object>

Format

Gets or sets the signature format.

public Pkcs7SignatureBuilder.SignatureFormat Format { get; set; }

Property Value

Pkcs7SignatureBuilder.SignatureFormat

HashAlgorithm

Gets or sets the HASH algorithm used if SignatureGenerator is not specified. Note! If Format is adbe_pkcs7_sha1 then this property is ignored and always SHA-1 used.

public OID HashAlgorithm { get; set; }

Property Value

OID

IncludeOcsp

Gets or sets a value indicating whether to include OCSP information into the signature.

public bool IncludeOcsp { get; set; }

Property Value

bool

SignatureGenerator

Gets or sets the IPkcs7SignatureGenerator object used to sign the authenticated attribute set that is a part of PKCS#7 signature. If not set, the default built-in generator will be used.

public IPkcs7SignatureGenerator SignatureGenerator { get; set; }

Property Value

IPkcs7SignatureGenerator