The CMS container which represents SignedData structure from rfc5652 Cryptographic Message Syntax (CMS) More...
The CMS container which represents SignedData structure from rfc5652 Cryptographic Message Syntax (CMS)
◆ CMSContainer() [1/2]
iText.Signatures.Cms.CMSContainer.CMSContainer |
( |
|
) |
|
|
inline |
Creates an empty SignedData structure.
◆ CMSContainer() [2/2]
iText.Signatures.Cms.CMSContainer.CMSContainer |
( |
byte[] |
encodedCMSdata |
) |
|
|
inline |
Creates a SignedData structure from a serialized ASN1 structure.
-
Parameters
-
encodedCMSdata |
the serialized CMS container |
◆ AddCertificate()
virtual void iText.Signatures.Cms.CMSContainer.AddCertificate |
( |
IX509Certificate |
cert |
) |
|
|
inlinevirtual |
Adds a certificate.
-
Parameters
-
cert |
the certificate to be added |
◆ AddCertificates()
virtual void iText.Signatures.Cms.CMSContainer.AddCertificates |
( |
IX509Certificate[] |
certs |
) |
|
|
inlinevirtual |
Adds a set of certificates.
-
Parameters
-
certs |
the certificates to be added |
◆ AddCrl()
virtual void iText.Signatures.Cms.CMSContainer.AddCrl |
( |
IX509Crl |
crl |
) |
|
|
inlinevirtual |
Adds a CRL response to the CMS container.
-
Parameters
-
crl |
the CRL response to be added. |
◆ AddOcsp()
virtual void iText.Signatures.Cms.CMSContainer.AddOcsp |
( |
IBasicOcspResponse |
ocspResponse |
) |
|
|
inlinevirtual |
Adds an OCSP response to the CMS container.
-
Parameters
-
ocspResponse |
the OCSP response to be added. |
◆ GetCertificates()
virtual ICollection<IX509Certificate> iText.Signatures.Cms.CMSContainer.GetCertificates |
( |
|
) |
|
|
inlinevirtual |
Retrieves a copy of the list of certificates.
-
Returns
-
the list of certificates to be used for signing and certificate validation
◆ GetCmsVersion()
virtual int iText.Signatures.Cms.CMSContainer.GetCmsVersion |
( |
|
) |
|
|
inlinevirtual |
Only version 1 is supported by this class.
-
Returns
-
1 as CMSversion
◆ GetCrls()
virtual ICollection<IX509Crl> iText.Signatures.Cms.CMSContainer.GetCrls |
( |
|
) |
|
|
inlinevirtual |
Retrieves a copy of the list of CRLs.
-
Returns
-
the list of CRL revocation info.
◆ GetDigestAlgorithm()
The digest algorithm OID and parameters used by the signer.
The digest algorithm OID and parameters used by the signer. This class only supports one signer for use in pdf signatures, so only one digest algorithm is supported.
This field is set when adding the signerInfo.
-
Returns
-
AlgorithmIdentifier digest algorithm.
◆ GetEncapContentInfo()
This represents the signed content.
This represents the signed content. In the case of a signed PDF document this will be of type data with no content.
-
Returns
-
a representation of the data to be signed.
◆ GetOcsps()
Retrieves a copy of the list of OCSPs.
-
Returns
-
the list of OCSP revocation info.
◆ GetSerializedSignedAttributes()
virtual byte [] iText.Signatures.Cms.CMSContainer.GetSerializedSignedAttributes |
( |
|
) |
|
|
inlinevirtual |
Retrieves the encoded signed attributes of the signer info.
Retrieves the encoded signed attributes of the signer info. This makes the signed attributes read only.
-
Returns
-
the encoded signed attributes of the signer info.
◆ GetSignerInfo()
virtual SignerInfo iText.Signatures.Cms.CMSContainer.GetSignerInfo |
( |
|
) |
|
|
inlinevirtual |
This class only supports one signer per signature field.
-
Returns
-
the singerInfo
◆ GetSizeEstimation()
virtual long iText.Signatures.Cms.CMSContainer.GetSizeEstimation |
( |
|
) |
|
|
inlinevirtual |
When all fields except for signer.signedAttributes.digest and signer.signature are completed it is possible to calculate the eventual size of the signature by serializing except for the signature (that depends on the digest and cypher but is set at 1024 bytes) and later added unsigned attributes like timestamps.
-
Returns
-
the estimated size of the complete CMS container before signature is added, size for the signature is added, size for other attributes like timestamps is not.
◆ Serialize()
virtual byte [] iText.Signatures.Cms.CMSContainer.Serialize |
( |
|
) |
|
|
inlinevirtual |
Serializes the SignedData structure and makes the signer infos signed attributes read only.
-
Returns
-
the encoded DignedData structure.
◆ SetEncapContentInfo()
This represents the signed content.
This represents the signed content. In the case of a signed PDF document this will be of type data with no content. Defaults to 1.2.840.113549.1.7.1 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-7(7) id-data(1)}
-
Parameters
-
encapContentInfo |
a representation of the data to be signed. |
◆ SetSerializedSignedAttributes()
virtual void iText.Signatures.Cms.CMSContainer.SetSerializedSignedAttributes |
( |
byte[] |
signedAttributesData |
) |
|
|
inlinevirtual |
Sets the Signed Attributes of the signer info to this serialized version.
Sets the Signed Attributes of the signer info to this serialized version. The signed attributes will become read-only.
-
Parameters
-
signedAttributesData |
the serialized Signed Attributes |
◆ SetSignerInfo()
virtual void iText.Signatures.Cms.CMSContainer.SetSignerInfo |
( |
SignerInfo |
signerInfo |
) |
|
|
inlinevirtual |
This class only supports one signer per signature field.
-
Parameters
-
signerInfo |
the singerInfo |