PoDoFo
1.0.0-dev
|
This class computes a CMS signature according to RFC 5652. More...
#include <PdfSignerCms.h>
Inherits PoDoFo::PdfSigner.
Public Member Functions | |
PdfSignerCms (const bufferview &cert, const bufferview &pkey, const PdfSignerCmsParams ¶meters={ }) | |
Load X.509 certificate and supply a ASN.1 DER encoded private key. More... | |
PdfSignerCms (const bufferview &cert, const PdfSignerCmsParams ¶meters={ }) | |
Load a X.509 certificate without supplying a private key. More... | |
void | AppendData (const bufferview &data) override |
void | ComputeSignature (charbuff &buffer, bool dryrun) override |
void | FetchIntermediateResult (charbuff &result) override |
void | ComputeSignatureDeferred (const bufferview &processedResult, charbuff &contents, bool dryrun) override |
void | Reset () override |
std::string | GetSignatureFilter () const override |
std::string | GetSignatureSubFilter () const override |
std::string | GetSignatureType () const override |
bool | SkipBufferClear () const override |
void | AddAttribute (const std::string_view &nid, const bufferview &attr, PdfSignatureAttributeFlags flags=PdfSignatureAttributeFlags::None) |
Add a signature attribute with given identifier from the input. More... | |
void | ReserveAttributeSize (unsigned attrSize) |
Reserve some size in the final signature. More... | |
const PdfSignerCmsParams & | GetParameters () const |
This class computes a CMS signature according to RFC 5652.
PdfSignerCms::PdfSignerCms | ( | const bufferview & | cert, |
const bufferview & | pkey, | ||
const PdfSignerCmsParams & | parameters = { } |
||
) |
Load X.509 certificate and supply a ASN.1 DER encoded private key.
cert | ASN.1 DER encoded X.509 certificate |
pkey | ASN.1 DER encoded private key (PKCS#1 or PKCS#8) formats. It can be empty. In that case signing can be supplied by a signing service, or performing a deferred signing |
PdfSignerCms::PdfSignerCms | ( | const bufferview & | cert, |
const PdfSignerCmsParams & | parameters = { } |
||
) |
Load a X.509 certificate without supplying a private key.
cert | ASN.1 DER encoded X.509 certificate |
void PdfSignerCms::AddAttribute | ( | const std::string_view & | nid, |
const bufferview & | attr, | ||
PdfSignatureAttributeFlags | flags = PdfSignatureAttributeFlags::None |
||
) |
Add a signature attribute with given identifier from the input.
nid | the numerical identifier |
attr | the attribute bytes. By default, the bytes are parsed for valid ASN.1 input |
void PdfSignerCms::ReserveAttributeSize | ( | unsigned | attrSize | ) |
Reserve some size in the final signature.
It is used in dry-runs to enlarge the signature buffer