diff options
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/multipartsigned.cpp')
-rw-r--r-- | framework/src/domain/mime/mimetreeparser/multipartsigned.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/multipartsigned.cpp b/framework/src/domain/mime/mimetreeparser/multipartsigned.cpp index 6ecb09af..5c00e7dc 100644 --- a/framework/src/domain/mime/mimetreeparser/multipartsigned.cpp +++ b/framework/src/domain/mime/mimetreeparser/multipartsigned.cpp | |||
@@ -67,16 +67,16 @@ MessagePart::Ptr MultiPartSignedBodyPartFormatter::process(Interface::BodyPart & | |||
67 | protocolContentType = signatureContentType; | 67 | protocolContentType = signatureContentType; |
68 | } | 68 | } |
69 | 69 | ||
70 | const QGpgME::Protocol *protocol = nullptr; | 70 | GpgME::Protocol protocol = GpgME::UnknownProtocol; |
71 | if (protocolContentType == QLatin1String("application/pkcs7-signature") || | 71 | if (protocolContentType == QLatin1String("application/pkcs7-signature") || |
72 | protocolContentType == QLatin1String("application/x-pkcs7-signature")) { | 72 | protocolContentType == QLatin1String("application/x-pkcs7-signature")) { |
73 | protocol = QGpgME::smime(); | 73 | protocol = GpgME::CMS; |
74 | } else if (protocolContentType == QLatin1String("application/pgp-signature") || | 74 | } else if (protocolContentType == QLatin1String("application/pgp-signature") || |
75 | protocolContentType == QLatin1String("application/x-pgp-signature")) { | 75 | protocolContentType == QLatin1String("application/x-pgp-signature")) { |
76 | protocol = QGpgME::openpgp(); | 76 | protocol = GpgME::OpenPGP; |
77 | } | 77 | } |
78 | 78 | ||
79 | if (!protocol) { | 79 | if (protocol == GpgME::UnknownProtocol) { |
80 | return MessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), signedData, false)); | 80 | return MessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), signedData, false)); |
81 | } | 81 | } |
82 | 82 | ||
@@ -88,9 +88,6 @@ MessagePart::Ptr MultiPartSignedBodyPartFormatter::process(Interface::BodyPart & | |||
88 | SignedMessagePart::Ptr mp(new SignedMessagePart(part.objectTreeParser(), | 88 | SignedMessagePart::Ptr mp(new SignedMessagePart(part.objectTreeParser(), |
89 | aCodec->toUnicode(cleartext), protocol, | 89 | aCodec->toUnicode(cleartext), protocol, |
90 | part.nodeHelper()->fromAsString(node), signature, signedData)); | 90 | part.nodeHelper()->fromAsString(node), signature, signedData)); |
91 | if (!protocol) { | ||
92 | mp->partMetaData()->auditLogError = GpgME::Error(GPG_ERR_NOT_IMPLEMENTED); | ||
93 | } | ||
94 | 91 | ||
95 | return mp; | 92 | return mp; |
96 | } | 93 | } |