Poppler Qt6 24.05.0
Public Types | Public Member Functions | List of all members
Poppler::FormFieldSignature Class Reference

#include <poppler-form.h>

Inheritance diagram for Poppler::FormFieldSignature:
Inheritance graph
[legend]
Collaboration diagram for Poppler::FormFieldSignature:
Collaboration graph
[legend]

Public Types

enum  SignatureType {
  UnknownSignatureType , AdbePkcs7sha1 , AdbePkcs7detached , EtsiCAdESdetached ,
  UnsignedSignature
}
 
enum  SigningResult { FieldAlreadySigned , GenericSigningError , SigningSuccess }
 
enum  ValidateOptions { ValidateVerifyCertificate = 1 , ValidateForceRevalidation = 2 , ValidateWithoutOCSPRevocationCheck = 4 , ValidateUseAIACertFetch = 8 }
 
- Public Types inherited from Poppler::FormField
enum  AdditionalActionType { FieldModified , FormatField , ValidateField , CalculateField }
 
enum  FormType { FormButton , FormText , FormChoice , FormSignature }
 

Public Member Functions

SigningResult sign (const QString &outputFileName, const PDFConverter::NewSignatureData &data) const
 
SignatureType signatureType () const
 
FormType type () const override
 
POPPLER_QT6_DEPRECATED SignatureValidationInfo validate (int opt, const QDateTime &validationTime) const
 
POPPLER_QT6_DEPRECATED SignatureValidationInfo validate (ValidateOptions opt) const
 
std::pair< SignatureValidationInfo, std::shared_ptr< AsyncObject > > validateAsync (ValidateOptions opt, const QDateTime &validationTime={}) const
 
SignatureValidationInfo::CertificateStatus validateResult () const
 
 ~FormFieldSignature () override
 
- Public Member Functions inherited from Poppler::FormField
std::unique_ptr< LinkactivationAction () const
 
std::unique_ptr< LinkadditionalAction (AdditionalActionType type) const
 
std::unique_ptr< LinkadditionalAction (Annotation::AdditionalActionType type) const
 
QString fullyQualifiedName () const
 
int id () const
 
bool isPrintable () const
 
bool isReadOnly () const
 
bool isVisible () const
 
QString name () const
 
QRectF rect () const
 
void setName (const QString &name) const
 
void setPrintable (bool value)
 
void setReadOnly (bool value)
 
void setVisible (bool value)
 
QString uiName () const
 

Detailed Description

A form field that represents a signature.

Member Enumeration Documentation

◆ SignatureType

The types of signature fields.

Enumerator
UnsignedSignature 
Since
22.02

◆ SigningResult

Since
22.02
Enumerator
FieldAlreadySigned 

Trying to sign a field that is already signed.

◆ ValidateOptions

The validation options of this signature.

Enumerator
ValidateVerifyCertificate 

Validate the certificate.

ValidateForceRevalidation 

Force revalidation of the certificate.

ValidateWithoutOCSPRevocationCheck 

Do not contact OCSP servers to check for certificate revocation status.

Since
21.10
ValidateUseAIACertFetch 

Use the AIA extension for certificate fetching.

Since
21.10

Member Function Documentation

◆ sign()

SigningResult Poppler::FormFieldSignature::sign ( const QString &  outputFileName,
const PDFConverter::NewSignatureData data 
) const

Signs a field of UnsignedSignature type.

Ignores data.page(), data.fieldPartialName() and data.boundingRectangle()

Since
22.02

◆ type()

FormType Poppler::FormFieldSignature::type ( ) const
overridevirtual

The type of the field.

Implements Poppler::FormField.

◆ validate() [1/2]

POPPLER_QT6_DEPRECATED SignatureValidationInfo Poppler::FormFieldSignature::validate ( int  opt,
const QDateTime &  validationTime 
) const

Validate the signature with validationTime as validation time.

Reset signature validatation info of scoped instance.

Note
depending on the backend, some options are only partially respected. In case of the NSS backend, the two options requiring network access, AIAFetch and OCSP, can be toggled individually. In case of the GPG backend, if either OCSP is used or AIAFetch is used, the other one is also used.
Deprecated:
Please rewrite to the async version, that allows the network traffic part of fetching to happen in the background

◆ validate() [2/2]

POPPLER_QT6_DEPRECATED SignatureValidationInfo Poppler::FormFieldSignature::validate ( ValidateOptions  opt) const

Validate the signature with now as validation time.

Reset signature validatation info of scoped instance.

Note
depending on the backend, some options are only partially respected. In case of the NSS backend, the two options requiring network access, AIAFetch and OCSP, can be toggled individually. In case of the GPG backend, if either OCSP is used or AIAFetch is used, the other one is also used.
Deprecated:
Please rewrite to the async version, that allows the network traffic part of fetching to happen in the background

◆ validateAsync()

std::pair< SignatureValidationInfo, std::shared_ptr< AsyncObject > > Poppler::FormFieldSignature::validateAsync ( ValidateOptions  opt,
const QDateTime &  validationTime = {} 
) const

Validate the signature with validationTime as validation time.

Reset signature validatation info of scoped instance.

Since
24.05
Note
depending on the backend, some options are only partially respected. In case of the NSS backend, the two options requiring network access, AIAFetch and OCSP, can be toggled individually. In case of the GPG backend, if either OCSP is used or AIAFetch is used, the other one is also used.
certificate validation will have started when this function return. See validateResult on how to get certifcate validation
connections to AsyncObject must happen by the caller before returning control to the event loop, else signals is not guaranteed to be delivered

◆ validateResult()

SignatureValidationInfo::CertificateStatus Poppler::FormFieldSignature::validateResult ( ) const
Returns
the updated signature validation info from validateAsync
Note
that this function will block if the result is not yet ready. Wait for the AsyncObject::done signal to avoid this function blocking on an inconvenient time
Since
24.05

The documentation for this class was generated from the following file: