Poppler Qt5 24.12.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 {
  AdbePkcs7sha1 , AdbePkcs7detached , EtsiCAdESdetached , UnknownSignatureType ,
  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_QT5_DEPRECATED SignatureValidationInfo validate (int opt, const QDateTime &validationTime) const
 
POPPLER_QT5_DEPRECATED SignatureValidationInfo validate (ValidateOptions opt) const
 
std::pair< SignatureValidationInfo, std::shared_ptr< AsyncObject > > validateAsync (ValidateOptions opt, const QDateTime &validationTime={}) const
 
SignatureValidationInfo::CertificateStatus validateResult () const
 
- Public Member Functions inherited from Poppler::FormField
LinkactivationAction () const
 
LinkadditionalAction (AdditionalActionType type) const
 
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.

Since
0.51

Member Enumeration Documentation

◆ SignatureType

The types of signature fields.

Since
0.58
Enumerator
UnknownSignatureType 
Since
0.90
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

◆ signatureType()

SignatureType Poppler::FormFieldSignature::signatureType ( ) const

The signature type.

Since
0.58

◆ type()

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

The type of the field.

Implements Poppler::FormField.

◆ validate() [1/2]

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

Since
0.58
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_QT5_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: