diff options
| author | Ingo Klöcker <[email protected]> | 2024-01-05 12:10:22 +0100 |
|---|---|---|
| committer | Ingo Klöcker <[email protected]> | 2024-01-05 12:10:22 +0100 |
| commit | c631622484dc9c00a05e3c25c53ef263db83b381 (patch) | |
| tree | 84d9986d50ea50d3ff66d175ea36da47e21761b0 /lang/qt/src/verifydetachedjob.h | |
| parent | core: Tell gpg that we want to verify signed data (diff) | |
| download | gpgme-c631622484dc9c00a05e3c25c53ef263db83b381.tar.gz gpgme-c631622484dc9c00a05e3c25c53ef263db83b381.zip | |
qt: Support verification of detached signatures directly from files
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (VerifyDetachedJob): Move definition of
constructor and destructor and inclusion of the moc file to the
corresponding .cpp file.
* lang/qt/src/verifydetachedjob.cpp: New.
* lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Add member
functions setSignatureFile, signatureFile, setSignedFile, signedFile.
* lang/qt/src/verifydetachedjob_p.h: New.
* lang/qt/src/qgpgmeverifydetachedjob.cpp (class
QGpgMEVerifyDetachedJobPrivate): New.
(QGpgMEVerifyDetachedJob::QGpgMEVerifyDetachedJob): Instantiate private
job class.
(verify_from_filename): New.
* lang/qt/tests/Makefile.am: Add new test program.
* lang/qt/tests/run-verifydetachedjob.cpp: New.
--
This makes it possible to tell gpg to read the input directly from the
specified files bypassing GpgME's Data IO when verifying a detached
signature.
GnuPG-bug-id: 6550
Diffstat (limited to 'lang/qt/src/verifydetachedjob.h')
| -rw-r--r-- | lang/qt/src/verifydetachedjob.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lang/qt/src/verifydetachedjob.h b/lang/qt/src/verifydetachedjob.h index 12fdfbb0..c8c516bf 100644 --- a/lang/qt/src/verifydetachedjob.h +++ b/lang/qt/src/verifydetachedjob.h @@ -36,7 +36,6 @@ #define __KLEO_VERIFYDETACHEDJOB_H__ #include "job.h" -#include "qgpgme_export.h" #include <memory> @@ -62,6 +61,12 @@ namespace QGpgME 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(). */ @@ -71,7 +76,23 @@ class QGPGME_EXPORT VerifyDetachedJob : public Job protected: explicit VerifyDetachedJob(QObject *parent); public: - ~VerifyDetachedJob(); + ~VerifyDetachedJob() override; + + /** + * Sets the path of the file containing the signature to verify. + * + * Used if the job is started with startIt(). + */ + void setSignatureFile(const QString &path); + QString signatureFile() const; + + /** + * Sets the path of the file containing the signed data to verify. + * + * Used if the job is started with startIt(). + */ + void setSignedFile(const QString &path); + QString signedFile() const; /** Starts the verification operation. \a signature contains the |
