Loading...
Searching...
No Matches
QGpgME::VerifyDetachedJob Class Referenceabstract

An abstract base class for asynchronous verification of detached signatures. More...

`#include <verifydetachedjob.h>`

Inheritance diagram for QGpgME::VerifyDetachedJob:
[legend]
Collaboration diagram for QGpgME::VerifyDetachedJob:
[legend]

## Signals

void | result (const GpgME::VerificationResult &result, const QString &auditLogAsHtml=QString(), const GpgME::Error &auditLogError=GpgME::Error())
Signals inherited from QGpgME::Job
void | jobProgress (int current, int total)
void | rawProgress (const QString &what, int type, int current, int total)
QGPGME_DEPRECATED void | progress (const QString &what, int current, int total)
void | done ()

## Public Member Functions

void | setProcessAllSignatures (bool processAll)
bool | processAllSignatures () const
void | setSignatureFile (const QString &path)
QString | signatureFile () const
void | setSignedFile (const QString &path)
QString | signedFile () const
virtual GpgME::Error | start (const QByteArray &signature, const QByteArray &signedData)=0
virtual void | start (const std::shared_ptr< QIODevice > &signature, const std::shared_ptr< QIODevice > &signedData)=0
virtual GpgME::VerificationResult | exec (const QByteArray &signature, const QByteArray &signedData)=0
Public Member Functions inherited from QGpgME::Job
virtual QString | auditLogAsHtml () const
virtual GpgME::Error | auditLogError () const
bool | isAuditLogSupported () const
GpgME::Error | startIt ()
void | startNow ()

## Protected Member Functions

| VerifyDetachedJob (std::unique_ptr< VerifyDetachedJobPrivate >, QObject *parent)
Protected Member Functions inherited from QGpgME::Job
| Job (std::unique_ptr< JobPrivate >, QObject *parent)
| Job (QObject *parent)

## Additional Inherited Members

Public Slots inherited from QGpgME::Job
virtual void | slotCancel ()=0
Static Public Member Functions inherited from QGpgME::Job
static GpgME::Context * | context (Job *job)
Protected Attributes inherited from QGpgME::Job
const std::unique_ptr< JobPrivate > | d_ptr

## Detailed Description

An abstract base class for asynchronous verification of detached signatures.

To use a VerifyDetachedJob, first obtain an instance from the CryptoBackend implementation, connect the progress() and result() signals to suitable slots and then start the verification with a call to start(). This call might fail, in which case the VerifyDetachedJob instance will have scheduled it's own destruction with a call to QObject::deleteLater().

Alternatively, the job can be started with startIt() after setting the input files. If the job is started this way then the backend reads the input directly from the specified input files. This direct IO mode is currently only supported for OpenPGP. Note that startIt() does not schedule the job's destruction if starting the job failed.

After result() is emitted, the VerifyDetachedJob will schedule it's own destruction by calling QObject::deleteLater().

## Member Function Documentation

## setProcessAllSignatures()

void VerifyDetachedJob::setProcessAllSignatures | ( | bool | processAll | ) |

Enables processing of all signatures if processAll is true.

By default, gpg (in batch mode used by GpgME) stops the verification of data signatures when a bad signature is encountered. This can be changed by setting this flag. It's equivalent to setting the context flag "proc-all-sigs".

This is only supported for OpenPGP and requires GnuPG 2.2.45, 2.4.6, or 2.5.1.

## setSignatureFile()

void VerifyDetachedJob::setSignatureFile | ( | const QString & | path | ) |

Sets the path of the file containing the signature to verify.

Used if the job is started with startIt().

## setSignedFile()

void VerifyDetachedJob::setSignedFile | ( | const QString & | path | ) |

Sets the path of the file containing the signed data to verify.

Used if the job is started with startIt().

## start()

virtual GpgME::Error QGpgME::VerifyDetachedJob::start | ( | const QByteArray & | signature,
|  | const QByteArray & | signedData )

pure virtual

Starts the verification operation. signature contains the signature data, while signedData contains the data over which the signature was made.

Implemented in QGpgME::QGpgMEVerifyDetachedJob.

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

- verifydetachedjob.h
- verifydetachedjob.cpp