summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/mimetreeparser/messagepart.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-05 10:39:32 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-06 17:21:01 +0200
commit01594e68275a09c67b5ee258e2af86598118a6a0 (patch)
tree4f859815f6455906bb656f9cc27ba5d6e4111599 /framework/src/domain/mime/mimetreeparser/messagepart.h
parent481cb9f600caf3f45596bf78b5ba2bd07007969c (diff)
downloadkube-01594e68275a09c67b5ee258e2af86598118a6a0.tar.gz
kube-01594e68275a09c67b5ee258e2af86598118a6a0.zip
Port to gpgme only.
QGpgme and Gpgmepp are not readily available, the cmake files buggy, the buildsystem horrendous and generally just difficult to build on windows. Given that all they are is a wrapper around gpgme, we're better of without all the indirections. What we loose is: * QGpgme moved the work to separate threads (but we then blocked anyways), something that we can just do in our own code should we want to. * QGpgme has a function to prettify dn's that was used to show the signer. Also something we could bring back should we need to (don't know where it is useful atm.) Ported messagepart to gpgme Almost there Moved the crypto bits to a separate file All gpg code is in one place. All tests passing Use error codes Cleanup
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/messagepart.h')
-rw-r--r--framework/src/domain/mime/mimetreeparser/messagepart.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/messagepart.h b/framework/src/domain/mime/mimetreeparser/messagepart.h
index 3c07ca88..c576699e 100644
--- a/framework/src/domain/mime/mimetreeparser/messagepart.h
+++ b/framework/src/domain/mime/mimetreeparser/messagepart.h
@@ -23,6 +23,7 @@
23#include "util.h" 23#include "util.h"
24#include "enums.h" 24#include "enums.h"
25#include "partmetadata.h" 25#include "partmetadata.h"
26#include <crypto.h>
26 27
27#include <KMime/Message> 28#include <KMime/Message>
28 29
@@ -32,13 +33,6 @@
32class QTextCodec; 33class QTextCodec;
33class PartPrivate; 34class PartPrivate;
34 35
35namespace GpgME
36{
37class ImportResult;
38class VerificationResult;
39class Signature;
40}
41
42namespace KMime 36namespace KMime
43{ 37{
44class Content; 38class Content;
@@ -55,11 +49,10 @@ class MultiPartAlternativeBodyPartFormatter;
55class SignedMessagePart; 49class SignedMessagePart;
56class EncryptedMessagePart; 50class EncryptedMessagePart;
57 51
58enum CryptoProtocol { 52using Crypto::CryptoProtocol;
59 UnknownProtocol, 53using Crypto::CryptoProtocol::CMS;
60 OpenPGP, 54using Crypto::CryptoProtocol::OpenPGP;
61 CMS 55using Crypto::CryptoProtocol::UnknownProtocol;
62};
63 56
64class MessagePart : public QObject 57class MessagePart : public QObject
65{ 58{
@@ -366,8 +359,8 @@ public:
366 QString htmlContent() const Q_DECL_OVERRIDE; 359 QString htmlContent() const Q_DECL_OVERRIDE;
367 360
368private: 361private:
369 void sigStatusToMetaData(const GpgME::Signature &signature); 362 void sigStatusToMetaData(const Crypto::Signature &signature);
370 void setVerificationResult(const GpgME::VerificationResult &result, bool parseText, const QByteArray &plainText); 363 void setVerificationResult(const Crypto::VerificationResult &result, bool parseText, const QByteArray &plainText);
371 364
372protected: 365protected:
373 CryptoProtocol mProtocol; 366 CryptoProtocol mProtocol;