summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mimetreeparser/otp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/mimetreeparser/otp')
-rw-r--r--framework/src/domain/mimetreeparser/otp/CMakeLists.txt72
-rw-r--r--framework/src/domain/mimetreeparser/otp/applicationpgpencrypted.cpp98
-rw-r--r--framework/src/domain/mimetreeparser/otp/applicationpgpencrypted.h41
-rw-r--r--framework/src/domain/mimetreeparser/otp/applicationpkcs7mime.cpp178
-rw-r--r--framework/src/domain/mimetreeparser/otp/applicationpkcs7mime.h41
-rw-r--r--framework/src/domain/mimetreeparser/otp/attachmentstrategy.cpp343
-rw-r--r--framework/src/domain/mimetreeparser/otp/attachmentstrategy.h86
-rw-r--r--framework/src/domain/mimetreeparser/otp/attachmenttemporaryfilesdirs.cpp108
-rw-r--r--framework/src/domain/mimetreeparser/otp/attachmenttemporaryfilesdirs.h57
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/CMakeLists.txt46
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/attachmenttest.cpp68
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/cryptohelpertest.cpp144
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/cryptohelpertest.h42
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox22
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox.html17
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox.tree2
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox34
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox.html17
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox.tree2
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/forward-openpgp-signed-encrypted.mbox.html84
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encoded.mbox.html38
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted+signed.mbox.html55
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html80
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-attachment.mbox.html69
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-non-encrypted-attachment.mbox.html72
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-partially-signed-attachments.mbox.html102
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-inline-charset-encrypted.mbox.html50
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-inline-signed.mbox.html38
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-base64-mailman-footer.mbox.html81
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-encrypted-two-attachments.mbox.html91
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-encrypted.mbox.html58
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-mailinglist+old.mbox.html97
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-mailinglist.mbox.html68
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-two-attachments.mbox.html74
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/signed-forward-openpgp-signed-encrypted.mbox.html111
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-opaque-enc+sign.mbox.html60
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-opaque-sign.mbox.html43
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-signed-encrypted.mbox.html58
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox53
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox.html51
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox.tree10
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox69
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox.html81
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox.tree9
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html61
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-attachment.mbox.html58
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-non-encrypted-attachment.mbox.html61
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-partially-signed-attachments.mbox.html84
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-two-attachments.mbox.html34
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-apple.mbox.html50
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-encrypted-two-attachments.mbox.html58
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-mailinglist+additional-children.mbox.html52
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-no-protocol.mbox.html28
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-two-attachments.mbox.html41
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/smime-signed-apple.mbox.html50
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/encapsulated-with-attachment.mbox.html43
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html61
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-attachment.mbox.html58
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-noData.mbox.html10
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-non-encrypted-attachment.mbox.html61
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-partially-signed-attachments.mbox.html84
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-two-attachments.mbox.html34
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-apple.mbox.html50
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-encrypted-two-attachments.mbox.html58
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-mailinglist+additional-children.mbox.html44
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-no-protocol.mbox.html28
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-two-attachments.mbox.html41
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/hidden/smime-signed-apple.mbox.html50
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox31
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox.html17
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox.tree2
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox21
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox.html12
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox.tree2
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/htmlonlyexternal.mbox21
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-encrypted-partially-signed-attachments.mbox.html92
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-encrypted-two-attachments.mbox.html50
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-signed-encrypted-two-attachments.mbox.html74
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-signed-two-attachments.mbox.html57
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlined/encapsulated-with-attachment.mbox.html58
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html90
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-attachment.mbox.html74
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-non-encrypted-attachment.mbox.html74
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-signed-apple.mbox.html63
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-signed-mailinglist+additional-children.mbox.html67
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlined/smime-signed-apple.mbox.html63
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox33
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox.html36
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox.tree4
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox55
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox.html24
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox.tree3
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox29
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.html26
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.inProgress.html24
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.tree3
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/mailheader.css512
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox7
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox.html14
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox.tree3
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox33
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox.html35
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox.tree4
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox46
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox.html52
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox.tree5
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox52
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox.html39
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox.tree7
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox115
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html77
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.tree11
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox57
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox.html66
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox.tree8
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox48
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox.html34
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox.tree5
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox17
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox.html19
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox.tree4
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox114
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox.html69
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox.tree9
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox91
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox.html99
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox.tree12
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox42
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox.html64
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox.tree9
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox36
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.html31
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.inProgress.html24
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.tree4
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox40
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.html47
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.inProgress.html24
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.tree4
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed-broken.mbox26
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox26
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.html35
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.inProgress.html22
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.tree3
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox34
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox.html47
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox.tree4
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox129
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.html58
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.inProgress.html49
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.tree3
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox117
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox.html78
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox.tree7
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox52
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox.html88
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox.tree10
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox47
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox.html55
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox.tree5
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox126
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox.html60
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox.tree10
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox67
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox.html94
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox.tree13
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox121
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.html65
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.inProgress.html56
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.tree7
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox35
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox.html36
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox.tree5
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox54
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox.html71
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox.tree9
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox92
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox.html105
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox.tree10
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox24
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox.html10
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox.tree2
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox23
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox.html31
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox.tree4
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox22
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.html31
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.inProgress.html24
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.tree4
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox37
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox.html57
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox.tree5
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox25
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.html40
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.inProgress.html22
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.tree4
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-signed-encrypted-attachment.mbox50
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox197
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.html58
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.inProgress.html49
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.tree3
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox38
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox.html55
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox.tree5
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox163
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox.html38
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox.tree5
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/kdepim_add_gpg_crypto_test.cmake61
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/kdepim_generate_crypto_test_wrapper.cmake45
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/nodehelpertest.cpp275
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/nodehelpertest.h45
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/setupenv.cpp34
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/setupenv.h175
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp106
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.h50
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/util.cpp34
-rw-r--r--framework/src/domain/mimetreeparser/otp/autotests/util.h43
-rw-r--r--framework/src/domain/mimetreeparser/otp/bodypart.cpp41
-rw-r--r--framework/src/domain/mimetreeparser/otp/bodypart.h209
-rw-r--r--framework/src/domain/mimetreeparser/otp/bodypartformatter.cpp147
-rw-r--r--framework/src/domain/mimetreeparser/otp/bodypartformatter.h149
-rw-r--r--framework/src/domain/mimetreeparser/otp/bodypartformatter_impl.cpp193
-rw-r--r--framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.cpp179
-rw-r--r--framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h85
-rw-r--r--framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory_p.h57
-rw-r--r--framework/src/domain/mimetreeparser/otp/cryptobodypartmemento.cpp56
-rw-r--r--framework/src/domain/mimetreeparser/otp/cryptobodypartmemento.h75
-rw-r--r--framework/src/domain/mimetreeparser/otp/cryptohelper.cpp150
-rw-r--r--framework/src/domain/mimetreeparser/otp/cryptohelper.h62
-rw-r--r--framework/src/domain/mimetreeparser/otp/decryptverifybodypartmemento.cpp86
-rw-r--r--framework/src/domain/mimetreeparser/otp/decryptverifybodypartmemento.h81
-rw-r--r--framework/src/domain/mimetreeparser/otp/enums.h54
-rw-r--r--framework/src/domain/mimetreeparser/otp/filehtmlwriter.cpp119
-rw-r--r--framework/src/domain/mimetreeparser/otp/filehtmlwriter.h70
-rw-r--r--framework/src/domain/mimetreeparser/otp/htmlwriter.cpp40
-rw-r--r--framework/src/domain/mimetreeparser/otp/htmlwriter.h125
-rw-r--r--framework/src/domain/mimetreeparser/otp/mailman.cpp183
-rw-r--r--framework/src/domain/mimetreeparser/otp/mailman.h44
-rw-r--r--framework/src/domain/mimetreeparser/otp/messagepart.cpp1352
-rw-r--r--framework/src/domain/mimetreeparser/otp/messagepart.h422
-rw-r--r--framework/src/domain/mimetreeparser/otp/messagepartrenderer.cpp23
-rw-r--r--framework/src/domain/mimetreeparser/otp/messagepartrenderer.h43
-rw-r--r--framework/src/domain/mimetreeparser/otp/mimetreeparser_debug.cpp3
-rw-r--r--framework/src/domain/mimetreeparser/otp/mimetreeparser_debug.h4
-rw-r--r--framework/src/domain/mimetreeparser/otp/multipartalternative.cpp94
-rw-r--r--framework/src/domain/mimetreeparser/otp/multipartalternative.h41
-rw-r--r--framework/src/domain/mimetreeparser/otp/multipartencrypted.cpp111
-rw-r--r--framework/src/domain/mimetreeparser/otp/multipartencrypted.h41
-rw-r--r--framework/src/domain/mimetreeparser/otp/multipartmixed.cpp61
-rw-r--r--framework/src/domain/mimetreeparser/otp/multipartmixed.h41
-rw-r--r--framework/src/domain/mimetreeparser/otp/multipartsigned.cpp114
-rw-r--r--framework/src/domain/mimetreeparser/otp/multipartsigned.h41
-rw-r--r--framework/src/domain/mimetreeparser/otp/nodehelper.cpp1069
-rw-r--r--framework/src/domain/mimetreeparser/otp/nodehelper.h290
-rw-r--r--framework/src/domain/mimetreeparser/otp/objecttreeparser.cpp495
-rw-r--r--framework/src/domain/mimetreeparser/otp/objecttreeparser.h406
-rw-r--r--framework/src/domain/mimetreeparser/otp/objecttreesource.cpp28
-rw-r--r--framework/src/domain/mimetreeparser/otp/objecttreesource.h109
-rw-r--r--framework/src/domain/mimetreeparser/otp/partmetadata.h67
-rw-r--r--framework/src/domain/mimetreeparser/otp/partnodebodypart.cpp125
-rw-r--r--framework/src/domain/mimetreeparser/otp/partnodebodypart.h108
-rw-r--r--framework/src/domain/mimetreeparser/otp/qgpgmejobexecutor.cpp158
-rw-r--r--framework/src/domain/mimetreeparser/otp/qgpgmejobexecutor.h86
-rw-r--r--framework/src/domain/mimetreeparser/otp/queuehtmlwriter.cpp136
-rw-r--r--framework/src/domain/mimetreeparser/otp/queuehtmlwriter.h75
-rw-r--r--framework/src/domain/mimetreeparser/otp/texthtml.cpp58
-rw-r--r--framework/src/domain/mimetreeparser/otp/texthtml.h41
-rw-r--r--framework/src/domain/mimetreeparser/otp/textplain.cpp78
-rw-r--r--framework/src/domain/mimetreeparser/otp/textplain.h41
-rw-r--r--framework/src/domain/mimetreeparser/otp/util.cpp136
-rw-r--r--framework/src/domain/mimetreeparser/otp/util.h67
-rw-r--r--framework/src/domain/mimetreeparser/otp/utils.cpp70
-rw-r--r--framework/src/domain/mimetreeparser/otp/utils.h42
-rw-r--r--framework/src/domain/mimetreeparser/otp/verifydetachedbodypartmemento.cpp177
-rw-r--r--framework/src/domain/mimetreeparser/otp/verifydetachedbodypartmemento.h87
-rw-r--r--framework/src/domain/mimetreeparser/otp/verifyopaquebodypartmemento.cpp179
-rw-r--r--framework/src/domain/mimetreeparser/otp/verifyopaquebodypartmemento.h93
276 files changed, 0 insertions, 19955 deletions
diff --git a/framework/src/domain/mimetreeparser/otp/CMakeLists.txt b/framework/src/domain/mimetreeparser/otp/CMakeLists.txt
deleted file mode 100644
index f480fa21..00000000
--- a/framework/src/domain/mimetreeparser/otp/CMakeLists.txt
+++ /dev/null
@@ -1,72 +0,0 @@
1add_definitions( -DQT_NO_CAST_FROM_ASCII )
2add_definitions( -DQT_NO_CAST_TO_ASCII )
3add_definitions("-fvisibility=default")
4
5find_package(Qt5 COMPONENTS REQUIRED Core Gui)
6find_package(KF5Mime "4.87.0" CONFIG REQUIRED)
7find_package(QGpgme CONFIG REQUIRED)
8find_package(KF5Codecs CONFIG REQUIRED)
9find_package(KF5I18n CONFIG REQUIRED)
10
11#add_definitions(-DTRANSLATION_DOMAIN=\"libmimetreeparser\")
12
13# target_include_directories does not handle empty include paths
14include_directories(${GPGME_INCLUDES})
15
16set(libmimetreeparser_SRCS
17 objecttreeparser.cpp
18
19 #Bodyformatter
20 applicationpgpencrypted.cpp
21 applicationpkcs7mime.cpp
22 mailman.cpp
23 multipartalternative.cpp
24 multipartencrypted.cpp
25 multipartmixed.cpp
26 multipartsigned.cpp
27 textplain.cpp
28 texthtml.cpp
29 utils.cpp
30 bodypartformatter_impl.cpp
31
32 #Interfaces
33 bodypartformatter.cpp
34 objecttreesource.cpp
35 bodypart.cpp
36 htmlwriter.cpp
37 messagepartrenderer.cpp
38
39 #bodypartformatter.cpp
40 bodypartformatterbasefactory.cpp
41 cryptohelper.cpp
42 nodehelper.cpp
43 messagepart.cpp
44 partnodebodypart.cpp
45 #Mementos
46 cryptobodypartmemento.cpp
47 decryptverifybodypartmemento.cpp
48 verifydetachedbodypartmemento.cpp
49 verifyopaquebodypartmemento.cpp
50 #Stuff
51 mimetreeparser_debug.cpp
52 qgpgmejobexecutor.cpp
53 util.cpp
54 attachmentstrategy.cpp
55 #HTML Writer
56 queuehtmlwriter.cpp
57 attachmenttemporaryfilesdirs.cpp
58 )
59
60add_library(kube_otp ${libmimetreeparser_SRCS})
61
62target_link_libraries(kube_otp
63 PRIVATE
64 QGpgme
65 KF5::Codecs
66 KF5::I18n
67 KF5::Mime
68 Qt5::Gui
69)
70install(TARGETS kube_otp DESTINATION ${LIB_INSTALL_DIR})
71
72add_subdirectory(autotests)
diff --git a/framework/src/domain/mimetreeparser/otp/applicationpgpencrypted.cpp b/framework/src/domain/mimetreeparser/otp/applicationpgpencrypted.cpp
deleted file mode 100644
index e0f8e30c..00000000
--- a/framework/src/domain/mimetreeparser/otp/applicationpgpencrypted.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "applicationpgpencrypted.h"
21
22#include "utils.h"
23
24#include "objecttreeparser.h"
25#include "messagepart.h"
26
27#include <QGpgME/Protocol>
28
29#include <KMime/Content>
30
31#include "mimetreeparser_debug.h"
32
33using namespace MimeTreeParser;
34
35const ApplicationPGPEncryptedBodyPartFormatter *ApplicationPGPEncryptedBodyPartFormatter::self;
36
37const Interface::BodyPartFormatter *ApplicationPGPEncryptedBodyPartFormatter::create()
38{
39 if (!self) {
40 self = new ApplicationPGPEncryptedBodyPartFormatter();
41 }
42 return self;
43}
44
45Interface::BodyPartFormatter::Result ApplicationPGPEncryptedBodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
46{
47 Q_UNUSED(writer)
48 const auto p = process(*part);
49 const auto mp = static_cast<MessagePart *>(p.data());
50 if (mp) {
51 mp->html(false);
52 return Ok;
53 }
54 return Failed;
55}
56
57Interface::MessagePart::Ptr ApplicationPGPEncryptedBodyPartFormatter::process(Interface::BodyPart &part) const
58{
59 KMime::Content *node(part.content());
60
61 if (node->decodedContent().trimmed() != "Version: 1") {
62 qCWarning(MIMETREEPARSER_LOG) << "Unknown PGP Version String:" << node->decodedContent().trimmed();
63 }
64
65 if (!part.content()->parent()) {
66 return MessagePart::Ptr();
67 }
68
69 KMime::Content *data = findTypeInDirectChilds(part.content()->parent(), "application/octet-stream");
70
71 if (!data) {
72 return MessagePart::Ptr(); //new MimeMessagePart(part.objectTreeParser(), node, false));
73 }
74
75 part.nodeHelper()->setEncryptionState(node, KMMsgFullyEncrypted);
76
77 EncryptedMessagePart::Ptr mp(new EncryptedMessagePart(part.objectTreeParser(),
78 data->decodedText(), QGpgME::openpgp(),
79 part.nodeHelper()->fromAsString(data), node));
80 mp->setIsEncrypted(true);
81 mp->setDecryptMessage(part.source()->decryptMessage());
82 PartMetaData *messagePart(mp->partMetaData());
83 if (!part.source()->decryptMessage()) {
84 part.nodeHelper()->setNodeProcessed(data, false); // Set the data node to done to prevent it from being processed
85 } else if (KMime::Content *newNode = part.nodeHelper()->decryptedNodeForContent(data)) {
86 // if we already have a decrypted node for this encrypted node, don't do the decryption again
87 return MessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), newNode, part.objectTreeParser()->showOnlyOneMimePart()));
88 } else {
89 mp->startDecryption(data);
90 if (!messagePart->inProgress) {
91 part.nodeHelper()->setNodeProcessed(data, false); // Set the data node to done to prevent it from being processed
92 if (messagePart->isDecryptable && messagePart->isSigned) {
93 part.nodeHelper()->setSignatureState(node, KMMsgFullySigned);
94 }
95 }
96 }
97 return mp;
98}
diff --git a/framework/src/domain/mimetreeparser/otp/applicationpgpencrypted.h b/framework/src/domain/mimetreeparser/otp/applicationpgpencrypted.h
deleted file mode 100644
index f0f4865c..00000000
--- a/framework/src/domain/mimetreeparser/otp/applicationpgpencrypted.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_APPLICATIONPGPENCYPTED_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_APPLICATIONPGPENCYPTED_H__
22
23#include "bodypartformatter.h"
24#include "bodypart.h"
25
26namespace MimeTreeParser
27{
28
29class ApplicationPGPEncryptedBodyPartFormatter : public Interface::BodyPartFormatter
30{
31 static const ApplicationPGPEncryptedBodyPartFormatter *self;
32public:
33 Interface::MessagePart::Ptr process(Interface::BodyPart &part) const Q_DECL_OVERRIDE;
34 Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
35 using Interface::BodyPartFormatter::format;
36 static const Interface::BodyPartFormatter *create();
37};
38
39}
40
41#endif
diff --git a/framework/src/domain/mimetreeparser/otp/applicationpkcs7mime.cpp b/framework/src/domain/mimetreeparser/otp/applicationpkcs7mime.cpp
deleted file mode 100644
index bcfc0616..00000000
--- a/framework/src/domain/mimetreeparser/otp/applicationpkcs7mime.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "applicationpkcs7mime.h"
21
22#include "utils.h"
23
24#include "attachmentstrategy.h"
25#include "objecttreeparser.h"
26#include "messagepart.h"
27
28#include <QGpgME/Protocol>
29
30#include <KMime/Content>
31
32#include <QTextCodec>
33
34#include "mimetreeparser_debug.h"
35
36using namespace MimeTreeParser;
37
38const ApplicationPkcs7MimeBodyPartFormatter *ApplicationPkcs7MimeBodyPartFormatter::self;
39
40const Interface::BodyPartFormatter *ApplicationPkcs7MimeBodyPartFormatter::create()
41{
42 if (!self) {
43 self = new ApplicationPkcs7MimeBodyPartFormatter();
44 }
45 return self;
46}
47Interface::BodyPartFormatter::Result ApplicationPkcs7MimeBodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
48{
49 Q_UNUSED(writer)
50 const auto p = process(*part);
51 const auto mp = static_cast<MessagePart *>(p.data());
52 if (mp) {
53 mp->html(false);
54 return Ok;
55 }
56 return Failed;
57}
58
59Interface::MessagePart::Ptr ApplicationPkcs7MimeBodyPartFormatter::process(Interface::BodyPart &part) const
60{
61 KMime::Content *node = part.content();
62
63 if (node->head().isEmpty()) {
64 return MessagePart::Ptr();
65 }
66
67 const auto smimeCrypto = QGpgME::smime();
68 if (!smimeCrypto) {
69 return MessagePart::Ptr();
70 }
71
72 const QString smimeType = node->contentType()->parameter(QStringLiteral("smime-type")).toLower();
73
74 if (smimeType == QLatin1String("certs-only")) {
75 part.processResult()->setNeverDisplayInline(true);
76
77 CertMessagePart::Ptr mp(new CertMessagePart(part.objectTreeParser(), node, smimeCrypto, part.source()->autoImportKeys()));
78 return mp;
79 }
80
81 bool isSigned = (smimeType == QLatin1String("signed-data"));
82 bool isEncrypted = (smimeType == QLatin1String("enveloped-data"));
83
84 // Analyze "signTestNode" node to find/verify a signature.
85 // If zero part.objectTreeParser() verification was successfully done after
86 // decrypting via recursion by insertAndParseNewChildNode().
87 KMime::Content *signTestNode = isEncrypted ? nullptr : node;
88
89 // We try decrypting the content
90 // if we either *know* that it is an encrypted message part
91 // or there is neither signed nor encrypted parameter.
92 MessagePart::Ptr mp;
93 if (!isSigned) {
94 if (isEncrypted) {
95 qCDebug(MIMETREEPARSER_LOG) << "pkcs7 mime == S/MIME TYPE: enveloped (encrypted) data";
96 } else {
97 qCDebug(MIMETREEPARSER_LOG) << "pkcs7 mime - type unknown - enveloped (encrypted) data ?";
98 }
99
100 auto _mp = EncryptedMessagePart::Ptr(new EncryptedMessagePart(part.objectTreeParser(),
101 node->decodedText(), smimeCrypto,
102 part.nodeHelper()->fromAsString(node), node));
103 mp = _mp;
104 _mp->setIsEncrypted(true);
105 _mp->setDecryptMessage(part.source()->decryptMessage());
106 PartMetaData *messagePart(_mp->partMetaData());
107 if (!part.source()->decryptMessage()) {
108 isEncrypted = true;
109 signTestNode = nullptr; // PENDING(marc) to be abs. sure, we'd need to have to look at the content
110 } else {
111 _mp->startDecryption();
112 if (messagePart->isDecryptable) {
113 qCDebug(MIMETREEPARSER_LOG) << "pkcs7 mime - encryption found - enveloped (encrypted) data !";
114 isEncrypted = true;
115 part.nodeHelper()->setEncryptionState(node, KMMsgFullyEncrypted);
116 signTestNode = nullptr;
117
118 } else {
119 // decryption failed, which could be because the part was encrypted but
120 // decryption failed, or because we didn't know if it was encrypted, tried,
121 // and failed. If the message was not actually encrypted, we continue
122 // assuming it's signed
123 if (_mp->passphraseError() || (smimeType.isEmpty() && messagePart->isEncrypted)) {
124 isEncrypted = true;
125 signTestNode = nullptr;
126 }
127
128 if (isEncrypted) {
129 qCDebug(MIMETREEPARSER_LOG) << "pkcs7 mime - ERROR: COULD NOT DECRYPT enveloped data !";
130 } else {
131 qCDebug(MIMETREEPARSER_LOG) << "pkcs7 mime - NO encryption found";
132 }
133 }
134 }
135
136 if (isEncrypted) {
137 part.nodeHelper()->setEncryptionState(node, KMMsgFullyEncrypted);
138 }
139 }
140
141 // We now try signature verification if necessarry.
142 if (signTestNode) {
143 if (isSigned) {
144 qCDebug(MIMETREEPARSER_LOG) << "pkcs7 mime == S/MIME TYPE: opaque signed data";
145 } else {
146 qCDebug(MIMETREEPARSER_LOG) << "pkcs7 mime - type unknown - opaque signed data ?";
147 }
148
149 const QTextCodec *aCodec(part.objectTreeParser()->codecFor(signTestNode));
150 const QByteArray signaturetext = signTestNode->decodedContent();
151 auto _mp = SignedMessagePart::Ptr(new SignedMessagePart(part.objectTreeParser(),
152 aCodec->toUnicode(signaturetext), smimeCrypto,
153 part.nodeHelper()->fromAsString(node), signTestNode));
154 mp = _mp;
155 //mp->setDecryptMessage(part.source()->decryptMessage());
156 PartMetaData *messagePart(mp->partMetaData());
157 if (smimeCrypto) {
158 _mp->startVerificationDetached(signaturetext, nullptr, QByteArray());
159 } else {
160 messagePart->auditLogError = GpgME::Error(GPG_ERR_NOT_IMPLEMENTED);
161 }
162
163 if (_mp->isSigned()) {
164 if (!isSigned) {
165 qCDebug(MIMETREEPARSER_LOG) << "pkcs7 mime - signature found - opaque signed data !";
166 isSigned = true;
167 }
168
169 if (signTestNode != node) {
170 part.nodeHelper()->setSignatureState(node, KMMsgFullySigned);
171 }
172 } else {
173 qCDebug(MIMETREEPARSER_LOG) << "pkcs7 mime - NO signature found :-(";
174 }
175 }
176
177 return mp;
178}
diff --git a/framework/src/domain/mimetreeparser/otp/applicationpkcs7mime.h b/framework/src/domain/mimetreeparser/otp/applicationpkcs7mime.h
deleted file mode 100644
index a9a33f7c..00000000
--- a/framework/src/domain/mimetreeparser/otp/applicationpkcs7mime.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_APPLICATIONPKCS7MIME_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_APPLICATIONPKCS7MIME_H__
22
23#include "bodypartformatter.h"
24#include "bodypart.h"
25
26namespace MimeTreeParser
27{
28
29class ApplicationPkcs7MimeBodyPartFormatter : public Interface::BodyPartFormatter
30{
31 static const ApplicationPkcs7MimeBodyPartFormatter *self;
32public:
33 Interface::MessagePart::Ptr process(Interface::BodyPart &part) const Q_DECL_OVERRIDE;
34 Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
35 using Interface::BodyPartFormatter::format;
36 static const Interface::BodyPartFormatter *create();
37};
38
39}
40
41#endif
diff --git a/framework/src/domain/mimetreeparser/otp/attachmentstrategy.cpp b/framework/src/domain/mimetreeparser/otp/attachmentstrategy.cpp
deleted file mode 100644
index 5ea21133..00000000
--- a/framework/src/domain/mimetreeparser/otp/attachmentstrategy.cpp
+++ /dev/null
@@ -1,343 +0,0 @@
1/* -*- c++ -*-
2 attachmentstrategy.cpp
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6 Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
7 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
8
9 KMail is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License, version 2, as
11 published by the Free Software Foundation.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#include "attachmentstrategy.h"
35
36#include "nodehelper.h"
37#include "util.h"
38
39#include <KMime/Content>
40
41#include <QIcon>
42
43#include "mimetreeparser_debug.h"
44
45using namespace MimeTreeParser;
46
47static AttachmentStrategy::Display smartDisplay(KMime::Content *node)
48{
49 const auto cd = node->contentDisposition(false);
50
51 if (cd && cd->disposition() == KMime::Headers::CDinline)
52 // explict "inline" disposition:
53 {
54 return AttachmentStrategy::Inline;
55 }
56 if (cd && cd->disposition() == KMime::Headers::CDattachment)
57 // explicit "attachment" disposition:
58 {
59 return AttachmentStrategy::AsIcon;
60 }
61
62 const auto ct = node->contentType(false);
63 if (ct && ct->isText() && ct->name().trimmed().isEmpty() &&
64 (!cd || cd->filename().trimmed().isEmpty()))
65 // text/* w/o filename parameter:
66 {
67 return AttachmentStrategy::Inline;
68 }
69 return AttachmentStrategy::AsIcon;
70}
71
72//
73// IconicAttachmentStrategy:
74// show everything but the first text/plain body as icons
75//
76
77class IconicAttachmentStrategy : public AttachmentStrategy
78{
79 friend class AttachmentStrategy;
80protected:
81 IconicAttachmentStrategy() : AttachmentStrategy() {}
82 virtual ~IconicAttachmentStrategy() {}
83
84public:
85 const char *name() const Q_DECL_OVERRIDE
86 {
87 return "iconic";
88 }
89
90 bool inlineNestedMessages() const Q_DECL_OVERRIDE
91 {
92 return false;
93 }
94 Display defaultDisplay(KMime::Content *node) const Q_DECL_OVERRIDE
95 {
96 if (node->contentType()->isText() &&
97 node->contentDisposition()->filename().trimmed().isEmpty() &&
98 node->contentType()->name().trimmed().isEmpty())
99 // text/* w/o filename parameter:
100 {
101 return Inline;
102 }
103 return AsIcon;
104 }
105};
106
107//
108// SmartAttachmentStrategy:
109// in addition to Iconic, show all body parts
110// with content-disposition == "inline" and
111// all text parts without a filename or name parameter inline
112//
113
114class SmartAttachmentStrategy : public AttachmentStrategy
115{
116 friend class AttachmentStrategy;
117protected:
118 SmartAttachmentStrategy() : AttachmentStrategy() {}
119 virtual ~SmartAttachmentStrategy() {}
120
121public:
122 const char *name() const Q_DECL_OVERRIDE
123 {
124 return "smart";
125 }
126
127 bool inlineNestedMessages() const Q_DECL_OVERRIDE
128 {
129 return true;
130 }
131 Display defaultDisplay(KMime::Content *node) const Q_DECL_OVERRIDE
132 {
133 return smartDisplay(node);
134 }
135};
136
137//
138// InlinedAttachmentStrategy:
139// show everything possible inline
140//
141
142class InlinedAttachmentStrategy : public AttachmentStrategy
143{
144 friend class AttachmentStrategy;
145protected:
146 InlinedAttachmentStrategy() : AttachmentStrategy() {}
147 virtual ~InlinedAttachmentStrategy() {}
148
149public:
150 const char *name() const Q_DECL_OVERRIDE
151 {
152 return "inlined";
153 }
154
155 bool inlineNestedMessages() const Q_DECL_OVERRIDE
156 {
157 return true;
158 }
159 Display defaultDisplay(KMime::Content *) const Q_DECL_OVERRIDE
160 {
161 return Inline;
162 }
163};
164
165//
166// HiddenAttachmentStrategy
167// show nothing except the first text/plain body part _at all_
168//
169
170class HiddenAttachmentStrategy : public AttachmentStrategy
171{
172 friend class AttachmentStrategy;
173protected:
174 HiddenAttachmentStrategy() : AttachmentStrategy() {}
175 virtual ~HiddenAttachmentStrategy() {}
176
177public:
178 const char *name() const Q_DECL_OVERRIDE
179 {
180 return "hidden";
181 }
182
183 bool inlineNestedMessages() const Q_DECL_OVERRIDE
184 {
185 return false;
186 }
187 Display defaultDisplay(KMime::Content *node) const Q_DECL_OVERRIDE
188 {
189 if (node->contentType()->isText() &&
190 node->contentDisposition()->filename().trimmed().isEmpty() &&
191 node->contentType()->name().trimmed().isEmpty())
192 // text/* w/o filename parameter:
193 {
194 return Inline;
195 }
196 if (!node->parent()) {
197 return Inline;
198 }
199
200 if (node->parent() && node->parent()->contentType()->isMultipart() &&
201 node->parent()->contentType()->subType() == "related") {
202 return Inline;
203 }
204
205 return None;
206 }
207};
208
209class HeaderOnlyAttachmentStrategy : public AttachmentStrategy
210{
211 friend class AttachmentStrategy;
212protected:
213 HeaderOnlyAttachmentStrategy() : AttachmentStrategy() {}
214 virtual ~HeaderOnlyAttachmentStrategy() {}
215
216public:
217 const char *name() const Q_DECL_OVERRIDE
218 {
219 return "headerOnly";
220 }
221
222 bool inlineNestedMessages() const Q_DECL_OVERRIDE
223 {
224 return true;
225 }
226
227 Display defaultDisplay(KMime::Content *node) const Q_DECL_OVERRIDE
228 {
229 if (NodeHelper::isInEncapsulatedMessage(node)) {
230 return smartDisplay(node);
231 }
232
233 if (!Util::labelForContent(node).isEmpty() && QIcon::hasThemeIcon(Util::iconNameForContent(node)) && ! Util::isTypeBlacklisted(node)) {
234 return None;
235 }
236 return smartDisplay(node);
237 }
238
239 bool requiresAttachmentListInHeader() const Q_DECL_OVERRIDE
240 {
241 return true;
242 }
243};
244
245//
246// AttachmentStrategy abstract base:
247//
248
249AttachmentStrategy::AttachmentStrategy()
250{
251
252}
253
254AttachmentStrategy::~AttachmentStrategy()
255{
256
257}
258
259const AttachmentStrategy *AttachmentStrategy::create(Type type)
260{
261 switch (type) {
262 case Iconic: return iconic();
263 case Smart: return smart();
264 case Inlined: return inlined();
265 case Hidden: return hidden();
266 case HeaderOnly: return headerOnly();
267 }
268 qCCritical(MIMETREEPARSER_LOG) << "Unknown attachment startegy ( type =="
269 << (int)type << ") requested!";
270 return nullptr; // make compiler happy
271}
272
273const AttachmentStrategy *AttachmentStrategy::create(const QString &type)
274{
275 const QString lowerType = type.toLower();
276 if (lowerType == QLatin1String("iconic")) {
277 return iconic();
278 }
279 //if ( lowerType == "smart" ) return smart(); // not needed, see below
280 if (lowerType == QLatin1String("inlined")) {
281 return inlined();
282 }
283 if (lowerType == QLatin1String("hidden")) {
284 return hidden();
285 }
286 if (lowerType == QLatin1String("headeronly")) {
287 return headerOnly();
288 }
289 // don't kFatal here, b/c the strings are user-provided
290 // (KConfig), so fail gracefully to the default:
291 return smart();
292}
293
294static const AttachmentStrategy *iconicStrategy = nullptr;
295static const AttachmentStrategy *smartStrategy = nullptr;
296static const AttachmentStrategy *inlinedStrategy = nullptr;
297static const AttachmentStrategy *hiddenStrategy = nullptr;
298static const AttachmentStrategy *headerOnlyStrategy = nullptr;
299
300const AttachmentStrategy *AttachmentStrategy::iconic()
301{
302 if (!iconicStrategy) {
303 iconicStrategy = new IconicAttachmentStrategy();
304 }
305 return iconicStrategy;
306}
307
308const AttachmentStrategy *AttachmentStrategy::smart()
309{
310 if (!smartStrategy) {
311 smartStrategy = new SmartAttachmentStrategy();
312 }
313 return smartStrategy;
314}
315
316const AttachmentStrategy *AttachmentStrategy::inlined()
317{
318 if (!inlinedStrategy) {
319 inlinedStrategy = new InlinedAttachmentStrategy();
320 }
321 return inlinedStrategy;
322}
323
324const AttachmentStrategy *AttachmentStrategy::hidden()
325{
326 if (!hiddenStrategy) {
327 hiddenStrategy = new HiddenAttachmentStrategy();
328 }
329 return hiddenStrategy;
330}
331
332const AttachmentStrategy *AttachmentStrategy::headerOnly()
333{
334 if (!headerOnlyStrategy) {
335 headerOnlyStrategy = new HeaderOnlyAttachmentStrategy();
336 }
337 return headerOnlyStrategy;
338}
339
340bool AttachmentStrategy::requiresAttachmentListInHeader() const
341{
342 return false;
343}
diff --git a/framework/src/domain/mimetreeparser/otp/attachmentstrategy.h b/framework/src/domain/mimetreeparser/otp/attachmentstrategy.h
deleted file mode 100644
index a0b5dc81..00000000
--- a/framework/src/domain/mimetreeparser/otp/attachmentstrategy.h
+++ /dev/null
@@ -1,86 +0,0 @@
1/* -*- c++ -*-
2 attachmentstrategy.h
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6 Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
7 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
8
9 KMail is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License, version 2, as
11 published by the Free Software Foundation.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#ifndef __MIMETREEPARSER_ATTACHMENTSTRATEGY_H__
35#define __MIMETREEPARSER_ATTACHMENTSTRATEGY_H__
36
37class QString;
38namespace KMime
39{
40class Content;
41}
42
43namespace MimeTreeParser
44{
45
46class AttachmentStrategy
47{
48protected:
49 AttachmentStrategy();
50 virtual ~AttachmentStrategy();
51
52public:
53 //
54 // Factory methods:
55 //
56 enum Type { Iconic, Smart, Inlined, Hidden, HeaderOnly };
57
58 static const AttachmentStrategy *create(Type type);
59 static const AttachmentStrategy *create(const QString &type);
60
61 static const AttachmentStrategy *iconic();
62 static const AttachmentStrategy *smart();
63 static const AttachmentStrategy *inlined();
64 static const AttachmentStrategy *hidden();
65 static const AttachmentStrategy *headerOnly();
66
67 //
68 // Navigation methods:
69 //
70
71 virtual const char *name() const = 0;
72
73 //
74 // Bahavioural:
75 //
76
77 enum Display { None, AsIcon, Inline };
78
79 virtual bool inlineNestedMessages() const = 0;
80 virtual Display defaultDisplay(KMime::Content *node) const = 0;
81 virtual bool requiresAttachmentListInHeader() const;
82};
83
84}
85
86#endif // __MIMETREEPARSER_ATTACHMENTSTRATEGY_H__
diff --git a/framework/src/domain/mimetreeparser/otp/attachmenttemporaryfilesdirs.cpp b/framework/src/domain/mimetreeparser/otp/attachmenttemporaryfilesdirs.cpp
deleted file mode 100644
index 364bc422..00000000
--- a/framework/src/domain/mimetreeparser/otp/attachmenttemporaryfilesdirs.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
1/*
2 Copyright (c) 2013-2017 Montel Laurent <montel@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18
19*/
20
21#include "attachmenttemporaryfilesdirs.h"
22
23#include <QDir>
24#include <QFile>
25#include <QTimer>
26
27using namespace MimeTreeParser;
28
29class MimeTreeParser::AttachmentTemporaryFilesDirsPrivate
30{
31public:
32 AttachmentTemporaryFilesDirsPrivate()
33 : mDelayRemoveAll(10000)
34 {
35
36 }
37 QStringList mTempFiles;
38 QStringList mTempDirs;
39 int mDelayRemoveAll;
40};
41
42AttachmentTemporaryFilesDirs::AttachmentTemporaryFilesDirs(QObject *parent)
43 : QObject(parent),
44 d(new AttachmentTemporaryFilesDirsPrivate)
45{
46
47}
48
49AttachmentTemporaryFilesDirs::~AttachmentTemporaryFilesDirs()
50{
51 delete d;
52}
53
54void AttachmentTemporaryFilesDirs::setDelayRemoveAllInMs(int ms)
55{
56 d->mDelayRemoveAll = (ms < 0) ? 0 : ms;
57}
58
59void AttachmentTemporaryFilesDirs::removeTempFiles()
60{
61 QTimer::singleShot(d->mDelayRemoveAll, this, &AttachmentTemporaryFilesDirs::slotRemoveTempFiles);
62}
63
64void AttachmentTemporaryFilesDirs::forceCleanTempFiles()
65{
66 QStringList::ConstIterator end = d->mTempFiles.constEnd();
67 for (QStringList::ConstIterator it = d->mTempFiles.constBegin(); it != end; ++it) {
68 QFile::remove(*it);
69 }
70 d->mTempFiles.clear();
71 end = d->mTempDirs.constEnd();
72 for (QStringList::ConstIterator it = d->mTempDirs.constBegin(); it != end; ++it) {
73 QDir(*it).rmdir(*it);
74 }
75 d->mTempDirs.clear();
76}
77
78void AttachmentTemporaryFilesDirs::slotRemoveTempFiles()
79{
80 forceCleanTempFiles();
81 //Delete it after cleaning
82 deleteLater();
83}
84
85void AttachmentTemporaryFilesDirs::addTempFile(const QString &file)
86{
87 if (!d->mTempFiles.contains(file)) {
88 d->mTempFiles.append(file);
89 }
90}
91
92void AttachmentTemporaryFilesDirs::addTempDir(const QString &dir)
93{
94 if (!d->mTempDirs.contains(dir)) {
95 d->mTempDirs.append(dir);
96 }
97}
98
99QStringList AttachmentTemporaryFilesDirs::temporaryFiles() const
100{
101 return d->mTempFiles;
102}
103
104QStringList AttachmentTemporaryFilesDirs::temporaryDirs() const
105{
106 return d->mTempDirs;
107}
108
diff --git a/framework/src/domain/mimetreeparser/otp/attachmenttemporaryfilesdirs.h b/framework/src/domain/mimetreeparser/otp/attachmenttemporaryfilesdirs.h
deleted file mode 100644
index bf65fcdb..00000000
--- a/framework/src/domain/mimetreeparser/otp/attachmenttemporaryfilesdirs.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 Copyright (c) 2013-2016 Montel Laurent <montel@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18
19*/
20
21#ifndef ATTACHMENTTEMPORARYFILESDIRS_H
22#define ATTACHMENTTEMPORARYFILESDIRS_H
23
24#include <QObject>
25#include <QStringList>
26
27namespace MimeTreeParser
28{
29class AttachmentTemporaryFilesDirsPrivate;
30
31class AttachmentTemporaryFilesDirs : public QObject
32{
33 Q_OBJECT
34public:
35 explicit AttachmentTemporaryFilesDirs(QObject *parent = nullptr);
36 ~AttachmentTemporaryFilesDirs();
37
38 void addTempFile(const QString &file);
39 void addTempDir(const QString &dir);
40 QStringList temporaryFiles() const;
41 void removeTempFiles();
42 void forceCleanTempFiles();
43
44 QStringList temporaryDirs() const;
45
46 void setDelayRemoveAllInMs(int ms);
47
48private Q_SLOTS:
49 void slotRemoveTempFiles();
50
51private:
52 AttachmentTemporaryFilesDirsPrivate *const d;
53};
54
55}
56
57#endif // ATTACHMENTTEMPORARYFILESDIRS_H
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/CMakeLists.txt b/framework/src/domain/mimetreeparser/otp/autotests/CMakeLists.txt
deleted file mode 100644
index 789ee795..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/CMakeLists.txt
+++ /dev/null
@@ -1,46 +0,0 @@
1include_directories(../)
2include_directories(${CMAKE_CURRENT_BINARY_DIR})
3
4set(AUTOMOC ON)
5
6set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
7add_definitions( -DMAIL_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" )
8
9include(${CMAKE_CURRENT_SOURCE_DIR}/kdepim_add_gpg_crypto_test.cmake)
10
11# convenience macro to add qtest unit tests
12macro(add_mimetreeparser_unittest _source)
13 get_filename_component(_name ${_source} NAME_WE)
14 ecm_add_test(${_source} util.cpp setupenv.cpp
15 TEST_NAME ${_name}
16 NAME_PREFIX "mimetreeparser-"
17 LINK_LIBRARIES kube_otp Qt5::Test KF5::Mime Gpgmepp
18 )
19endmacro ()
20
21macro(add_mimetreeparser_class_unittest _source _additionalSource)
22 get_filename_component(_name ${_source} NAME_WE)
23 ecm_add_test(${_source} ${_additionalSource}
24 TEST_NAME ${_name}
25 NAME_PREFIX "mimetreeparser-"
26 LINK_LIBRARIES kube_otp Qt5::Test KF5::Mime Gpgmepp
27 )
28endmacro ()
29
30macro(add_mimetreeparser_crypto_unittest _source)
31 set(_test ${_source} util.cpp)
32 get_filename_component(_name ${_source} NAME_WE)
33 add_executable( ${_name} ${_test} setupenv.cpp)
34 ecm_mark_as_test(mimetreeparser-${_name})
35 target_link_libraries( ${_name}
36 kube_otp
37 Qt5::Test
38 KF5::Mime
39 Gpgmepp
40 )
41 add_gpg_crypto_test(${_name} mimetreeparser-${_name})
42endmacro ()
43
44add_mimetreeparser_crypto_unittest(attachmenttest.cpp)
45add_mimetreeparser_unittest(nodehelpertest.cpp)
46add_mimetreeparser_class_unittest(cryptohelpertest.cpp "../cryptohelper.cpp")
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/attachmenttest.cpp b/framework/src/domain/mimetreeparser/otp/autotests/attachmenttest.cpp
deleted file mode 100644
index 44e40a45..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/attachmenttest.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 Copyright (c) 2015 Volker Krause <vkrause@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19#include "objecttreeparser.h"
20#include "util.h"
21
22#include "setupenv.h"
23
24#include <qtest.h>
25
26using namespace MimeTreeParser;
27
28class AttachmentTest : public QObject
29{
30 Q_OBJECT
31private Q_SLOTS:
32 void initTestCase();
33 void testEncryptedAttachment_data();
34 void testEncryptedAttachment();
35};
36
37QTEST_MAIN(AttachmentTest)
38
39void AttachmentTest::initTestCase()
40{
41 MimeTreeParser::Test::setupEnv();
42}
43
44void AttachmentTest::testEncryptedAttachment_data()
45{
46 QTest::addColumn<QString>("mbox");
47 QTest::newRow("encrypted") << "openpgp-encrypted-two-attachments.mbox";
48 QTest::newRow("signed") << "openpgp-signed-two-attachments.mbox";
49 QTest::newRow("signed+encrypted") << "openpgp-signed-encrypted-two-attachments.mbox";
50 QTest::newRow("encrypted+partial signed") << "openpgp-encrypted-partially-signed-attachments.mbox";
51}
52
53void AttachmentTest::testEncryptedAttachment()
54{
55 QFETCH(QString, mbox);
56 auto msg = readAndParseMail(mbox);
57 NodeHelper nodeHelper;
58 Test::TestObjectTreeSource testSource(nullptr);
59 testSource.setAllowDecryption(true);
60 ObjectTreeParser otp(&testSource, &nodeHelper);
61 otp.parseObjectTree(msg.data());
62
63 auto attachments = msg->attachments();
64 auto encAtts = nodeHelper.attachmentsOfExtraContents();
65 QCOMPARE(attachments.size() + encAtts.size(), 2);
66}
67
68#include "attachmenttest.moc"
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/cryptohelpertest.cpp b/framework/src/domain/mimetreeparser/otp/autotests/cryptohelpertest.cpp
deleted file mode 100644
index 251e657d..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/cryptohelpertest.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
1/* Copyright 2015 Sandro Knauß <knauss@kolabsys.com>
2
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public License as
5 published by the Free Software Foundation; either version 2 of
6 the License or (at your option) version 3 or any later version
7 accepted by the membership of KDE e.V. (or its successor approved
8 by the membership of KDE e.V.), which shall act as a proxy
9 defined in Section 14 of version 3 of the license.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19#include "cryptohelpertest.h"
20
21#include "cryptohelper.h"
22
23#include <QTest>
24
25using namespace MimeTreeParser;
26
27void CryptoHelperTest::testPMFDEmpty()
28{
29 QCOMPARE(prepareMessageForDecryption("").count(), 0);
30}
31
32void CryptoHelperTest::testPMFDWithNoPGPBlock()
33{
34 const QByteArray text = "testblabla";
35 const QList<Block> blocks = prepareMessageForDecryption(text);
36 QCOMPARE(blocks.count(), 1);
37 QCOMPARE(blocks[0].text(), text);
38 QCOMPARE(blocks[0].type(), NoPgpBlock);
39}
40
41void CryptoHelperTest::testPGPBlockType()
42{
43 const QString blockText = QStringLiteral("text");
44 const QString preString = QStringLiteral("before\n");
45 for (int i = 1; i <= PrivateKeyBlock; ++i) {
46 QString name;
47 switch (i) {
48 case PgpMessageBlock:
49 name = QStringLiteral("MESSAGE");
50 break;
51 case MultiPgpMessageBlock:
52 name = QStringLiteral("MESSAGE PART");
53 break;
54 case SignatureBlock:
55 name = QStringLiteral("SIGNATURE");
56 break;
57 case ClearsignedBlock:
58 name = QStringLiteral("SIGNED MESSAGE");
59 break;
60 case PublicKeyBlock:
61 name = QStringLiteral("PUBLIC KEY BLOCK");
62 break;
63 case PrivateKeyBlock:
64 name = QStringLiteral("PRIVATE KEY BLOCK");
65 break;
66 }
67 QString text = QLatin1String("-----BEGIN PGP ") + name + QLatin1String("\n") + blockText;
68 QList<Block> blocks = prepareMessageForDecryption(preString.toLatin1() + text.toLatin1());
69 QCOMPARE(blocks.count(), 1);
70 QCOMPARE(blocks[0].type(), UnknownBlock);
71
72 text += QLatin1String("\n-----END PGP ") + name + QLatin1String("\n");
73 blocks = prepareMessageForDecryption(preString.toLatin1() + text.toLatin1());
74 QCOMPARE(blocks.count(), 2);
75 QCOMPARE(blocks[1].text(), text.toLatin1());
76 QCOMPARE(blocks[1].type(), static_cast<PGPBlockType>(i));
77 }
78}
79
80void CryptoHelperTest::testDeterminePGPBlockType()
81{
82 const QString blockText = QStringLiteral("text");
83 for (int i = 1; i <= PrivateKeyBlock; ++i) {
84 QString name;
85 switch (i) {
86
87 case PgpMessageBlock:
88 name = QStringLiteral("MESSAGE");
89 break;
90 case MultiPgpMessageBlock:
91 name = QStringLiteral("MESSAGE PART");
92 break;
93 case SignatureBlock:
94 name = QStringLiteral("SIGNATURE");
95 break;
96 case ClearsignedBlock:
97 name = QStringLiteral("SIGNED MESSAGE");
98 break;
99 case PublicKeyBlock:
100 name = QStringLiteral("PUBLIC KEY BLOCK");
101 break;
102 case PrivateKeyBlock:
103 name = QStringLiteral("PRIVATE KEY BLOCK");
104 break;
105 }
106 const QString text = QLatin1String("-----BEGIN PGP ") + name + QLatin1String("\n") + blockText + QLatin1String("\n");
107 const Block block = Block(text.toLatin1());
108 QCOMPARE(block.text(), text.toLatin1());
109 QCOMPARE(block.type(), static_cast<PGPBlockType>(i));
110 }
111}
112
113void CryptoHelperTest::testEmbededPGPBlock()
114{
115 const QByteArray text = QByteArray("before\n-----BEGIN PGP MESSAGE-----\ncrypted - you see :)\n-----END PGP MESSAGE-----\nafter");
116 const QList<Block> blocks = prepareMessageForDecryption(text);
117 QCOMPARE(blocks.count(), 3);
118 QCOMPARE(blocks[0].text(), QByteArray("before\n"));
119 QCOMPARE(blocks[1].text(), QByteArray("-----BEGIN PGP MESSAGE-----\ncrypted - you see :)\n-----END PGP MESSAGE-----\n"));
120 QCOMPARE(blocks[2].text(), QByteArray("after"));
121}
122
123void CryptoHelperTest::testClearSignedMessage()
124{
125 const QByteArray text = QByteArray("before\n-----BEGIN PGP SIGNED MESSAGE-----\nsigned content\n-----BEGIN PGP SIGNATURE-----\nfancy signature\n-----END PGP SIGNATURE-----\nafter");
126 const QList<Block> blocks = prepareMessageForDecryption(text);
127 QCOMPARE(blocks.count(), 3);
128 QCOMPARE(blocks[0].text(), QByteArray("before\n"));
129 QCOMPARE(blocks[1].text(), QByteArray("-----BEGIN PGP SIGNED MESSAGE-----\nsigned content\n-----BEGIN PGP SIGNATURE-----\nfancy signature\n-----END PGP SIGNATURE-----\n"));
130 QCOMPARE(blocks[2].text(), QByteArray("after"));
131}
132
133void CryptoHelperTest::testMultipleBlockMessage()
134{
135 const QByteArray text = QByteArray("before\n-----BEGIN PGP SIGNED MESSAGE-----\nsigned content\n-----BEGIN PGP SIGNATURE-----\nfancy signature\n-----END PGP SIGNATURE-----\nafter\n-----BEGIN PGP MESSAGE-----\ncrypted - you see :)\n-----END PGP MESSAGE-----\n");
136 const QList<Block> blocks = prepareMessageForDecryption(text);
137 QCOMPARE(blocks.count(), 4);
138 QCOMPARE(blocks[0].text(), QByteArray("before\n"));
139 QCOMPARE(blocks[1].text(), QByteArray("-----BEGIN PGP SIGNED MESSAGE-----\nsigned content\n-----BEGIN PGP SIGNATURE-----\nfancy signature\n-----END PGP SIGNATURE-----\n"));
140 QCOMPARE(blocks[2].text(), QByteArray("after\n"));
141 QCOMPARE(blocks[3].text(), QByteArray("-----BEGIN PGP MESSAGE-----\ncrypted - you see :)\n-----END PGP MESSAGE-----\n"));
142}
143
144QTEST_APPLESS_MAIN(CryptoHelperTest)
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/cryptohelpertest.h b/framework/src/domain/mimetreeparser/otp/autotests/cryptohelpertest.h
deleted file mode 100644
index 71ae086f..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/cryptohelpertest.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/* Copyright 2009 Thomas McGuire <mcguire@kde.org>
2
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public License as
5 published by the Free Software Foundation; either version 2 of
6 the License or (at your option) version 3 or any later version
7 accepted by the membership of KDE e.V. (or its successor approved
8 by the membership of KDE e.V.), which shall act as a proxy
9 defined in Section 14 of version 3 of the license.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef CRYPTOHELPERTEST_H
20#define CRYPTOHELPERTEST_H
21
22#include <QObject>
23
24namespace MimeTreeParser
25{
26
27class CryptoHelperTest : public QObject
28{
29 Q_OBJECT
30
31private Q_SLOTS:
32 void testPMFDEmpty();
33 void testPMFDWithNoPGPBlock();
34 void testPGPBlockType();
35 void testDeterminePGPBlockType();
36 void testEmbededPGPBlock();
37 void testClearSignedMessage();
38 void testMultipleBlockMessage();
39};
40
41}
42#endif
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox
deleted file mode 100644
index 86026437..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox
+++ /dev/null
@@ -1,22 +0,0 @@
1Return-Path: <konqi@example.org>
2Date: Wed, 8 Jun 2016 20:34:44 -0700
3From: Konqi <konqi@example.org>
4To: konqi@kde.org
5Subject: A random subject with a empty text alternative contenttype
6MIME-Version: 1.0
7Content-Type: multipart/alternative;
8 boundary="----=_Part_12345678_12345678"
9
10
11------=_Part_12345678_12345678
12Content-Transfer-Encoding: 7Bit
13Content-Type: text/html; charset="windows-1252"
14
15<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
16<html><head><meta name="qrichtext" content="1" /><style type="text/css">
17p, li { white-space: pre-wrap; }
18</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
19<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p></body></html>
20
21
22------=_Part_12345678_12345678--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox.html
deleted file mode 100644
index 41db4eab..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox.html
+++ /dev/null
@@ -1,17 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <div style="position: relative">
11 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p>
12 </div>
13 </div>
14 </div>
15 </div>
16 </body>
17</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox.tree
deleted file mode 100644
index 0de07281..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative-notext.mbox.tree
+++ /dev/null
@@ -1,2 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::AlternativeMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox
deleted file mode 100644
index a2c58591..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox
+++ /dev/null
@@ -1,34 +0,0 @@
1Return-Path: <konqi@example.org>
2Date: Wed, 8 Jun 2016 20:34:44 -0700
3From: Konqi <konqi@example.org>
4To: konqi@kde.org
5Subject: A random subject with alternative contenttype
6MIME-Version: 1.0
7Content-Type: multipart/alternative;
8 boundary="----=_Part_12345678_12345678"
9
10
11------=_Part_12345678_12345678
12Content-Type: text/plain; charset=utf-8
13Content-Transfer-Encoding: quoted-printable
14
15If you can see this text it means that your email client couldn't display o=
16ur newsletter properly.
17Please visit this link to view the newsletter on our website: http://www.go=
18g.com/newsletter/
19
20=2D GOG.com Team
21
22
23------=_Part_12345678_12345678
24Content-Transfer-Encoding: 7Bit
25Content-Type: text/html; charset="windows-1252"
26
27<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
28<html><head><meta name="qrichtext" content="1" /><style type="text/css">
29p, li { white-space: pre-wrap; }
30</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
31<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p></body></html>
32
33
34------=_Part_12345678_12345678--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox.html
deleted file mode 100644
index 2fe886f1..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox.html
+++ /dev/null
@@ -1,17 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att2"/>
9 <div id="attachmentDiv2">
10 <div style="position: relative">
11 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p>
12 </div>
13 </div>
14 </div>
15 </div>
16 </body>
17</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox.tree
deleted file mode 100644
index 0de07281..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/alternative.mbox.tree
+++ /dev/null
@@ -1,2 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::AlternativeMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/forward-openpgp-signed-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/forward-openpgp-signed-encrypted.mbox.html
deleted file mode 100644
index 9a81f103..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/forward-openpgp-signed-encrypted.mbox.html
+++ /dev/null
@@ -1,84 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <div class="noquote">
11 <div dir="ltr">bla bla bla</div>
12 </div>
13 </div>
14 <a name="att2"/>
15 <div id="attachmentDiv2">
16 <table cellspacing="1" cellpadding="1" class="rfc822">
17 <tr class="rfc822H">
18 <td dir="ltr">
19 <a href="attachment:2.1?place=body">Encapsulated message</a>
20 </td>
21 </tr>
22 <tr class="rfc822B">
23 <td>
24 <a name="att2.1"/>
25 <div id="attachmentDiv2.1">
26 <table cellspacing="1" cellpadding="1" class="encr">
27 <tr class="encrH">
28 <td dir="ltr">Encrypted message</td>
29 </tr>
30 <tr class="encrB">
31 <td>
32 <div style="position: relative; word-wrap: break-word">
33 <a name="att"/>
34 <div id="attachmentDiv">
35 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
36 <tr class="signOkKeyOkH">
37 <td dir="ltr">
38 <table cellspacing="0" cellpadding="0" width="100%">
39 <tr>
40 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
41 <td align="right" valign="top" nowrap="nowrap">
42 <a href="kmail:hideSignatureDetails">Hide Details</a>
43 </td>
44 </tr>
45 <tr>
46 <td align="right" valign="bottom" nowrap="nowrap"/>
47 </tr>
48 </table>
49 </td>
50 </tr>
51 <tr class="signOkKeyOkB">
52 <td>
53 <a name="att1"/>
54 <div id="attachmentDiv1">
55 <div class="noquote">
56 <div dir="ltr">encrypted message text</div>
57 </div>
58 </div>
59 </td>
60 </tr>
61 <tr class="signOkKeyOkH">
62 <td dir="ltr">End of signed message</td>
63 </tr>
64 </table>
65 </div>
66 </div>
67 </td>
68 </tr>
69 <tr class="encrH">
70 <td dir="ltr">End of encrypted message</td>
71 </tr>
72 </table>
73 </div>
74 </td>
75 </tr>
76 <tr class="rfc822H">
77 <td dir="ltr">End of encapsulated message</td>
78 </tr>
79 </table>
80 </div>
81 </div>
82 </div>
83 </body>
84</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encoded.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encoded.mbox.html
deleted file mode 100644
index 65d5f95e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encoded.mbox.html
+++ /dev/null
@@ -1,38 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signWarn">
9 <tr class="signWarnH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td rowspan="2">Message was signed on 12/21/15 3:46 PM with unknown key <a href="kmail:showCertificate#gpg ### OpenPGP ### E68031D299A6527C">0xE68031D299A6527C</a>.<br/>The validity of the signature cannot be verified.<br/>Status:<i>No public key to verify the signature</i></td>
14 <td align="right" valign="top" nowrap="nowrap">
15 <a href="kmail:hideSignatureDetails">Hide Details</a>
16 </td>
17 </tr>
18 <tr>
19 <td align="right" valign="bottom" nowrap="nowrap"/>
20 </tr>
21 </table>
22 </td>
23 </tr>
24 <tr class="signWarnB">
25 <td>
26 <div class="noquote">
27 <div dir="ltr">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.</div>
28 </div>
29 </td>
30 </tr>
31 <tr class="signWarnH">
32 <td dir="ltr">End of signed message</td>
33 </tr>
34 </table>
35 </div>
36 </div>
37 </body>
38</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted+signed.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted+signed.mbox.html
deleted file mode 100644
index 96361c30..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted+signed.mbox.html
+++ /dev/null
@@ -1,55 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
15 <tr class="signOkKeyOkH">
16 <td dir="ltr">
17 <table cellspacing="0" cellpadding="0" width="100%">
18 <tr>
19 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
20 <td align="right" valign="top" nowrap="nowrap">
21 <a href="kmail:hideSignatureDetails">Hide Details</a>
22 </td>
23 </tr>
24 <tr>
25 <td align="right" valign="bottom" nowrap="nowrap"/>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <div style="position: relative; word-wrap: break-word">
33 <a name="att"/>
34 <div id="attachmentDiv">
35 <div class="noquote">
36 <div dir="ltr">encrypted message text</div>
37 </div>
38 </div>
39 </div>
40 </td>
41 </tr>
42 <tr class="signOkKeyOkH">
43 <td dir="ltr">End of signed message</td>
44 </tr>
45 </table>
46 </td>
47 </tr>
48 <tr class="encrH">
49 <td dir="ltr">End of encrypted message</td>
50 </tr>
51 </table>
52 </div>
53 </div>
54 </body>
55</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
deleted file mode 100644
index cc6bf03e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,80 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
25 <td align="right" valign="top" nowrap="nowrap">
26 <a href="kmail:hideSignatureDetails">Hide Details</a>
27 </td>
28 </tr>
29 <tr>
30 <td align="right" valign="bottom" nowrap="nowrap"/>
31 </tr>
32 </table>
33 </td>
34 </tr>
35 <tr class="signOkKeyOkB">
36 <td>
37 <a name="att1"/>
38 <div id="attachmentDiv1">
39 <a name="att1.1"/>
40 <div id="attachmentDiv1.1">
41 <div class="noquote">
42 <div dir="ltr">test text</div>
43 </div>
44 </div>
45 <a name="att1.2"/>
46 <div id="attachmentDiv1.2">
47 <hr/>
48 <div>
49 <a href="attachment:1:e0:1.2?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>file.txt</a>
50 </div>
51 <div/>
52 </div>
53 </div>
54 </td>
55 </tr>
56 <tr class="signOkKeyOkH">
57 <td dir="ltr">End of signed message</td>
58 </tr>
59 </table>
60 </div>
61 </div>
62 </td>
63 </tr>
64 <tr class="encrH">
65 <td dir="ltr">End of encrypted message</td>
66 </tr>
67 </table>
68 </div>
69 <a name="att2"/>
70 <div id="attachmentDiv2">
71 <hr/>
72 <div>
73 <a href="attachment:2?place=body"><img align="center" height="48" width="48" src="file:image-png.svg" border="0" style="max-width: 100%" alt=""/>image.png</a>
74 </div>
75 <div/>
76 </div>
77 </div>
78 </div>
79 </body>
80</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-attachment.mbox.html
deleted file mode 100644
index 61bf5d28..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,69 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
23 <td align="right" valign="top" nowrap="nowrap">
24 <a href="kmail:hideSignatureDetails">Hide Details</a>
25 </td>
26 </tr>
27 <tr>
28 <td align="right" valign="bottom" nowrap="nowrap"/>
29 </tr>
30 </table>
31 </td>
32 </tr>
33 <tr class="signOkKeyOkB">
34 <td>
35 <a name="att1"/>
36 <div id="attachmentDiv1">
37 <a name="att1.1"/>
38 <div id="attachmentDiv1.1">
39 <div class="noquote">
40 <div dir="ltr">test text</div>
41 </div>
42 </div>
43 <a name="att1.2"/>
44 <div id="attachmentDiv1.2">
45 <hr/>
46 <div>
47 <a href="attachment:e0:1.2?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>file.txt</a>
48 </div>
49 <div/>
50 </div>
51 </div>
52 </td>
53 </tr>
54 <tr class="signOkKeyOkH">
55 <td dir="ltr">End of signed message</td>
56 </tr>
57 </table>
58 </div>
59 </div>
60 </td>
61 </tr>
62 <tr class="encrH">
63 <td dir="ltr">End of encrypted message</td>
64 </tr>
65 </table>
66 </div>
67 </div>
68 </body>
69</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-non-encrypted-attachment.mbox.html
deleted file mode 100644
index 8d8bde0d..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,72 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
25 <td align="right" valign="top" nowrap="nowrap">
26 <a href="kmail:hideSignatureDetails">Hide Details</a>
27 </td>
28 </tr>
29 <tr>
30 <td align="right" valign="bottom" nowrap="nowrap"/>
31 </tr>
32 </table>
33 </td>
34 </tr>
35 <tr class="signOkKeyOkB">
36 <td>
37 <a name="att1"/>
38 <div id="attachmentDiv1">
39 <a name="att1.1"/>
40 <div id="attachmentDiv1.1">
41 <div class="noquote">
42 <div dir="ltr">test text</div>
43 </div>
44 </div>
45 </div>
46 </td>
47 </tr>
48 <tr class="signOkKeyOkH">
49 <td dir="ltr">End of signed message</td>
50 </tr>
51 </table>
52 </div>
53 </div>
54 </td>
55 </tr>
56 <tr class="encrH">
57 <td dir="ltr">End of encrypted message</td>
58 </tr>
59 </table>
60 </div>
61 <a name="att2"/>
62 <div id="attachmentDiv2">
63 <hr/>
64 <div>
65 <a href="attachment:2?place=body"><img align="center" height="48" width="48" src="file:image-png.svg" border="0" style="max-width: 100%" alt=""/>image.png</a>
66 </div>
67 <div/>
68 </div>
69 </div>
70 </div>
71 </body>
72</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-partially-signed-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-partially-signed-attachments.mbox.html
deleted file mode 100644
index 1716b841..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-encrypted-partially-signed-attachments.mbox.html
+++ /dev/null
@@ -1,102 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
25 <td align="right" valign="top" nowrap="nowrap">
26 <a href="kmail:hideSignatureDetails">Hide Details</a>
27 </td>
28 </tr>
29 <tr>
30 <td align="right" valign="bottom" nowrap="nowrap"/>
31 </tr>
32 </table>
33 </td>
34 </tr>
35 <tr class="signOkKeyOkB">
36 <td>
37 <a name="att1"/>
38 <div id="attachmentDiv1">
39 <a name="att1.1"/>
40 <div id="attachmentDiv1.1">
41 <div class="noquote">
42 <div dir="ltr">This is the main body.</div>
43 </div>
44 </div>
45 <a name="att1.2"/>
46 <div id="attachmentDiv1.2">
47 <table cellspacing="1" class="textAtm">
48 <tr class="textAtmH">
49 <td dir="ltr">attachment1.txt</td>
50 </tr>
51 <tr class="textAtmB">
52 <td>
53 <div class="noquote">
54 <div dir="ltr">This is a signed attachment.</div>
55 </div>
56 </td>
57 </tr>
58 </table>
59 </div>
60 </div>
61 </td>
62 </tr>
63 <tr class="signOkKeyOkH">
64 <td dir="ltr">End of signed message</td>
65 </tr>
66 </table>
67 </div>
68 </div>
69 </td>
70 </tr>
71 <tr class="encrH">
72 <td dir="ltr">End of encrypted message</td>
73 </tr>
74 </table>
75 </div>
76 <a name="att2"/>
77 <div id="attachmentDiv2">
78 <table cellspacing="1" cellpadding="1" class="encr">
79 <tr class="encrH">
80 <td dir="ltr">Encrypted message</td>
81 </tr>
82 <tr class="encrB">
83 <td>
84 <div style="position: relative; word-wrap: break-word">
85 <a name="att"/>
86 <div id="attachmentDiv">
87 <div class="noquote">
88 <div dir="ltr">This is an unsigned attachment.</div>
89 </div>
90 </div>
91 </div>
92 </td>
93 </tr>
94 <tr class="encrH">
95 <td dir="ltr">End of encrypted message</td>
96 </tr>
97 </table>
98 </div>
99 </div>
100 </div>
101 </body>
102</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-inline-charset-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-inline-charset-encrypted.mbox.html
deleted file mode 100644
index c2fa2fee..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-inline-charset-encrypted.mbox.html
+++ /dev/null
@@ -1,50 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
15 <tr class="signOkKeyOkH">
16 <td dir="ltr">
17 <table cellspacing="0" cellpadding="0" width="100%">
18 <tr>
19 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
20 <td align="right" valign="top" nowrap="nowrap">
21 <a href="kmail:hideSignatureDetails">Hide Details</a>
22 </td>
23 </tr>
24 <tr>
25 <td align="right" valign="bottom" nowrap="nowrap"/>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <div class="noquote">
33 <div dir="ltr">asdasd asd asd asdf sadf sdaf sadf öäü</div>
34 </div>
35 </td>
36 </tr>
37 <tr class="signOkKeyOkH">
38 <td dir="ltr">End of signed message</td>
39 </tr>
40 </table>
41 </td>
42 </tr>
43 <tr class="encrH">
44 <td dir="ltr">End of encrypted message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </body>
50</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-inline-signed.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-inline-signed.mbox.html
deleted file mode 100644
index 00a9dc5b..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-inline-signed.mbox.html
+++ /dev/null
@@ -1,38 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
14 <td align="right" valign="top" nowrap="nowrap">
15 <a href="kmail:hideSignatureDetails">Hide Details</a>
16 </td>
17 </tr>
18 <tr>
19 <td align="right" valign="bottom" nowrap="nowrap"/>
20 </tr>
21 </table>
22 </td>
23 </tr>
24 <tr class="signOkKeyOkB">
25 <td>
26 <div class="noquote">
27 <div dir="ltr">ohno öäü</div>
28 </div>
29 </td>
30 </tr>
31 <tr class="signOkKeyOkH">
32 <td dir="ltr">End of signed message</td>
33 </tr>
34 </table>
35 </div>
36 </div>
37 </body>
38</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-base64-mailman-footer.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-base64-mailman-footer.mbox.html
deleted file mode 100644
index c10cecd8..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-base64-mailman-footer.mbox.html
+++ /dev/null
@@ -1,81 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="signWarn">
11 <tr class="signWarnH">
12 <td dir="ltr">
13 <table cellspacing="0" cellpadding="0" width="100%">
14 <tr>
15 <td rowspan="2">Message was signed on 8/22/15 9:31 AM with unknown key <a href="kmail:showCertificate#gpg ### OpenPGP ### 7F96CCD64D12D247">0x7F96CCD64D12D247</a>.<br/>The validity of the signature cannot be verified.<br/>Status:<i>No public key to verify the signature</i></td>
16 <td align="right" valign="top" nowrap="nowrap">
17 <a href="kmail:hideSignatureDetails">Hide Details</a>
18 </td>
19 </tr>
20 <tr>
21 <td align="right" valign="bottom" nowrap="nowrap"/>
22 </tr>
23 </table>
24 </td>
25 </tr>
26 <tr class="signWarnB">
27 <td>
28 <a name="att1.1"/>
29 <div id="attachmentDiv1.1">
30 <div class="noquote">
31 <div dir="ltr">Hi,</div>
32 <br/>
33 <div dir="ltr">I've talked to Ben, the current Phabricator test setup would actually be&nbsp;</div>
34 <div dir="ltr">usable for "production" use for task/project management for us, without&nbsp;</div>
35 <div dir="ltr">causing the sysadmins unreasonable trouble when migrating to the full&nbsp;</div>
36 <div dir="ltr">production deployment of Phabricator eventually.</div>
37 <br/>
38 <div dir="ltr">Phabricator project layout it orthogonal to repo layout, so we can structure&nbsp;</div>
39 <div dir="ltr">this however we want. Among other teams I see at least the following layouts:</div>
40 <div dir="ltr">- single project for everything</div>
41 <div dir="ltr">- a project per release</div>
42 <div dir="ltr">- a project per component/module (ie. close to the repo layout)</div>
43 <br/>
44 <div dir="ltr">How do we want to structure this?</div>
45 <br/>
46 <div dir="ltr">I would start with a single project to not fragment this too much, as we have&nbsp;</div>
47 <div dir="ltr">a relatively small team actually looking into this, so everyone is looking at&nbsp;</div>
48 <div dir="ltr">most sub-projects anyway. And should we eventually hit scaling limits, we can&nbsp;</div>
49 <div dir="ltr">always expand this I think.</div>
50 <br/>
51 <div dir="ltr">We of course should also talk about what we actually want to put in there. My&nbsp;</div>
52 <div dir="ltr">current motivation is having a place to collect the tasks for getting more of&nbsp;</div>
53 <div dir="ltr">the former pimlibs into KF5, and anything else I run into on the way there&nbsp;</div>
54 <div dir="ltr">that we eventually should clean up/improve.</div>
55 <br/>
56 <div dir="ltr">regards,</div>
57 <div dir="ltr">Volker</div>
58 </div>
59 </div>
60 </td>
61 </tr>
62 <tr class="signWarnH">
63 <td dir="ltr">End of signed message</td>
64 </tr>
65 </table>
66 </div>
67 <a name="att2"/>
68 <div id="attachmentDiv2">
69 <div class="noquote">
70 <div dir="ltr">_______________________________________________</div>
71 <div dir="ltr">KDE PIM mailing list <a href="mailto:kde-pim@kde.org">kde-pim@kde.org</a></div>
72 <div dir="ltr">
73 <a href="https://mail.kde.org/mailman/listinfo/kde-pim">https://mail.kde.org/mailman/listinfo/kde-pim</a>
74 </div>
75 <div dir="ltr">KDE PIM home page at <a href="http://pim.kde.org/">http://pim.kde.org/</a></div>
76 </div>
77 </div>
78 </div>
79 </div>
80 </body>
81</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-encrypted-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-encrypted-two-attachments.mbox.html
deleted file mode 100644
index 2c02a22c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-encrypted-two-attachments.mbox.html
+++ /dev/null
@@ -1,91 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
23 <td align="right" valign="top" nowrap="nowrap">
24 <a href="kmail:hideSignatureDetails">Hide Details</a>
25 </td>
26 </tr>
27 <tr>
28 <td align="right" valign="bottom" nowrap="nowrap"/>
29 </tr>
30 </table>
31 </td>
32 </tr>
33 <tr class="signOkKeyOkB">
34 <td>
35 <a name="att1"/>
36 <div id="attachmentDiv1">
37 <a name="att1.1"/>
38 <div id="attachmentDiv1.1">
39 <div class="noquote">
40 <div dir="ltr">this is the main body</div>
41 </div>
42 </div>
43 <a name="att1.2"/>
44 <div id="attachmentDiv1.2">
45 <table cellspacing="1" class="textAtm">
46 <tr class="textAtmH">
47 <td dir="ltr">attachment1.txt</td>
48 </tr>
49 <tr class="textAtmB">
50 <td>
51 <div class="noquote">
52 <div dir="ltr">this is one attachment</div>
53 </div>
54 </td>
55 </tr>
56 </table>
57 </div>
58 <a name="att1.3"/>
59 <div id="attachmentDiv1.3">
60 <table cellspacing="1" class="textAtm">
61 <tr class="textAtmH">
62 <td dir="ltr">attachment2.txt</td>
63 </tr>
64 <tr class="textAtmB">
65 <td>
66 <div class="noquote">
67 <div dir="ltr">this is the second attachment</div>
68 </div>
69 </td>
70 </tr>
71 </table>
72 </div>
73 </div>
74 </td>
75 </tr>
76 <tr class="signOkKeyOkH">
77 <td dir="ltr">End of signed message</td>
78 </tr>
79 </table>
80 </div>
81 </div>
82 </td>
83 </tr>
84 <tr class="encrH">
85 <td dir="ltr">End of encrypted message</td>
86 </tr>
87 </table>
88 </div>
89 </div>
90 </body>
91</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-encrypted.mbox.html
deleted file mode 100644
index d3a7a0ce..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-encrypted.mbox.html
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
23 <td align="right" valign="top" nowrap="nowrap">
24 <a href="kmail:hideSignatureDetails">Hide Details</a>
25 </td>
26 </tr>
27 <tr>
28 <td align="right" valign="bottom" nowrap="nowrap"/>
29 </tr>
30 </table>
31 </td>
32 </tr>
33 <tr class="signOkKeyOkB">
34 <td>
35 <a name="att1"/>
36 <div id="attachmentDiv1">
37 <div class="noquote">
38 <div dir="ltr">encrypted message text</div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signOkKeyOkH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </td>
50 </tr>
51 <tr class="encrH">
52 <td dir="ltr">End of encrypted message</td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </body>
58</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-mailinglist+old.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-mailinglist+old.mbox.html
deleted file mode 100644
index e7da94db..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-mailinglist+old.mbox.html
+++ /dev/null
@@ -1,97 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <div style="position: relative; word-wrap: break-word">
9 <a name="att"/>
10 <div id="attachmentDiv">
11 <div class="noquote">
12 <div dir="ltr">Oh man a header :)</div>
13 <br/>
14 </div>
15 </div>
16 </div>
17 <div style="position: relative; word-wrap: break-word">
18 <a name="att"/>
19 <div id="attachmentDiv">
20 <table cellspacing="1" cellpadding="1" class="rfc822">
21 <tr class="rfc822H">
22 <td dir="ltr">
23 <a href="attachment:e1:1?place=body">Encapsulated message</a>
24 </td>
25 </tr>
26 <tr class="rfc822B">
27 <td>
28 <a name="att1"/>
29 <div id="attachmentDiv1">
30 <table cellspacing="1" cellpadding="1" class="signWarn">
31 <tr class="signWarnH">
32 <td dir="ltr">
33 <table cellspacing="0" cellpadding="0" width="100%">
34 <tr>
35 <td rowspan="2">Message was signed on 4/8/13 9:51 AM with unknown key <a href="kmail:showCertificate#gpg ### OpenPGP ### D6B72EB1A7F1DB43">0xD6B72EB1A7F1DB43</a>.<br/>The validity of the signature cannot be verified.<br/>Status:<i>No public key to verify the signature</i></td>
36 <td align="right" valign="top" nowrap="nowrap">
37 <a href="kmail:hideSignatureDetails">Hide Details</a>
38 </td>
39 </tr>
40 <tr>
41 <td align="right" valign="bottom" nowrap="nowrap"/>
42 </tr>
43 </table>
44 </td>
45 </tr>
46 <tr class="signWarnB">
47 <td>
48 <a name="att1.1"/>
49 <div id="attachmentDiv1.1">
50 <div class="noquote">
51 <div dir="ltr">hi..</div>
52 <br/>
53 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
54 <div dir="ltr">activities_optional</div>
55 <br/>
56 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
57 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
58 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
59 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
60 <br/>
61 <div dir="ltr">--&nbsp;</div>
62 <div dir="ltr">Aaron J. Seigo</div>
63 </div>
64 </div>
65 </td>
66 </tr>
67 <tr class="signWarnH">
68 <td dir="ltr">End of signed message</td>
69 </tr>
70 </table>
71 </div>
72 </td>
73 </tr>
74 <tr class="rfc822H">
75 <td dir="ltr">End of encapsulated message</td>
76 </tr>
77 </table>
78 </div>
79 </div>
80 <div style="position: relative; word-wrap: break-word">
81 <a name="att"/>
82 <div id="attachmentDiv">
83 <div class="noquote">
84 <div dir="ltr">Plasma-devel mailing list</div>
85 <div dir="ltr">
86 <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a>
87 </div>
88 <div dir="ltr">
89 <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>
90 </div>
91 </div>
92 </div>
93 </div>
94 </div>
95 </div>
96 </body>
97</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-mailinglist.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-mailinglist.mbox.html
deleted file mode 100644
index f5b20b6d..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-mailinglist.mbox.html
+++ /dev/null
@@ -1,68 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="signWarn">
11 <tr class="signWarnH">
12 <td dir="ltr">
13 <table cellspacing="0" cellpadding="0" width="100%">
14 <tr>
15 <td rowspan="2">Message was signed on 4/8/13 9:51 AM with unknown key <a href="kmail:showCertificate#gpg ### OpenPGP ### D6B72EB1A7F1DB43">0xD6B72EB1A7F1DB43</a>.<br/>The validity of the signature cannot be verified.<br/>Status:<i>No public key to verify the signature</i></td>
16 <td align="right" valign="top" nowrap="nowrap">
17 <a href="kmail:hideSignatureDetails">Hide Details</a>
18 </td>
19 </tr>
20 <tr>
21 <td align="right" valign="bottom" nowrap="nowrap"/>
22 </tr>
23 </table>
24 </td>
25 </tr>
26 <tr class="signWarnB">
27 <td>
28 <a name="att1.1"/>
29 <div id="attachmentDiv1.1">
30 <div class="noquote">
31 <div dir="ltr">hi..</div>
32 <br/>
33 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
34 <div dir="ltr">activities_optional</div>
35 <br/>
36 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
37 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
38 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
39 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
40 <br/>
41 <div dir="ltr">--&nbsp;</div>
42 <div dir="ltr">Aaron J. Seigo</div>
43 </div>
44 </div>
45 </td>
46 </tr>
47 <tr class="signWarnH">
48 <td dir="ltr">End of signed message</td>
49 </tr>
50 </table>
51 </div>
52 <a name="att2"/>
53 <div id="attachmentDiv2">
54 <div class="noquote">
55 <div dir="ltr">_______________________________________________</div>
56 <div dir="ltr">Plasma-devel mailing list</div>
57 <div dir="ltr">
58 <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a>
59 </div>
60 <div dir="ltr">
61 <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>
62 </div>
63 </div>
64 </div>
65 </div>
66 </div>
67 </body>
68</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-two-attachments.mbox.html
deleted file mode 100644
index 1432aa44..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/openpgp-signed-two-attachments.mbox.html
+++ /dev/null
@@ -1,74 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
14 <td align="right" valign="top" nowrap="nowrap">
15 <a href="kmail:hideSignatureDetails">Hide Details</a>
16 </td>
17 </tr>
18 <tr>
19 <td align="right" valign="bottom" nowrap="nowrap"/>
20 </tr>
21 </table>
22 </td>
23 </tr>
24 <tr class="signOkKeyOkB">
25 <td>
26 <a name="att1"/>
27 <div id="attachmentDiv1">
28 <a name="att1.1"/>
29 <div id="attachmentDiv1.1">
30 <div class="noquote">
31 <div dir="ltr">this is the main body text</div>
32 </div>
33 </div>
34 <a name="att1.2"/>
35 <div id="attachmentDiv1.2">
36 <table cellspacing="1" class="textAtm">
37 <tr class="textAtmH">
38 <td dir="ltr">attachment1.txt</td>
39 </tr>
40 <tr class="textAtmB">
41 <td>
42 <div class="noquote">
43 <div dir="ltr">this is attachment one</div>
44 </div>
45 </td>
46 </tr>
47 </table>
48 </div>
49 <a name="att1.3"/>
50 <div id="attachmentDiv1.3">
51 <table cellspacing="1" class="textAtm">
52 <tr class="textAtmH">
53 <td dir="ltr">attachment2.txt</td>
54 </tr>
55 <tr class="textAtmB">
56 <td>
57 <div class="noquote">
58 <div dir="ltr">this is attachment two</div>
59 </div>
60 </td>
61 </tr>
62 </table>
63 </div>
64 </div>
65 </td>
66 </tr>
67 <tr class="signOkKeyOkH">
68 <td dir="ltr">End of signed message</td>
69 </tr>
70 </table>
71 </div>
72 </div>
73 </body>
74</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/signed-forward-openpgp-signed-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/signed-forward-openpgp-signed-encrypted.mbox.html
deleted file mode 100644
index b960f318..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/signed-forward-openpgp-signed-encrypted.mbox.html
+++ /dev/null
@@ -1,111 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
14 <td align="right" valign="top" nowrap="nowrap">
15 <a href="kmail:hideSignatureDetails">Hide Details</a>
16 </td>
17 </tr>
18 <tr>
19 <td align="right" valign="bottom" nowrap="nowrap"/>
20 </tr>
21 </table>
22 </td>
23 </tr>
24 <tr class="signOkKeyOkB">
25 <td>
26 <a name="att1"/>
27 <div id="attachmentDiv1">
28 <a name="att1.1"/>
29 <div id="attachmentDiv1.1">
30 <div class="noquote">
31 <div dir="ltr">bla bla bla</div>
32 </div>
33 </div>
34 <a name="att1.2"/>
35 <div id="attachmentDiv1.2">
36 <table cellspacing="1" cellpadding="1" class="rfc822">
37 <tr class="rfc822H">
38 <td dir="ltr">
39 <a href="attachment:1.2.1?place=body">Encapsulated message</a>
40 </td>
41 </tr>
42 <tr class="rfc822B">
43 <td>
44 <a name="att1.2.1"/>
45 <div id="attachmentDiv1.2.1">
46 <table cellspacing="1" cellpadding="1" class="encr">
47 <tr class="encrH">
48 <td dir="ltr">Encrypted message</td>
49 </tr>
50 <tr class="encrB">
51 <td>
52 <div style="position: relative; word-wrap: break-word">
53 <a name="att"/>
54 <div id="attachmentDiv">
55 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
56 <tr class="signOkKeyOkH">
57 <td dir="ltr">
58 <table cellspacing="0" cellpadding="0" width="100%">
59 <tr>
60 <td rowspan="2">Message was signed by <a href="mailto:test@kolab.org">test@kolab.org</a> (Key ID: <a href="kmail:showCertificate#gpg ### OpenPGP ### 8D9860C58F246DE6">0x8D9860C58F246DE6</a>).<br/>The signature is valid and the key is fully trusted.</td>
61 <td align="right" valign="top" nowrap="nowrap">
62 <a href="kmail:hideSignatureDetails">Hide Details</a>
63 </td>
64 </tr>
65 <tr>
66 <td align="right" valign="bottom" nowrap="nowrap"/>
67 </tr>
68 </table>
69 </td>
70 </tr>
71 <tr class="signOkKeyOkB">
72 <td>
73 <a name="att1"/>
74 <div id="attachmentDiv1">
75 <div class="noquote">
76 <div dir="ltr">encrypted message text</div>
77 </div>
78 </div>
79 </td>
80 </tr>
81 <tr class="signOkKeyOkH">
82 <td dir="ltr">End of signed message</td>
83 </tr>
84 </table>
85 </div>
86 </div>
87 </td>
88 </tr>
89 <tr class="encrH">
90 <td dir="ltr">End of encrypted message</td>
91 </tr>
92 </table>
93 </div>
94 </td>
95 </tr>
96 <tr class="rfc822H">
97 <td dir="ltr">End of encapsulated message</td>
98 </tr>
99 </table>
100 </div>
101 </div>
102 </td>
103 </tr>
104 <tr class="signOkKeyOkH">
105 <td dir="ltr">End of signed message</td>
106 </tr>
107 </table>
108 </div>
109 </div>
110 </body>
111</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-opaque-enc+sign.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-opaque-enc+sign.mbox.html
deleted file mode 100644
index d6345a7c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-opaque-enc+sign.mbox.html
+++ /dev/null
@@ -1,60 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td rowspan="2">Message was signed by <a href="mailto:test%40example.com">test@example.com</a> on 1/10/13 3:48 PM with key <a href="kmail:showCertificate#gpgsm ### SMIME ### 4CC658E3212B49DC">0x4CC658E3212B49DC</a><br/>&nbsp;<br/>Status:<i>Good signature.</i><br/>&nbsp;<br/><u>Warning:</u> Sender's mail address is not stored in the <a href="kmail:showCertificate#gpgsm ### SMIME ### 4CC658E3212B49DC">certificate</a> used for signing.<br/>sender: <br/>stored: test@example.com</td>
23 <td align="right" valign="top" nowrap="nowrap">
24 <a href="kmail:hideSignatureDetails">Hide Details</a>
25 </td>
26 </tr>
27 <tr>
28 <td align="right" valign="bottom" nowrap="nowrap"/>
29 </tr>
30 </table>
31 </td>
32 </tr>
33 <tr class="signOkKeyOkB">
34 <td>
35 <div style="position: relative; word-wrap: break-word">
36 <a name="att"/>
37 <div id="attachmentDiv">
38 <div class="noquote">
39 <div dir="ltr">Encrypted and signed mail.</div>
40 </div>
41 </div>
42 </div>
43 </td>
44 </tr>
45 <tr class="signOkKeyOkH">
46 <td dir="ltr">End of signed message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="encrH">
54 <td dir="ltr">End of encrypted message</td>
55 </tr>
56 </table>
57 </div>
58 </div>
59 </body>
60</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-opaque-sign.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-opaque-sign.mbox.html
deleted file mode 100644
index 248b93ff..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-opaque-sign.mbox.html
+++ /dev/null
@@ -1,43 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td rowspan="2">Message was signed by <a href="mailto:test%40example.com">test@example.com</a> on 1/10/13 3:48 PM with key <a href="kmail:showCertificate#gpgsm ### SMIME ### 4CC658E3212B49DC">0x4CC658E3212B49DC</a><br/>&nbsp;<br/>Status:<i>Good signature.</i></td>
14 <td align="right" valign="top" nowrap="nowrap">
15 <a href="kmail:hideSignatureDetails">Hide Details</a>
16 </td>
17 </tr>
18 <tr>
19 <td align="right" valign="bottom" nowrap="nowrap"/>
20 </tr>
21 </table>
22 </td>
23 </tr>
24 <tr class="signOkKeyOkB">
25 <td>
26 <div style="position: relative; word-wrap: break-word">
27 <a name="att"/>
28 <div id="attachmentDiv">
29 <div class="noquote">
30 <div dir="ltr">A simple signed only test.</div>
31 </div>
32 </div>
33 </div>
34 </td>
35 </tr>
36 <tr class="signOkKeyOkH">
37 <td dir="ltr">End of signed message</td>
38 </tr>
39 </table>
40 </div>
41 </div>
42 </body>
43</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-signed-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-signed-encrypted.mbox.html
deleted file mode 100644
index 6e811632..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/details/smime-signed-encrypted.mbox.html
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td rowspan="2">Message was signed by <a href="mailto:test%40example.com">test@example.com</a> on 9/8/10 3:51 PM with key <a href="kmail:showCertificate#gpgsm ### SMIME ### 4CC658E3212B49DC">0x4CC658E3212B49DC</a><br/>&nbsp;<br/>Status:<i>Good signature.</i><br/>&nbsp;<br/><u>Warning:</u> Sender's mail address is not stored in the <a href="kmail:showCertificate#gpgsm ### SMIME ### 4CC658E3212B49DC">certificate</a> used for signing.<br/>sender: <br/>stored: test@example.com</td>
23 <td align="right" valign="top" nowrap="nowrap">
24 <a href="kmail:hideSignatureDetails">Hide Details</a>
25 </td>
26 </tr>
27 <tr>
28 <td align="right" valign="bottom" nowrap="nowrap"/>
29 </tr>
30 </table>
31 </td>
32 </tr>
33 <tr class="signOkKeyOkB">
34 <td>
35 <a name="att1"/>
36 <div id="attachmentDiv1">
37 <div class="noquote">
38 <div dir="ltr">encrypted message text</div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signOkKeyOkH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </td>
50 </tr>
51 <tr class="encrH">
52 <td dir="ltr">End of encrypted message</td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </body>
58</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox
deleted file mode 100644
index 885b9d1b..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox
+++ /dev/null
@@ -1,53 +0,0 @@
1From: Thomas McGuire <dontspamme@gmx.net>
2Subject: Fwd: Test with attachment
3Date: Wed, 5 Aug 2009 10:58:27 +0200
4MIME-Version: 1.0
5Content-Type: Multipart/Mixed;
6 boundary="Boundary-00=_zmUeKB+A8hGfCVZ"
7
8
9--Boundary-00=_zmUeKB+A8hGfCVZ
10Content-Type: text/plain;
11 charset="iso-8859-15"
12Content-Transfer-Encoding: 7bit
13Content-Disposition: inline
14
15This is the first encapsulating message.
16
17--Boundary-00=_zmUeKB+A8hGfCVZ
18Content-Type: message/rfc822;
19 name="forwarded message"
20Content-Transfer-Encoding: 7bit
21Content-Description: Thomas McGuire <dontspamme@gmx.net>: Test with attachment
22Content-Disposition: inline
23
24From: Thomas McGuire <dontspamme@gmx.net>
25Subject: Test with attachment
26Date: Wed, 5 Aug 2009 10:57:58 +0200
27MIME-Version: 1.0
28Content-Type: Multipart/Mixed;
29 boundary="Boundary-00=_WmUeKQpGb0DHyx1"
30
31--Boundary-00=_WmUeKQpGb0DHyx1
32Content-Type: text/plain;
33 charset="us-ascii"
34Content-Transfer-Encoding: 7bit
35Content-Disposition: inline
36
37
38
39
40This is the second encapsulated message.
41
42--Boundary-00=_WmUeKQpGb0DHyx1
43Content-Type: text/plain;
44 name="attachment.txt"
45Content-Transfer-Encoding: 7bit
46Content-Disposition: attachment;
47 filename="attachment.txt"
48
49This is an attachment.
50
51--Boundary-00=_WmUeKQpGb0DHyx1--
52
53--Boundary-00=_zmUeKB+A8hGfCVZ--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox.html
deleted file mode 100644
index aa3d1090..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox.html
+++ /dev/null
@@ -1,51 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <div class="noquote">
11 <div dir="ltr">This is the first encapsulating message.</div>
12 </div>
13 </div>
14 <a name="att2"/>
15 <div id="attachmentDiv2">
16 <table cellspacing="1" cellpadding="1" class="rfc822">
17 <tr class="rfc822H">
18 <td dir="ltr">
19 <a href="attachment:2.1?place=body">Encapsulated message</a>
20 </td>
21 </tr>
22 <tr class="rfc822B">
23 <td>
24 <a name="att2.1"/>
25 <div id="attachmentDiv2.1">
26 <a name="att2.1.1"/>
27 <div id="attachmentDiv2.1.1">
28 <div class="noquote">
29 <div dir="ltr">This is the second encapsulated message.</div>
30 </div>
31 </div>
32 <a name="att2.1.2"/>
33 <div id="attachmentDiv2.1.2">
34 <hr/>
35 <div>
36 <a href="attachment:2.1.2?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>attachment.txt</a>
37 </div>
38 <div/>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="rfc822H">
44 <td dir="ltr">End of encapsulated message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </div>
50 </body>
51</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox.tree
deleted file mode 100644
index 050414a2..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/encapsulated-with-attachment.mbox.tree
+++ /dev/null
@@ -1,10 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::TextMessagePart
4 * MimeTreeParser::MessagePart
5 * MimeTreeParser::EncapsulatedRfc822MessagePart
6 * MimeTreeParser::MimeMessagePart
7 * MimeTreeParser::AttachmentMessagePart
8 * MimeTreeParser::MessagePart
9 * MimeTreeParser::AttachmentMessagePart
10 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox
deleted file mode 100644
index 1c166940..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox
+++ /dev/null
@@ -1,69 +0,0 @@
1From test@kolab.org Wed, 08 Sep 2010 17:52:37 +0200
2From: OpenPGP Test <test@kolab.org>
3Subject: Fwd: OpenPGP signed and encrypted
4Date: Wed, 08 Sep 2010 17:52:37 +0200
5User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; )
6MIME-Version: 1.0
7Content-Type: multipart/mixed; boundary="nextPart2148910.9CGjQOYhYJ"
8Content-Transfer-Encoding: 7Bit
9
10
11--nextPart2148910.9CGjQOYhYJ
12Content-Transfer-Encoding: 7Bit
13Content-Type: text/plain; charset="us-ascii"
14
15bla bla bla
16--nextPart2148910.9CGjQOYhYJ
17Content-Type: message/rfc822
18Content-Disposition: inline; filename="forwarded message"
19Content-Description: OpenPGP Test <test@kolab.org>: OpenPGP signed and encrypted
20
21From: OpenPGP Test <test@kolab.org>
22To: test@kolab.org
23Subject: OpenPGP signed and encrypted
24Date: Tue, 07 Sep 2010 18:08:44 +0200
25User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; )
26MIME-Version: 1.0
27Content-Type: multipart/encrypted; boundary="nextPart25203163.0xtB501Z4V"; protocol="application/pgp-encrypted"
28Content-Transfer-Encoding: 7Bit
29
30
31--nextPart25203163.0xtB501Z4V
32Content-Type: application/pgp-encrypted
33Content-Disposition: attachment
34
35Version: 1
36--nextPart25203163.0xtB501Z4V
37Content-Type: application/octet-stream
38Content-Disposition: inline; filename="msg.asc"
39
40-----BEGIN PGP MESSAGE-----
41Version: GnuPG v2.0.15 (GNU/Linux)
42
43hQEMAwzOQ1qnzNo7AQf7BFYWaGiCTGtXY59bSh3LCXNnWZejblYALxIUNXOFEXbm
44y/YA95FmQsy3U5HRCAJV/DY1PEaJz1RTm9bcdIpDC3Ab2YzSwmOwV5fcoUOB2df4
45KjX19Q+2F3JxpPQ0N1gHf4dKfIu19LH+CKeFzUN13aJs5J4A5wlj+NjJikxzmxDS
46kDtNYndynPmo9DJQcsUFw3gpvx5HaHvx1cT4mAB2M5cd2l+vN1jYbaWb0x5Zq41z
47mRNI89aPieC3rcM2289m68fGloNbYvi8mZJu5RrI4Tbi/D7Rjm1y63lHgVV6AN88
48XAzRiedOeF99LoTBulrJdtT8AAgCs8nCetcWpIffdtLpAZiZkzHmYOU7nqGxqpRk
49OVeUTrCn9DW2SMmHjaP4IiKnMvzEycu5F4a72+V1LeMIhMSjTRTq+ZE2PTaqH59z
50QsMn7Nb6GlOICbTptRKNNtyJKO7xXlpT7YtvNKnCyEOkH2XrYH7GvpYCiuQ0/o+7
51SxV436ZejiYIg6DQDXJCoa2DXimGp0C10Jh0HwX0BixpoNtwEjkGRYcX6P/JzkH0
52oBood4Ly+Tiu6iVDisrK3AVGYpIzCrKkE9qULTw4R/jFKR2tcCqGb7Fxtk2LV7Md
533S+DyOKrvKQ5GNwbp9OE97pwk+Lr1JS3UAvj5f6BR+1PVNcC0i0wWkgwDjPh1eGD
54enMQmorE6+N0uHtH2F4fOxo/TbbA3+zhI25kVW3bO03xyUl/cmQZeb52nvfOvtOo
55gSb2j6bPkzljDMPEzrtJjbFtGHJbPfUQYJgZv9OE2EQIqpg6goIw279alBq6GLIX
56pkO+dRmztzjcDyhcLxMuQ4cTizel/0J/bU7U6lvwHSyZVbT4Ev+opG5K70Hbqbwr
57NZcgdWXbSeesxGM/oQaMeSurOevxVl+/zrTVAek61aRRd1baAYqgi2pf2V7y4oK3
58qkdxzmoFpRdNlfrQW65NZWnHOi9rC9XxANIwnVn3kRcDf+t2K4PrFluI157lXM/o
59wX91j88fazysbJlQ6TjsApO9ETiPOFEBqouxCTtCZzlUgyVG8jpIjdHWFnagHeXH
60+lXNdYjxnTWTjTxMOZC9ySMpXkjWdFI1ecxVwu6Ik6RX51rvBJAAXWP75yUjPKJ4
61rRi5oQl/VLl0QznO7lvgMPtUwgDVNWO/r7Kn9B387h9fAJZ/kWFAEDW2yhAzABqO
62rCNKDzBPgfAwCnikCpMoCbOL7SU8BdbzQHD8/Lkv4m0pzliHQ/KkGF710koBzTmF
63N7+wk9pwIuvcrEBQj567
64=GV0c
65-----END PGP MESSAGE-----
66
67--nextPart25203163.0xtB501Z4V--
68
69--nextPart2148910.9CGjQOYhYJ--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox.html
deleted file mode 100644
index 7632ec39..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox.html
+++ /dev/null
@@ -1,81 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <div class="noquote">
11 <div dir="ltr">bla bla bla</div>
12 </div>
13 </div>
14 <a name="att2"/>
15 <div id="attachmentDiv2">
16 <table cellspacing="1" cellpadding="1" class="rfc822">
17 <tr class="rfc822H">
18 <td dir="ltr">
19 <a href="attachment:2.1?place=body">Encapsulated message</a>
20 </td>
21 </tr>
22 <tr class="rfc822B">
23 <td>
24 <a name="att2.1"/>
25 <div id="attachmentDiv2.1">
26 <table cellspacing="1" cellpadding="1" class="encr">
27 <tr class="encrH">
28 <td dir="ltr">Encrypted message</td>
29 </tr>
30 <tr class="encrB">
31 <td>
32 <div style="position: relative; word-wrap: break-word">
33 <a name="att"/>
34 <div id="attachmentDiv">
35 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
36 <tr class="signOkKeyOkH">
37 <td dir="ltr">
38 <table cellspacing="0" cellpadding="0" width="100%">
39 <tr>
40 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
41 <td align="right">
42 <a href="kmail:showSignatureDetails">Show Details</a>
43 </td>
44 </tr>
45 </table>
46 </td>
47 </tr>
48 <tr class="signOkKeyOkB">
49 <td>
50 <a name="att1"/>
51 <div id="attachmentDiv1">
52 <div class="noquote">
53 <div dir="ltr">encrypted message text</div>
54 </div>
55 </div>
56 </td>
57 </tr>
58 <tr class="signOkKeyOkH">
59 <td dir="ltr">End of signed message</td>
60 </tr>
61 </table>
62 </div>
63 </div>
64 </td>
65 </tr>
66 <tr class="encrH">
67 <td dir="ltr">End of encrypted message</td>
68 </tr>
69 </table>
70 </div>
71 </td>
72 </tr>
73 <tr class="rfc822H">
74 <td dir="ltr">End of encapsulated message</td>
75 </tr>
76 </table>
77 </div>
78 </div>
79 </div>
80 </body>
81</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox.tree
deleted file mode 100644
index 324156db..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/forward-openpgp-signed-encrypted.mbox.tree
+++ /dev/null
@@ -1,9 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::TextMessagePart
4 * MimeTreeParser::MessagePart
5 * MimeTreeParser::EncapsulatedRfc822MessagePart
6 * MimeTreeParser::EncryptedMessagePart
7 * MimeTreeParser::SignedMessagePart
8 * MimeTreeParser::TextMessagePart
9 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
deleted file mode 100644
index 73c4d2d7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,61 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">test text</div>
40 </div>
41 </div>
42 </div>
43 </td>
44 </tr>
45 <tr class="signOkKeyOkH">
46 <td dir="ltr">End of signed message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="encrH">
54 <td dir="ltr">End of encrypted message</td>
55 </tr>
56 </table>
57 </div>
58 </div>
59 </div>
60 </body>
61</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-attachment.mbox.html
deleted file mode 100644
index d5e4550e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <a name="att1.1"/>
35 <div id="attachmentDiv1.1">
36 <div class="noquote">
37 <div dir="ltr">test text</div>
38 </div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signOkKeyOkH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </td>
50 </tr>
51 <tr class="encrH">
52 <td dir="ltr">End of encrypted message</td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </body>
58</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-non-encrypted-attachment.mbox.html
deleted file mode 100644
index 73c4d2d7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,61 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">test text</div>
40 </div>
41 </div>
42 </div>
43 </td>
44 </tr>
45 <tr class="signOkKeyOkH">
46 <td dir="ltr">End of signed message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="encrH">
54 <td dir="ltr">End of encrypted message</td>
55 </tr>
56 </table>
57 </div>
58 </div>
59 </div>
60 </body>
61</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-partially-signed-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-partially-signed-attachments.mbox.html
deleted file mode 100644
index ebad7354..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-partially-signed-attachments.mbox.html
+++ /dev/null
@@ -1,84 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">This is the main body.</div>
40 </div>
41 </div>
42 </div>
43 </td>
44 </tr>
45 <tr class="signOkKeyOkH">
46 <td dir="ltr">End of signed message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="encrH">
54 <td dir="ltr">End of encrypted message</td>
55 </tr>
56 </table>
57 </div>
58 <a name="att2"/>
59 <div id="attachmentDiv2">
60 <table cellspacing="1" cellpadding="1" class="encr">
61 <tr class="encrH">
62 <td dir="ltr">Encrypted message</td>
63 </tr>
64 <tr class="encrB">
65 <td>
66 <div style="position: relative; word-wrap: break-word">
67 <a name="att"/>
68 <div id="attachmentDiv">
69 <div class="noquote">
70 <div dir="ltr">This is an unsigned attachment.</div>
71 </div>
72 </div>
73 </div>
74 </td>
75 </tr>
76 <tr class="encrH">
77 <td dir="ltr">End of encrypted message</td>
78 </tr>
79 </table>
80 </div>
81 </div>
82 </div>
83 </body>
84</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-two-attachments.mbox.html
deleted file mode 100644
index 4cdeaa63..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-encrypted-two-attachments.mbox.html
+++ /dev/null
@@ -1,34 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <a name="att1"/>
18 <div id="attachmentDiv1">
19 <div class="noquote">
20 <div dir="ltr">this is the main body part</div>
21 </div>
22 </div>
23 </div>
24 </div>
25 </td>
26 </tr>
27 <tr class="encrH">
28 <td dir="ltr">End of encrypted message</td>
29 </tr>
30 </table>
31 </div>
32 </div>
33 </body>
34</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-apple.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-apple.mbox.html
deleted file mode 100644
index 330b02a1..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-apple.mbox.html
+++ /dev/null
@@ -1,50 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signWarn">
9 <tr class="signWarnH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Not enough information to check signature validity.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signWarnB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.2"/>
26 <div id="attachmentDiv1.2">
27 <a name="att1.2.1"/>
28 <div id="attachmentDiv1.2.1">
29 <div style="position: relative">
30 <div class="">pre attachment</div>
31 </div>
32 </div>
33 <a name="att1.2.3"/>
34 <div id="attachmentDiv1.2.3">
35 <div style="position: relative">
36 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p>
37 </div>
38 </div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signWarnH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </body>
50</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-encrypted-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-encrypted-two-attachments.mbox.html
deleted file mode 100644
index 83b7a66c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-encrypted-two-attachments.mbox.html
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <a name="att1.1"/>
35 <div id="attachmentDiv1.1">
36 <div class="noquote">
37 <div dir="ltr">this is the main body</div>
38 </div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signOkKeyOkH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </td>
50 </tr>
51 <tr class="encrH">
52 <td dir="ltr">End of encrypted message</td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </body>
58</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-mailinglist+additional-children.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-mailinglist+additional-children.mbox.html
deleted file mode 100644
index 25b1ad04..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-mailinglist+additional-children.mbox.html
+++ /dev/null
@@ -1,52 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <a name="att1.1"/>
11 <div id="attachmentDiv1.1">
12 <div class="noquote">
13 <div dir="ltr">hi..</div>
14 <br/>
15 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
16 <div dir="ltr">activities_optional</div>
17 <br/>
18 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
19 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
20 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
21 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
22 <br/>
23 <div dir="ltr">--&nbsp;</div>
24 <div dir="ltr">Aaron J. Seigo</div>
25 </div>
26 </div>
27 <a name="att1.2"/>
28 <div id="attachmentDiv1.2">
29 <hr/>
30 <div>
31 <a href="attachment:1.2?place=body"><img align="center" height="48" width="48" src="file:application-pgp-signature.svg" border="0" style="max-width: 100%" alt=""/>signature.asc</a>
32 </div>
33 <div>This is a digitally signed message part.</div>
34 </div>
35 </div>
36 <a name="att2"/>
37 <div id="attachmentDiv2">
38 <div class="noquote">
39 <div dir="ltr">_______________________________________________</div>
40 <div dir="ltr">Plasma-devel mailing list</div>
41 <div dir="ltr">
42 <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a>
43 </div>
44 <div dir="ltr">
45 <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>
46 </div>
47 </div>
48 </div>
49 </div>
50 </div>
51 </body>
52</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-no-protocol.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-no-protocol.mbox.html
deleted file mode 100644
index bdac52b6..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-no-protocol.mbox.html
+++ /dev/null
@@ -1,28 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <div class="noquote">
11 <div dir="ltr">hi..</div>
12 <br/>
13 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
14 <div dir="ltr">activities_optional</div>
15 <br/>
16 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
17 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
18 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
19 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
20 <br/>
21 <div dir="ltr">--&nbsp;</div>
22 <div dir="ltr">Aaron J. Seigo</div>
23 </div>
24 </div>
25 </div>
26 </div>
27 </body>
28</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-two-attachments.mbox.html
deleted file mode 100644
index 027097f7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/openpgp-signed-two-attachments.mbox.html
+++ /dev/null
@@ -1,41 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signOkKeyOkB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.1"/>
26 <div id="attachmentDiv1.1">
27 <div class="noquote">
28 <div dir="ltr">this is the main body text</div>
29 </div>
30 </div>
31 </div>
32 </td>
33 </tr>
34 <tr class="signOkKeyOkH">
35 <td dir="ltr">End of signed message</td>
36 </tr>
37 </table>
38 </div>
39 </div>
40 </body>
41</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/smime-signed-apple.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/smime-signed-apple.mbox.html
deleted file mode 100644
index 9554bb39..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/headeronly/smime-signed-apple.mbox.html
+++ /dev/null
@@ -1,50 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signErr">
9 <tr class="signErrH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Invalid signature.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signErrB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.2"/>
26 <div id="attachmentDiv1.2">
27 <a name="att1.2.1"/>
28 <div id="attachmentDiv1.2.1">
29 <div style="position: relative">Olá Konqui,<div class="">Here is the pdf you asked for!</div><div class="">Cheers,</div><div class="">Quaack</div></div>
30 </div>
31 <a name="att1.2.3"/>
32 <div id="attachmentDiv1.2.3">
33 <div style="position: relative">
34 <blockquote type="cite" class="">
35 <div class="">On 20 Jan 2017, at 10:35, Konqui &lt;<a href="mailto:Konqui@kdab.com">Konqui</a></div>
36 </blockquote>
37 </div>
38 </div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signErrH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </body>
50</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/encapsulated-with-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/encapsulated-with-attachment.mbox.html
deleted file mode 100644
index 42f5ecd7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/encapsulated-with-attachment.mbox.html
+++ /dev/null
@@ -1,43 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <div class="noquote">
11 <div dir="ltr">This is the first encapsulating message.</div>
12 </div>
13 </div>
14 <a name="att2"/>
15 <div id="attachmentDiv2">
16 <table cellspacing="1" cellpadding="1" class="rfc822">
17 <tr class="rfc822H">
18 <td dir="ltr">
19 <a href="attachment:2.1?place=body">Encapsulated message</a>
20 </td>
21 </tr>
22 <tr class="rfc822B">
23 <td>
24 <a name="att2.1"/>
25 <div id="attachmentDiv2.1">
26 <a name="att2.1.1"/>
27 <div id="attachmentDiv2.1.1">
28 <div class="noquote">
29 <div dir="ltr">This is the second encapsulated message.</div>
30 </div>
31 </div>
32 </div>
33 </td>
34 </tr>
35 <tr class="rfc822H">
36 <td dir="ltr">End of encapsulated message</td>
37 </tr>
38 </table>
39 </div>
40 </div>
41 </div>
42 </body>
43</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
deleted file mode 100644
index 73c4d2d7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,61 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">test text</div>
40 </div>
41 </div>
42 </div>
43 </td>
44 </tr>
45 <tr class="signOkKeyOkH">
46 <td dir="ltr">End of signed message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="encrH">
54 <td dir="ltr">End of encrypted message</td>
55 </tr>
56 </table>
57 </div>
58 </div>
59 </div>
60 </body>
61</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-attachment.mbox.html
deleted file mode 100644
index d5e4550e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <a name="att1.1"/>
35 <div id="attachmentDiv1.1">
36 <div class="noquote">
37 <div dir="ltr">test text</div>
38 </div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signOkKeyOkH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </td>
50 </tr>
51 <tr class="encrH">
52 <td dir="ltr">End of encrypted message</td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </body>
58</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-noData.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-noData.mbox.html
deleted file mode 100644
index 166812fe..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-noData.mbox.html
+++ /dev/null
@@ -1,10 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv"/>
8 </div>
9 </body>
10</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-non-encrypted-attachment.mbox.html
deleted file mode 100644
index 73c4d2d7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,61 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">test text</div>
40 </div>
41 </div>
42 </div>
43 </td>
44 </tr>
45 <tr class="signOkKeyOkH">
46 <td dir="ltr">End of signed message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="encrH">
54 <td dir="ltr">End of encrypted message</td>
55 </tr>
56 </table>
57 </div>
58 </div>
59 </div>
60 </body>
61</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-partially-signed-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-partially-signed-attachments.mbox.html
deleted file mode 100644
index ebad7354..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-partially-signed-attachments.mbox.html
+++ /dev/null
@@ -1,84 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">This is the main body.</div>
40 </div>
41 </div>
42 </div>
43 </td>
44 </tr>
45 <tr class="signOkKeyOkH">
46 <td dir="ltr">End of signed message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="encrH">
54 <td dir="ltr">End of encrypted message</td>
55 </tr>
56 </table>
57 </div>
58 <a name="att2"/>
59 <div id="attachmentDiv2">
60 <table cellspacing="1" cellpadding="1" class="encr">
61 <tr class="encrH">
62 <td dir="ltr">Encrypted message</td>
63 </tr>
64 <tr class="encrB">
65 <td>
66 <div style="position: relative; word-wrap: break-word">
67 <a name="att"/>
68 <div id="attachmentDiv">
69 <div class="noquote">
70 <div dir="ltr">This is an unsigned attachment.</div>
71 </div>
72 </div>
73 </div>
74 </td>
75 </tr>
76 <tr class="encrH">
77 <td dir="ltr">End of encrypted message</td>
78 </tr>
79 </table>
80 </div>
81 </div>
82 </div>
83 </body>
84</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-two-attachments.mbox.html
deleted file mode 100644
index 4cdeaa63..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-encrypted-two-attachments.mbox.html
+++ /dev/null
@@ -1,34 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <a name="att1"/>
18 <div id="attachmentDiv1">
19 <div class="noquote">
20 <div dir="ltr">this is the main body part</div>
21 </div>
22 </div>
23 </div>
24 </div>
25 </td>
26 </tr>
27 <tr class="encrH">
28 <td dir="ltr">End of encrypted message</td>
29 </tr>
30 </table>
31 </div>
32 </div>
33 </body>
34</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-apple.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-apple.mbox.html
deleted file mode 100644
index 330b02a1..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-apple.mbox.html
+++ /dev/null
@@ -1,50 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signWarn">
9 <tr class="signWarnH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Not enough information to check signature validity.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signWarnB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.2"/>
26 <div id="attachmentDiv1.2">
27 <a name="att1.2.1"/>
28 <div id="attachmentDiv1.2.1">
29 <div style="position: relative">
30 <div class="">pre attachment</div>
31 </div>
32 </div>
33 <a name="att1.2.3"/>
34 <div id="attachmentDiv1.2.3">
35 <div style="position: relative">
36 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p>
37 </div>
38 </div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signWarnH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </body>
50</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-encrypted-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-encrypted-two-attachments.mbox.html
deleted file mode 100644
index 83b7a66c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-encrypted-two-attachments.mbox.html
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <a name="att1.1"/>
35 <div id="attachmentDiv1.1">
36 <div class="noquote">
37 <div dir="ltr">this is the main body</div>
38 </div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signOkKeyOkH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </td>
50 </tr>
51 <tr class="encrH">
52 <td dir="ltr">End of encrypted message</td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </body>
58</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-mailinglist+additional-children.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-mailinglist+additional-children.mbox.html
deleted file mode 100644
index 1f0da385..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-mailinglist+additional-children.mbox.html
+++ /dev/null
@@ -1,44 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <a name="att1.1"/>
11 <div id="attachmentDiv1.1">
12 <div class="noquote">
13 <div dir="ltr">hi..</div>
14 <br/>
15 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
16 <div dir="ltr">activities_optional</div>
17 <br/>
18 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
19 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
20 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
21 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
22 <br/>
23 <div dir="ltr">--&nbsp;</div>
24 <div dir="ltr">Aaron J. Seigo</div>
25 </div>
26 </div>
27 </div>
28 <a name="att2"/>
29 <div id="attachmentDiv2">
30 <div class="noquote">
31 <div dir="ltr">_______________________________________________</div>
32 <div dir="ltr">Plasma-devel mailing list</div>
33 <div dir="ltr">
34 <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a>
35 </div>
36 <div dir="ltr">
37 <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>
38 </div>
39 </div>
40 </div>
41 </div>
42 </div>
43 </body>
44</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-no-protocol.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-no-protocol.mbox.html
deleted file mode 100644
index bdac52b6..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-no-protocol.mbox.html
+++ /dev/null
@@ -1,28 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <div class="noquote">
11 <div dir="ltr">hi..</div>
12 <br/>
13 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
14 <div dir="ltr">activities_optional</div>
15 <br/>
16 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
17 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
18 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
19 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
20 <br/>
21 <div dir="ltr">--&nbsp;</div>
22 <div dir="ltr">Aaron J. Seigo</div>
23 </div>
24 </div>
25 </div>
26 </div>
27 </body>
28</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-two-attachments.mbox.html
deleted file mode 100644
index 027097f7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/openpgp-signed-two-attachments.mbox.html
+++ /dev/null
@@ -1,41 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signOkKeyOkB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.1"/>
26 <div id="attachmentDiv1.1">
27 <div class="noquote">
28 <div dir="ltr">this is the main body text</div>
29 </div>
30 </div>
31 </div>
32 </td>
33 </tr>
34 <tr class="signOkKeyOkH">
35 <td dir="ltr">End of signed message</td>
36 </tr>
37 </table>
38 </div>
39 </div>
40 </body>
41</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/smime-signed-apple.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/smime-signed-apple.mbox.html
deleted file mode 100644
index 9554bb39..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/hidden/smime-signed-apple.mbox.html
+++ /dev/null
@@ -1,50 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signErr">
9 <tr class="signErrH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Invalid signature.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signErrB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.2"/>
26 <div id="attachmentDiv1.2">
27 <a name="att1.2.1"/>
28 <div id="attachmentDiv1.2.1">
29 <div style="position: relative">Olá Konqui,<div class="">Here is the pdf you asked for!</div><div class="">Cheers,</div><div class="">Quaack</div></div>
30 </div>
31 <a name="att1.2.3"/>
32 <div id="attachmentDiv1.2.3">
33 <div style="position: relative">
34 <blockquote type="cite" class="">
35 <div class="">On 20 Jan 2017, at 10:35, Konqui &lt;<a href="mailto:Konqui@kdab.com">Konqui</a></div>
36 </blockquote>
37 </div>
38 </div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="signErrH">
44 <td dir="ltr">End of signed message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </body>
50</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox
deleted file mode 100644
index eebd4283..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox
+++ /dev/null
@@ -1,31 +0,0 @@
1From foo@example.com Thu, 26 May 2011 01:16:54 +0100
2From: Thomas McGuire <foo@example.com>
3Subject: HTML test
4Date: Thu, 26 May 2011 01:16:54 +0100
5Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost>
6X-KMail-Transport: GMX
7X-KMail-Fcc: 28
8X-KMail-Drafts: 7
9X-KMail-Templates: 9
10User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19)
11MIME-Version: 1.0
12Content-Type: multipart/alternative; boundary="nextPart8606278.tpV19BTJKu"
13Content-Transfer-Encoding: 7Bit
14
15
16--nextPart8606278.tpV19BTJKu
17Content-Transfer-Encoding: 7Bit
18Content-Type: text/plain; charset="windows-1252"
19
20Some HTML text
21--nextPart8606278.tpV19BTJKu
22Content-Transfer-Encoding: 7Bit
23Content-Type: text/html; charset="windows-1252"
24
25<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
26<html><head><meta name="qrichtext" content="1" /><style type="text/css">
27p, li { white-space: pre-wrap; }
28</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
29<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p></body></html>
30--nextPart8606278.tpV19BTJKu--
31
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox.html
deleted file mode 100644
index 2fe886f1..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox.html
+++ /dev/null
@@ -1,17 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att2"/>
9 <div id="attachmentDiv2">
10 <div style="position: relative">
11 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p>
12 </div>
13 </div>
14 </div>
15 </div>
16 </body>
17</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox.tree
deleted file mode 100644
index 0de07281..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/html.mbox.tree
+++ /dev/null
@@ -1,2 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::AlternativeMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox
deleted file mode 100644
index e45b1c4d..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox
+++ /dev/null
@@ -1,21 +0,0 @@
1From foo@example.com Thu, 26 May 2011 01:16:54 +0100
2From: Thomas McGuire <foo@example.com>
3Subject: HTML test
4Date: Thu, 26 May 2011 01:16:54 +0100
5Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost>
6X-KMail-Transport: GMX
7X-KMail-Fcc: 28
8X-KMail-Drafts: 7
9X-KMail-Templates: 9
10User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19)
11MIME-Version: 1.0
12Content-Type: text/html
13Content-Transfer-Encoding: 7Bit
14
15<html>
16<head>
17</head>
18<body>
19<b>SOME</b> HTML text.
20</body>
21</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox.html
deleted file mode 100644
index 1143f2cf..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox.html
+++ /dev/null
@@ -1,12 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <div style="position: relative"><b>SOME</b> HTML text.</div>
9 </div>
10 </div>
11 </body>
12</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox.tree
deleted file mode 100644
index a4c3191b..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonly.mbox.tree
+++ /dev/null
@@ -1,2 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::HtmlMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonlyexternal.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonlyexternal.mbox
deleted file mode 100644
index 4eb3e2c3..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/htmlonlyexternal.mbox
+++ /dev/null
@@ -1,21 +0,0 @@
1From foo@example.com Thu, 26 May 2011 01:16:54 +0100
2From: Thomas McGuire <foo@example.com>
3Subject: HTML test
4Date: Thu, 26 May 2011 01:16:54 +0100
5Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost>
6X-KMail-Transport: GMX
7X-KMail-Fcc: 28
8X-KMail-Drafts: 7
9X-KMail-Templates: 9
10User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19)
11MIME-Version: 1.0
12Content-Type: text/html
13Content-Transfer-Encoding: 7Bit
14
15<html>
16<head>
17</head>
18<body>
19<b>SOME</b> HTML text. <img src="http://example.org/test.img" >
20</body>
21</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-encrypted-partially-signed-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-encrypted-partially-signed-attachments.mbox.html
deleted file mode 100644
index b6f734c2..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-encrypted-partially-signed-attachments.mbox.html
+++ /dev/null
@@ -1,92 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">This is the main body.</div>
40 </div>
41 </div>
42 <a name="att1.2"/>
43 <div id="attachmentDiv1.2">
44 <hr/>
45 <div>
46 <a href="attachment:1:e0:1.2?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>attachment1.txt</a>
47 </div>
48 <div/>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="signOkKeyOkH">
54 <td dir="ltr">End of signed message</td>
55 </tr>
56 </table>
57 </div>
58 </div>
59 </td>
60 </tr>
61 <tr class="encrH">
62 <td dir="ltr">End of encrypted message</td>
63 </tr>
64 </table>
65 </div>
66 <a name="att2"/>
67 <div id="attachmentDiv2">
68 <table cellspacing="1" cellpadding="1" class="encr">
69 <tr class="encrH">
70 <td dir="ltr">Encrypted message</td>
71 </tr>
72 <tr class="encrB">
73 <td>
74 <div style="position: relative; word-wrap: break-word">
75 <a name="att"/>
76 <div id="attachmentDiv">
77 <div class="noquote">
78 <div dir="ltr">This is an unsigned attachment.</div>
79 </div>
80 </div>
81 </div>
82 </td>
83 </tr>
84 <tr class="encrH">
85 <td dir="ltr">End of encrypted message</td>
86 </tr>
87 </table>
88 </div>
89 </div>
90 </div>
91 </body>
92</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-encrypted-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-encrypted-two-attachments.mbox.html
deleted file mode 100644
index 7f0b7abd..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-encrypted-two-attachments.mbox.html
+++ /dev/null
@@ -1,50 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <a name="att1"/>
18 <div id="attachmentDiv1">
19 <div class="noquote">
20 <div dir="ltr">this is the main body part</div>
21 </div>
22 </div>
23 <a name="att2"/>
24 <div id="attachmentDiv2">
25 <hr/>
26 <div>
27 <a href="attachment:e0:2?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>attachment1.txt</a>
28 </div>
29 <div/>
30 </div>
31 <a name="att3"/>
32 <div id="attachmentDiv3">
33 <hr/>
34 <div>
35 <a href="attachment:e0:3?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>attachment2.txt</a>
36 </div>
37 <div/>
38 </div>
39 </div>
40 </div>
41 </td>
42 </tr>
43 <tr class="encrH">
44 <td dir="ltr">End of encrypted message</td>
45 </tr>
46 </table>
47 </div>
48 </div>
49 </body>
50</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-signed-encrypted-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-signed-encrypted-two-attachments.mbox.html
deleted file mode 100644
index 8d6b5814..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-signed-encrypted-two-attachments.mbox.html
+++ /dev/null
@@ -1,74 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <a name="att1.1"/>
35 <div id="attachmentDiv1.1">
36 <div class="noquote">
37 <div dir="ltr">this is the main body</div>
38 </div>
39 </div>
40 <a name="att1.2"/>
41 <div id="attachmentDiv1.2">
42 <hr/>
43 <div>
44 <a href="attachment:e0:1.2?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>attachment1.txt</a>
45 </div>
46 <div/>
47 </div>
48 <a name="att1.3"/>
49 <div id="attachmentDiv1.3">
50 <hr/>
51 <div>
52 <a href="attachment:e0:1.3?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>attachment2.txt</a>
53 </div>
54 <div/>
55 </div>
56 </div>
57 </td>
58 </tr>
59 <tr class="signOkKeyOkH">
60 <td dir="ltr">End of signed message</td>
61 </tr>
62 </table>
63 </div>
64 </div>
65 </td>
66 </tr>
67 <tr class="encrH">
68 <td dir="ltr">End of encrypted message</td>
69 </tr>
70 </table>
71 </div>
72 </div>
73 </body>
74</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-signed-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-signed-two-attachments.mbox.html
deleted file mode 100644
index 73dbc5f4..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/iconic/openpgp-signed-two-attachments.mbox.html
+++ /dev/null
@@ -1,57 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signOkKeyOkB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.1"/>
26 <div id="attachmentDiv1.1">
27 <div class="noquote">
28 <div dir="ltr">this is the main body text</div>
29 </div>
30 </div>
31 <a name="att1.2"/>
32 <div id="attachmentDiv1.2">
33 <hr/>
34 <div>
35 <a href="attachment:1.2?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>attachment1.txt</a>
36 </div>
37 <div/>
38 </div>
39 <a name="att1.3"/>
40 <div id="attachmentDiv1.3">
41 <hr/>
42 <div>
43 <a href="attachment:1.3?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>attachment2.txt</a>
44 </div>
45 <div/>
46 </div>
47 </div>
48 </td>
49 </tr>
50 <tr class="signOkKeyOkH">
51 <td dir="ltr">End of signed message</td>
52 </tr>
53 </table>
54 </div>
55 </div>
56 </body>
57</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/encapsulated-with-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/encapsulated-with-attachment.mbox.html
deleted file mode 100644
index 26d3dd60..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/encapsulated-with-attachment.mbox.html
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <div class="noquote">
11 <div dir="ltr">This is the first encapsulating message.</div>
12 </div>
13 </div>
14 <a name="att2"/>
15 <div id="attachmentDiv2">
16 <table cellspacing="1" cellpadding="1" class="rfc822">
17 <tr class="rfc822H">
18 <td dir="ltr">
19 <a href="attachment:2.1?place=body">Encapsulated message</a>
20 </td>
21 </tr>
22 <tr class="rfc822B">
23 <td>
24 <a name="att2.1"/>
25 <div id="attachmentDiv2.1">
26 <a name="att2.1.1"/>
27 <div id="attachmentDiv2.1.1">
28 <div class="noquote">
29 <div dir="ltr">This is the second encapsulated message.</div>
30 </div>
31 </div>
32 <a name="att2.1.2"/>
33 <div id="attachmentDiv2.1.2">
34 <table cellspacing="1" class="textAtm">
35 <tr class="textAtmH">
36 <td dir="ltr">attachment.txt</td>
37 </tr>
38 <tr class="textAtmB">
39 <td>
40 <div class="noquote">
41 <div dir="ltr">This is an attachment.</div>
42 </div>
43 </td>
44 </tr>
45 </table>
46 </div>
47 </div>
48 </td>
49 </tr>
50 <tr class="rfc822H">
51 <td dir="ltr">End of encapsulated message</td>
52 </tr>
53 </table>
54 </div>
55 </div>
56 </div>
57 </body>
58</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
deleted file mode 100644
index 49e503f1..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,90 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">test text</div>
40 </div>
41 </div>
42 <a name="att1.2"/>
43 <div id="attachmentDiv1.2">
44 <table cellspacing="1" class="textAtm">
45 <tr class="textAtmH">
46 <td dir="ltr">file.txt</td>
47 </tr>
48 <tr class="textAtmB">
49 <td>
50 <div class="noquote">
51 <div dir="ltr">some plain ascii text...</div>
52 <br/>
53 </div>
54 </td>
55 </tr>
56 </table>
57 </div>
58 </div>
59 </td>
60 </tr>
61 <tr class="signOkKeyOkH">
62 <td dir="ltr">End of signed message</td>
63 </tr>
64 </table>
65 </div>
66 </div>
67 </td>
68 </tr>
69 <tr class="encrH">
70 <td dir="ltr">End of encrypted message</td>
71 </tr>
72 </table>
73 </div>
74 <a name="att2"/>
75 <div id="attachmentDiv2">
76 <hr/>
77 <div>
78 <a href="attachment:2?place=body">
79 <img align="center" src="file:image.png" border="0" style="max-width: 100%"/>
80 </a>
81 </div>
82 <div>
83 <a href="attachment:2?place=body">image.png</a>
84 </div>
85 <div/>
86 </div>
87 </div>
88 </div>
89 </body>
90</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-attachment.mbox.html
deleted file mode 100644
index 67897491..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,74 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <a name="att1.1"/>
35 <div id="attachmentDiv1.1">
36 <div class="noquote">
37 <div dir="ltr">test text</div>
38 </div>
39 </div>
40 <a name="att1.2"/>
41 <div id="attachmentDiv1.2">
42 <table cellspacing="1" class="textAtm">
43 <tr class="textAtmH">
44 <td dir="ltr">file.txt</td>
45 </tr>
46 <tr class="textAtmB">
47 <td>
48 <div class="noquote">
49 <div dir="ltr">some plain ascii text...</div>
50 <br/>
51 </div>
52 </td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </td>
58 </tr>
59 <tr class="signOkKeyOkH">
60 <td dir="ltr">End of signed message</td>
61 </tr>
62 </table>
63 </div>
64 </div>
65 </td>
66 </tr>
67 <tr class="encrH">
68 <td dir="ltr">End of encrypted message</td>
69 </tr>
70 </table>
71 </div>
72 </div>
73 </body>
74</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-non-encrypted-attachment.mbox.html
deleted file mode 100644
index 6091ee5a..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-encrypted-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,74 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">test text</div>
40 </div>
41 </div>
42 </div>
43 </td>
44 </tr>
45 <tr class="signOkKeyOkH">
46 <td dir="ltr">End of signed message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="encrH">
54 <td dir="ltr">End of encrypted message</td>
55 </tr>
56 </table>
57 </div>
58 <a name="att2"/>
59 <div id="attachmentDiv2">
60 <hr/>
61 <div>
62 <a href="attachment:2?place=body">
63 <img align="center" src="file:image.png" border="0" style="max-width: 100%"/>
64 </a>
65 </div>
66 <div>
67 <a href="attachment:2?place=body">image.png</a>
68 </div>
69 <div/>
70 </div>
71 </div>
72 </div>
73 </body>
74</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-signed-apple.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-signed-apple.mbox.html
deleted file mode 100644
index 092d5e1c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-signed-apple.mbox.html
+++ /dev/null
@@ -1,63 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signWarn">
9 <tr class="signWarnH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Not enough information to check signature validity.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signWarnB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.2"/>
26 <div id="attachmentDiv1.2">
27 <a name="att1.2.1"/>
28 <div id="attachmentDiv1.2.1">
29 <div style="position: relative">
30 <div class="">pre attachment</div>
31 </div>
32 </div>
33 <a name="att1.2.2"/>
34 <div id="attachmentDiv1.2.2">
35 <hr/>
36 <div>
37 <a href="attachment:1.2.2?place=body">
38 <img align="center" src="file:image.png" border="0" style="max-width: 100%"/>
39 </a>
40 </div>
41 <div>
42 <a href="attachment:1.2.2?place=body">image.png</a>
43 </div>
44 <div/>
45 </div>
46 <a name="att1.2.3"/>
47 <div id="attachmentDiv1.2.3">
48 <div style="position: relative">
49 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p>
50 </div>
51 </div>
52 </div>
53 </div>
54 </td>
55 </tr>
56 <tr class="signWarnH">
57 <td dir="ltr">End of signed message</td>
58 </tr>
59 </table>
60 </div>
61 </div>
62 </body>
63</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-signed-mailinglist+additional-children.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-signed-mailinglist+additional-children.mbox.html
deleted file mode 100644
index cc49cbcc..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/openpgp-signed-mailinglist+additional-children.mbox.html
+++ /dev/null
@@ -1,67 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <a name="att1.1"/>
11 <div id="attachmentDiv1.1">
12 <div class="noquote">
13 <div dir="ltr">hi..</div>
14 <br/>
15 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
16 <div dir="ltr">activities_optional</div>
17 <br/>
18 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
19 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
20 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
21 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
22 <br/>
23 <div dir="ltr">--&nbsp;</div>
24 <div dir="ltr">Aaron J. Seigo</div>
25 </div>
26 </div>
27 <a name="att1.2"/>
28 <div id="attachmentDiv1.2">
29 <hr/>
30 <div>
31 <a href="attachment:1.2?place=body"><img align="center" height="48" width="48" src="file:application-pgp-signature.svg" border="0" style="max-width: 100%" alt=""/>signature.asc</a>
32 </div>
33 <div>This is a digitally signed message part.</div>
34 </div>
35 <a name="att1.3"/>
36 <div id="attachmentDiv1.3">
37 <table cellspacing="1" class="textAtm">
38 <tr class="textAtmH">
39 <td dir="ltr">broken.attachment</td>
40 </tr>
41 <tr class="textAtmB">
42 <td>
43 <div class="noquote">
44 <div dir="ltr">Let's break a signed message - This messageblock should not be here :D</div>
45 </div>
46 </td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 <a name="att2"/>
52 <div id="attachmentDiv2">
53 <div class="noquote">
54 <div dir="ltr">_______________________________________________</div>
55 <div dir="ltr">Plasma-devel mailing list</div>
56 <div dir="ltr">
57 <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a>
58 </div>
59 <div dir="ltr">
60 <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>
61 </div>
62 </div>
63 </div>
64 </div>
65 </div>
66 </body>
67</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/smime-signed-apple.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/smime-signed-apple.mbox.html
deleted file mode 100644
index d3f3eeb3..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlined/smime-signed-apple.mbox.html
+++ /dev/null
@@ -1,63 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signErr">
9 <tr class="signErrH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Invalid signature.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signErrB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.2"/>
26 <div id="attachmentDiv1.2">
27 <a name="att1.2.1"/>
28 <div id="attachmentDiv1.2.1">
29 <div style="position: relative">Olá Konqui,<div class="">Here is the pdf you asked for!</div><div class="">Cheers,</div><div class="">Quaack</div></div>
30 </div>
31 <a name="att1.2.2"/>
32 <div id="attachmentDiv1.2.2">
33 <hr/>
34 <div>
35 <a href="attachment:1.2.2?place=body">
36 <img align="center" src="file:image.png" border="0" style="max-width: 100%"/>
37 </a>
38 </div>
39 <div>
40 <a href="attachment:1.2.2?place=body">image.png</a>
41 </div>
42 <div/>
43 </div>
44 <a name="att1.2.3"/>
45 <div id="attachmentDiv1.2.3">
46 <div style="position: relative">
47 <blockquote type="cite" class="">
48 <div class="">On 20 Jan 2017, at 10:35, Konqui &lt;<a href="mailto:Konqui@kdab.com">Konqui</a></div>
49 </blockquote>
50 </div>
51 </div>
52 </div>
53 </div>
54 </td>
55 </tr>
56 <tr class="signErrH">
57 <td dir="ltr">End of signed message</td>
58 </tr>
59 </table>
60 </div>
61 </div>
62 </body>
63</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox
deleted file mode 100644
index c05a7e69..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox
+++ /dev/null
@@ -1,33 +0,0 @@
1From test@kolab.org Wed, 25 May 2011 23:49:40 +0100
2From: OpenPGP Test <test@kolab.org>
3To: test@kolab.org
4Subject: inlinepgpencrypted
5Date: Wed, 25 May 2011 23:49:40 +0100
6Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost>
7X-KMail-Transport: GMX
8X-KMail-Fcc: 28
9X-KMail-Drafts: 7
10X-KMail-Templates: 9
11User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19)
12MIME-Version: 1.0
13Content-Transfer-Encoding: 7Bit
14Content-Type: text/plain; charset="us-ascii"
15
16-----BEGIN PGP MESSAGE-----
17Version: GnuPG v2.0.15 (GNU/Linux)
18
19hQEMAwzOQ1qnzNo7AQf/a3aNTLpQBfcUr+4AKsZQLj4h6z7e7a5AaCW8AG0wrbxN
20kBYB7E5jdZh45DX/99gvoZslthWryUCX2kKZ3LtIllxKVjqNuK5hSt+SAuKkwiMR
21Xcbf1KFKENKupgGSO9B2NJRbjoExdJ+fC3mGXnO3dT7xJJAo3oLE8Nivu+Bj1peY
22E1wCf+vcTwVHFrA7SV8eMRb9Z9wBXmU8Q8e9ekJ7ZsRX3tMeBs6jvscVvfMf6DYY
23N14snZBZuGNKT9a3DPny7IC1S0lHcaam34ogWwMi3FxPGJt/Lg52kARlkF5TDhcP
24N6H0EB/iqDRjOOUoEVm8um5XOSR1FpEiAdD0DON3y9JPATnrYq7sgYZz3BVImYY+
25N/jV8fEiN0a34pcOq8NQedMuOsJHNBS5MtbQH/kJLq0MXBpXekGlHo4MKw0trISc
26Rw3pW6/BFfhPJLni29g9tw==
27=fRFW
28-----END PGP MESSAGE-----
29
30_______________________________________________
31test mailing list
32test@lists.kde.org
33http://kde.org
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox.html
deleted file mode 100644
index 8af2b1c6..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox.html
+++ /dev/null
@@ -1,36 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div class="noquote">
15 <div dir="ltr">some random text</div>
16 </div>
17 </td>
18 </tr>
19 <tr class="encrH">
20 <td dir="ltr">End of encrypted message</td>
21 </tr>
22 </table>
23 <div class="noquote">
24 <div dir="ltr">_______________________________________________</div>
25 <div dir="ltr">test mailing list</div>
26 <div dir="ltr">
27 <a href="mailto:test@lists.kde.org">test@lists.kde.org</a>
28 </div>
29 <div dir="ltr">
30 <a href="http://kde.org">http://kde.org</a>
31 </div>
32 </div>
33 </div>
34 </div>
35 </body>
36</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox.tree
deleted file mode 100644
index 018f5c33..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-appendix.mbox.tree
+++ /dev/null
@@ -1,4 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::TextMessagePart
3 * MimeTreeParser::EncryptedMessagePart
4 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox
deleted file mode 100644
index 529b4d3b..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox
+++ /dev/null
@@ -1,55 +0,0 @@
1From test@kolab.org Wed, 25 May 2011 23:49:40 +0100
2From: OpenPGP Test <test@kolab.org>
3To: test@kolab.org
4Subject: inlinepgpencrypted - no seckey
5Date: Wed, 25 May 2011 23:49:40 +0100
6Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost>
7X-KMail-Transport: GMX
8X-KMail-Fcc: 28
9X-KMail-Drafts: 7
10X-KMail-Templates: 9
11User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19)
12MIME-Version: 1.0
13Content-Transfer-Encoding: 7Bit
14Content-Type: text/plain; charset="us-ascii"
15
16-----BEGIN PGP MESSAGE-----
17Version: GnuPG v2
18
19hQIMA1U9QmLaS63yAQ/8C8o5D7wQ9LoPHrNCNelku19bwQogTIqxRJSTYzO0b0tr
20Pb7Oyxkm1XabYxhg9bxFcNvvAbxcbzmnFJqkVPzCird43N5BDMtwGumiUjNNYVgy
214tD6hs+h8GsmmQ5/J5cmuUwA+Ee20ubrTMH2qkU75WcyuRAG+IFsA80eEKG5qR8y
22i2WXjBiImcmjrEVtSA3L+mUHmhuWxz/46EnCelSAJMfhSG8zuTJnK6OFBSDQNkqE
23NRJl0PO4DYDeJiSYeXWEB2GTvc9JXtcHm7wIwzHXHSrBlXvQWEj5B8z9GSOJwO0o
24JuV29TVU4iDU8d3flfhMGZEJXUkIIwt66/0CtuJNDmIAnqc4wQO9LtXFXOI/YK7x
25twidnLY04kmh1bZfQsUBhwdYqLUzr0AXqE2kRTozod4XgVBmphVt6Ytu11L1UFdb
261wKBaQG/qmhOmeMJb7eJX6I66p8LzKiqkfNlTnPQURELMbCmiRwoDCC5wnrDj8g/
27K0zvfNRFbGimbTHeQ01OncoVcRIlXK7njM6dTTqnglzwZagHn1Ph0krkdbnzLJkc
28j8v1QLWuM1ttMIgW5xu4R4cjSSuLZKtZNmnlQe1e5rllZbwIFlUVH/SRNblAnRi5
29GUPDJWLZJppfFk2H1pjgze4s9oZljEKXzeOa/pfrfcZ8BVmg7UnKnMyygVH1+4aF
30BA4D9uaj0SbGMOAQEACfyo8uFl+Yq9XwFbAJmeSP3/AMG2HhfCNgkGkcjE+EykTm
31/jn/Emscw1QyjonX1RcOvtFHbI7VsUblCcJngytfikSgM/5U/NniPtrdqohOhjgO
32WJ+TxWhO4K64WaBzq5E5Q+7S2ciZTkz3tlZ2jRI0pjTxuvxVUV5fHwlES7ZfHCUg
33F4eGGFU7xz3gxC6Wt6OV2EGP7wa1qf430fa5bmLZ1QsJY7l+ApbqOoWqfDmjhN6o
34qf6xEtt+xx41lakdWg05VPYzkhDv7FHb2pGWeLRZpG5Rblg3LVi94lGyXstNcFre
35cudq5kM2rPB9/LL65qq54KB2BsXgBSuihvRpryHqv7PSSBw+Gx5wOWZ/DZOS2RvV
36UsrpN1M8XqJYUX/AExzSajsABQkbLj3Gw1WRyed7Sokrrus9fXJy25FXQ3AjBEQZ
37vl8nrsEFWFQIi8s3NWoHz6IU9jyDWzJp2Twi/PKVfe7r7aMeHGRJJWMvVQbIjPEW
38C8GqjyVPZmmGw5Eo6V95kwF1ED6UZaEdEYLdgKIoXwL1epil2mEaX0AuugN1vkHr
3935gyHosJC0dWtNRGoSh7nGR4uwEDs6Sf9J87b+QAGbbDgePprH6AAq0qsLxc0SNO
40OWFzo8/CeA4KjsYXTCsIOov99TomqI93bP9BrhNBra4RMBxjsfZ5FL2X3cCwKBAA
41jPFVgrctgkX3piwu58Zi5OpRbiXOLF6PdPaBjwyD3cFIU+TmdSLU0zGG/uCkwL3U
42LSHhHEdf8D5laasulX7Bz72X2DXSKraoHu8tSa2f/gBRrEOSJV86yw6FAxLCn3Lm
43NCn/cSKskO/m/J2WGhiHgFSe/4OrFpqx78tWKM+XheAgz6No9vPT9KooEyKqCwlS
44lI7QHhLl9eWmT1NPRibfdL9aMzjPfxmE91vaN29NnxQJG2w7KnI7sxXvZljOvuSI
45FE9NvGs2uHjRFjO0Vncjuv/fAbdvVvkTCSyLWZLUyOegJa/0KZOU48HtwwBzVxl1
46D9joee2bmQnmxuGomRwelUVbux1GKRhfCtnNuKQNXU7NP3AnNUDAQjrQSD5C1f3e
479tPOi3wRuXnlYfBcmemKUrdYNVpWBpHh+KnJ1rW/NqwNvUtq0ucYIT5//dKaPiIf
48HqizKm0MntFbIv4f29TNfw5Wp1GcTXc6Dmt/KSCjLH+IxPtdAgI5ZlrdOfVxlY1B
49abIFKjN0csPfkfX7l8g6ekOYgP/NRHQQs7Zyds59Zj7Roi7+uabV8svXRREm0V34
50595ro3cEzABOAnErxErC7Lm/VUI348kdOP/3IAckmwv1qts3P2eDA6CcLYE2V+sz
517mb9UGrUzu8hBxPjbuqIYfi2XOSxGRCvSH0Rmw7XzKfSRwHpusUQjpCbRXyntVqY
52Db8+PufLBENx22ipLLEDltP1P9zRuy2KpANd0sggM/HtUC3Bjta7IR9Q3qbVcPDx
533Qu241eOBdb6
54=J3lb
55-----END PGP MESSAGE-----
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox.html
deleted file mode 100644
index a4427e01..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox.html
+++ /dev/null
@@ -1,24 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message (decryption not possible)<br/>Reason: Crypto plug-in "OpenPGP" could not decrypt the data.<br/>Error: Decryption failed</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="font-size:x-large; text-align:center; padding:20pt;">No secret key found to encrypt the message. It is encrypted for following keys:<br/><a href="kmail:showCertificate#gpg ### OpenPGP ### 553D4262DA4BADF2">0x553D4262DA4BADF2</a><br/><a href="kmail:showCertificate#gpg ### OpenPGP ### F6E6A3D126C630E0">0xF6E6A3D126C630E0</a></div>
15 </td>
16 </tr>
17 <tr class="encrH">
18 <td dir="ltr">End of encrypted message</td>
19 </tr>
20 </table>
21 </div>
22 </div>
23 </body>
24</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox.tree
deleted file mode 100644
index 6680b8bc..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted-error.mbox.tree
+++ /dev/null
@@ -1,3 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::TextMessagePart
3 * MimeTreeParser::EncryptedMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox
deleted file mode 100644
index b581602c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox
+++ /dev/null
@@ -1,29 +0,0 @@
1From test@kolab.org Wed, 25 May 2011 23:49:40 +0100
2From: OpenPGP Test <test@kolab.org>
3To: test@kolab.org
4Subject: inlinepgpencrypted
5Date: Wed, 25 May 2011 23:49:40 +0100
6Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost>
7X-KMail-Transport: GMX
8X-KMail-Fcc: 28
9X-KMail-Drafts: 7
10X-KMail-Templates: 9
11User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19)
12MIME-Version: 1.0
13Content-Transfer-Encoding: 7Bit
14Content-Type: text/plain; charset="us-ascii"
15
16-----BEGIN PGP MESSAGE-----
17Version: GnuPG v2.0.15 (GNU/Linux)
18
19hQEMAwzOQ1qnzNo7AQf/a3aNTLpQBfcUr+4AKsZQLj4h6z7e7a5AaCW8AG0wrbxN
20kBYB7E5jdZh45DX/99gvoZslthWryUCX2kKZ3LtIllxKVjqNuK5hSt+SAuKkwiMR
21Xcbf1KFKENKupgGSO9B2NJRbjoExdJ+fC3mGXnO3dT7xJJAo3oLE8Nivu+Bj1peY
22E1wCf+vcTwVHFrA7SV8eMRb9Z9wBXmU8Q8e9ekJ7ZsRX3tMeBs6jvscVvfMf6DYY
23N14snZBZuGNKT9a3DPny7IC1S0lHcaam34ogWwMi3FxPGJt/Lg52kARlkF5TDhcP
24N6H0EB/iqDRjOOUoEVm8um5XOSR1FpEiAdD0DON3y9JPATnrYq7sgYZz3BVImYY+
25N/jV8fEiN0a34pcOq8NQedMuOsJHNBS5MtbQH/kJLq0MXBpXekGlHo4MKw0trISc
26Rw3pW6/BFfhPJLni29g9tw==
27=fRFW
28-----END PGP MESSAGE-----
29
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.html
deleted file mode 100644
index 1f695bdf..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.html
+++ /dev/null
@@ -1,26 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div class="noquote">
15 <div dir="ltr">some random text</div>
16 </div>
17 </td>
18 </tr>
19 <tr class="encrH">
20 <td dir="ltr">End of encrypted message</td>
21 </tr>
22 </table>
23 </div>
24 </div>
25 </body>
26</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.inProgress.html b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.inProgress.html
deleted file mode 100644
index e5eb55d0..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.inProgress.html
+++ /dev/null
@@ -1,24 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Please wait while the message is being decrypted...</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="font-size:x-large; text-align:center; padding:20pt;"/>
15 </td>
16 </tr>
17 <tr class="encrH">
18 <td dir="ltr">End of encrypted message</td>
19 </tr>
20 </table>
21 </div>
22 </div>
23 </body>
24</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.tree
deleted file mode 100644
index 6680b8bc..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/inlinepgpencrypted.mbox.tree
+++ /dev/null
@@ -1,3 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::TextMessagePart
3 * MimeTreeParser::EncryptedMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/mailheader.css b/framework/src/domain/mimetreeparser/otp/autotests/data/mailheader.css
deleted file mode 100644
index 10181957..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/mailheader.css
+++ /dev/null
@@ -1,512 +0,0 @@
1div.header {
2 margin-bottom: 10pt ! important;
3}
4
5table.textAtm {
6 margin-top: 10pt ! important;
7 margin-bottom: 10pt ! important;
8}
9
10tr.textAtmH,
11tr.textAtmB,
12tr.rfc822B {
13 font-weight: normal ! important;
14}
15
16tr.signInProgressH,
17tr.rfc822H,
18tr.encrH,
19tr.signOkKeyOkH,
20tr.signOkKeyBadH,
21tr.signWarnH,
22tr.signErrH {
23 font-weight: bold ! important;
24}
25
26tr.textAtmH td,
27tr.textAtmB td {
28 padding: 3px ! important;
29}
30
31table.rfc822 {
32 width: 100% ! important;
33 border: solid 1px black ! important;
34 margin-top: 10pt ! important;
35 margin-bottom: 10pt ! important;
36}
37
38table.textAtm,
39table.encr,
40table.signWarn,
41table.signErr,
42table.signOkKeyBad,
43table.signOkKeyOk,
44table.signInProgress,
45div.fancy.header table {
46 width: 100% ! important;
47 border-width: 0px ! important;
48 line-height: normal;
49}
50
51div.htmlWarn {
52 margin: 0px 5% ! important;
53 padding: 10px ! important;
54 text-align: left ! important;
55 line-height: normal;
56}
57
58div.fancy.header > div {
59 font-weight: bold ! important;
60 padding: 4px ! important;
61 line-height: normal;
62}
63
64div.fancy.header table {
65 padding: 2px ! important;
66 text-align: left ! important;
67 border-collapse: separate ! important;
68}
69
70div.fancy.header table th {
71 font-family: "Sans Serif" ! important;
72 font-size: 0px ! important;
73
74 padding: 0px ! important;
75 white-space: nowrap ! important;
76 border-spacing: 0px ! important;
77 text-align: left ! important;
78 vertical-align: top ! important;
79 background-color: #d6d2d0 ! important;
80 color: #221f1e ! important;
81 border: 1px ! important;
82}
83
84div.fancy.header table td {
85 font-family: "Sans Serif" ! important;
86 font-size: 0px ! important;
87
88 padding: 0px ! important;
89 border-spacing: 0px ! important;
90 text-align: left ! important;
91 vertical-align: top ! important;
92 width: 100% ! important;
93 background-color: #d6d2d0 ! important;
94 color: #221f1e ! important;
95 border: 1px ! important;
96}
97
98div.fancy.header table a:hover {
99 background-color: transparent ! important;
100}
101
102span.pimsmileytext {
103 position: absolute;
104 top: 0px;
105 left: 0px;
106 visibility: hidden;
107}
108
109img.pimsmileyimg {
110}
111
112div.quotelevelmark {
113 position: absolute;
114 margin-left:-10px;
115}
116
117@media screen {
118
119body {
120 font-family: "Sans Serif" ! important;
121 font-size: 0px ! important;
122 color: #1f1c1b ! important;
123 background-color: #ffffff ! important;
124}
125
126a {
127 color: #0057ae ! important;
128 text-decoration: none ! important;
129}
130
131a.white {
132 color: white ! important;
133}
134
135a.black {
136 color: black ! important;
137}
138
139table.textAtm { background-color: #1f1c1b ! important; }
140
141tr.textAtmH {
142 background-color: #ffffff ! important;
143 font-family: "Sans Serif" ! important;
144 font-size: 0px ! important;
145}
146
147tr.textAtmB {
148 background-color: #ffffff ! important;
149}
150
151table.signInProgress,
152table.rfc822 {
153 background-color: #ffffff ! important;
154}
155
156tr.signInProgressH,
157tr.rfc822H {
158 font-family: "Sans Serif" ! important;
159 font-size: 0px ! important;
160}
161
162table.encr {
163 background-color: #0069cc ! important;
164}
165
166tr.encrH {
167 background-color: #0080ff ! important;
168 color: #ffffff ! important;
169 font-family: "Sans Serif" ! important;
170 font-size: 0px ! important;
171}
172
173tr.encrB { background-color: #e0f0ff ! important; }
174
175table.signOkKeyOk {
176 background-color: #33cc33 ! important;
177}
178
179tr.signOkKeyOkH {
180 background-color: #40ff40 ! important;
181 color: #27ae60 ! important;
182 font-family: "Sans Serif" ! important;
183 font-size: 0px ! important;
184}
185
186tr.signOkKeyOkB { background-color: #e8ffe8 ! important; }
187
188table.signOkKeyBad {
189 background-color: #cccc33 ! important;
190}
191
192tr.signOkKeyBadH {
193 background-color: #ffff40 ! important;
194 color: #f67400 ! important;
195 font-family: "Sans Serif" ! important;
196 font-size: 0px ! important;
197}
198
199tr.signOkKeyBadB { background-color: #ffffe8 ! important; }
200
201table.signWarn {
202 background-color: #cccc33 ! important;
203}
204
205tr.signWarnH {
206 background-color: #ffff40 ! important;
207 color: #f67400 ! important;
208 font-family: "Sans Serif" ! important;
209 font-size: 0px ! important;
210}
211
212tr.signWarnB { background-color: #ffffe8 ! important; }
213
214table.signErr {
215 background-color: #cc0000 ! important;
216}
217
218tr.signErrH {
219 background-color: #ff0000 ! important;
220 color: #da4453 ! important;
221 font-family: "Sans Serif" ! important;
222 font-size: 0px ! important;
223}
224
225tr.signErrB { background-color: #ffe0e0 ! important; }
226
227div.htmlWarn {
228 border: 2px solid #ff4040 ! important;
229 line-height: normal;
230}
231
232div.header {
233 font-family: "Sans Serif" ! important;
234 font-size: 0px ! important;
235}
236
237div.fancy.header > div {
238 background-color: #43ace8 ! important;
239 color: #ffffff ! important;
240 border: solid #221f1e 1px ! important;
241 line-height: normal;
242}
243
244div.fancy.header > div a[href] { color: #ffffff ! important; }
245
246div.fancy.header > div a[href]:hover { text-decoration: underline ! important; }
247
248div.fancy.header > div.spamheader {
249 background-color: #cdcdcd ! important;
250 border-top: 0px ! important;
251 padding: 3px ! important;
252 color: black ! important;
253 font-weight: bold ! important;
254 font-size: smaller ! important;
255}
256
257div.fancy.header > table.outer {
258 background-color: #d6d2d0 ! important;
259 color: #221f1e ! important;
260 border-bottom: solid #221f1e 1px ! important;
261 border-left: solid #221f1e 1px ! important;
262 border-right: solid #221f1e 1px ! important;
263}
264
265div.senderpic{
266 padding: 0px ! important;
267 font-size:0.8em ! important;
268 border:1px solid #b3aba7 ! important;
269 background-color:#d6d2d0 ! important;
270}
271
272div.senderstatus{
273 text-align:center ! important;
274}
275
276div.quotelevel1 {
277 color: #008000 ! important;
278 font-style: italic ! important;
279}
280
281div.quotelevel2 {
282 color: #007000 ! important;
283 font-style: italic ! important;
284}
285
286div.quotelevel3 {
287 color: #006000 ! important;
288 font-style: italic ! important;
289}
290
291div.deepquotelevel1 {
292 color: #008000 ! important;
293 font-style: italic ! important;
294}
295
296div.deepquotelevel2 {
297 color: #007000 ! important;
298 font-style: italic ! important;
299}
300
301div.deepquotelevel3 {
302 color: #006000 ! important;
303 font-style: italic ! important;
304}
305
306blockquote {
307 margin: 4pt 0 4pt 0;
308 padding: 0 0 0 1em;
309 border-left: 2px solid #008000;
310 unicode-bidi: -webkit-plaintext
311}
312
313blockquote blockquote {
314 margin: 4pt 0 4pt 0;
315 padding: 0 0 0 1em;
316 border-left: 2px solid #007000;
317 unicode-bidi: -webkit-plaintext
318}
319
320blockquote blockquote blockquote {
321 margin: 4pt 0 4pt 0;
322 padding: 0 0 0 1em;
323 border-left: 2px solid #006000;
324 unicode-bidi: -webkit-plaintext
325}
326
327blockquote blockquote blockquote blockquote {
328 margin: 4pt 0 4pt 0;
329 padding: 0 0 0 1em;
330 border-left: 2px solid #008000;
331 unicode-bidi: -webkit-plaintext
332}
333
334blockquote blockquote blockquote blockquote blockquote {
335 margin: 4pt 0 4pt 0;
336 padding: 0 0 0 1em;
337 border-left: 2px solid #007000;
338 unicode-bidi: -webkit-plaintext
339}
340
341blockquote blockquote blockquote blockquote blockquote blockquote {
342 margin: 4pt 0 4pt 0;
343 padding: 0 0 0 1em;
344 border-left: 2px solid #006000;
345 unicode-bidi: -webkit-plaintext
346}
347
348blockquote blockquote blockquote blockquote blockquote blockquote blockquote {
349 margin: 4pt 0 4pt 0;
350 padding: 0 0 0 1em;
351 border-left: 2px solid #008000;
352 unicode-bidi: -webkit-plaintext
353}
354
355blockquote blockquote blockquote blockquote blockquote blockquote blockquote blockquote {
356 margin: 4pt 0 4pt 0;
357 padding: 0 0 0 1em;
358 border-left: 2px solid #007000;
359 unicode-bidi: -webkit-plaintext
360}
361
362blockquote blockquote blockquote blockquote blockquote blockquote blockquote blockquote blockquote {
363 margin: 4pt 0 4pt 0;
364 padding: 0 0 0 1em;
365 border-left: 2px solid #006000;
366 unicode-bidi: -webkit-plaintext
367}
368
369.quotemarks{
370 color:transparent;
371 font-size:0px;
372}
373
374}
375@media print {
376
377body {
378 font-family: "Sans Serif" ! important;
379 font-size: 9pt ! important;
380 color: #000000 ! important;
381 background-color: #ffffff ! important
382}
383
384tr.textAtmH,
385tr.signInProgressH,
386tr.rfc822H,
387tr.encrH,
388tr.signOkKeyOkH,
389tr.signOkKeyBadH,
390tr.signWarnH,
391tr.signErrH,
392div.header {
393 font-family: "Sans Serif" ! important;
394 font-size: 9pt ! important;
395}
396
397div.fancy.header > div {
398 background-color: #d6d2d0 ! important;
399 color: #221f1e ! important;
400 padding: 4px ! important;
401 border: solid #221f1e 1px ! important;
402 line-height: normal;
403}
404
405div.fancy.header > div a[href] { color: #221f1e ! important; }
406
407div.fancy.header > table.outer{
408 background-color: #d6d2d0 ! important;
409 color: #221f1e ! important;
410 border-bottom: solid #221f1e 1px ! important;
411 border-left: solid #221f1e 1px ! important;
412 border-right: solid #221f1e 1px ! important;
413}
414
415div.spamheader {
416 display:none ! important;
417}
418
419div.htmlWarn {
420 border: 2px solid #ffffff ! important;
421 line-height: normal;
422}
423
424div.senderpic{
425 font-size:0.8em ! important;
426 border:1px solid black ! important;
427 background-color:#d6d2d0 ! important;
428}
429
430div.senderstatus{
431 text-align:center ! important;
432}
433
434div.noprint {
435 display:none ! important;
436}
437
438blockquote {
439 margin: 4pt 0 4pt 0;
440 padding: 0 0 0 1em;
441 border-left: 2px solid #008000;
442 unicode-bidi: -webkit-plaintext
443}
444
445blockquote blockquote {
446 margin: 4pt 0 4pt 0;
447 padding: 0 0 0 1em;
448 border-left: 2px solid #007000;
449 unicode-bidi: -webkit-plaintext
450}
451
452blockquote blockquote blockquote {
453 margin: 4pt 0 4pt 0;
454 padding: 0 0 0 1em;
455 border-left: 2px solid #006000;
456 unicode-bidi: -webkit-plaintext
457}
458
459blockquote blockquote blockquote blockquote {
460 margin: 4pt 0 4pt 0;
461 padding: 0 0 0 1em;
462 border-left: 2px solid #008000;
463 unicode-bidi: -webkit-plaintext
464}
465
466blockquote blockquote blockquote blockquote blockquote {
467 margin: 4pt 0 4pt 0;
468 padding: 0 0 0 1em;
469 border-left: 2px solid #007000;
470 unicode-bidi: -webkit-plaintext
471}
472
473blockquote blockquote blockquote blockquote blockquote blockquote {
474 margin: 4pt 0 4pt 0;
475 padding: 0 0 0 1em;
476 border-left: 2px solid #006000;
477 unicode-bidi: -webkit-plaintext
478}
479
480blockquote blockquote blockquote blockquote blockquote blockquote blockquote {
481 margin: 4pt 0 4pt 0;
482 padding: 0 0 0 1em;
483 border-left: 2px solid #008000;
484 unicode-bidi: -webkit-plaintext
485}
486
487blockquote blockquote blockquote blockquote blockquote blockquote blockquote blockquote {
488 margin: 4pt 0 4pt 0;
489 padding: 0 0 0 1em;
490 border-left: 2px solid #007000;
491 unicode-bidi: -webkit-plaintext
492}
493
494blockquote blockquote blockquote blockquote blockquote blockquote blockquote blockquote blockquote {
495 margin: 4pt 0 4pt 0;
496 padding: 0 0 0 1em;
497 border-left: 2px solid #006000;
498 unicode-bidi: -webkit-plaintext
499}
500
501.quotemarks{
502 color:transparent;
503 font-size:0px;
504}
505
506.quotemarksemptyline{
507 color:transparent;
508 font-size:0px;
509 line-height: 12pt;
510}
511
512}
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox
deleted file mode 100644
index ad050d8c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox
+++ /dev/null
@@ -1,7 +0,0 @@
1From: hans@example.com
2To: karl@example.com
3Subject: Simple Mail Without Content-Type Header
4Date: Sat, 15 May 2010 10:52:24 +0200
5MIME-Version: 1.0
6
7asdfasdf \ No newline at end of file
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox.html
deleted file mode 100644
index 9e3eb752..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox.html
+++ /dev/null
@@ -1,14 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <div class="noquote">
9 <div dir="ltr">asdfasdf</div>
10 </div>
11 </div>
12 </div>
13 </body>
14</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox.tree
deleted file mode 100644
index c003ec97..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/no-content-type.mbox.tree
+++ /dev/null
@@ -1,3 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::TextMessagePart
3 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox
deleted file mode 100644
index 168c8dc4..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox
+++ /dev/null
@@ -1,33 +0,0 @@
1Content-Type: text/plain; charset="us-ascii"
2Content-Transfer-Encoding: 7bit
3
4-----BEGIN PGP MESSAGE-----
5Version: GnuPG v2
6
7owGdk31MlVUcx5G3jClvI1JH7GiOil0uYJATBW8FK6HkDtBJI93heQ6Xk8/L9Tnn
8XExALDfJQaJutl4UzUoCIxDwos0XTLktqJaJkJE5QAU3yMKpkRqdc+GC/dsfz/bs
9ec7v+/v+Pr/v2TnbxytgxvUt8T99cCirZEa9zw/5fopuIHX1xsjjr4gXgO2EqUDW
10+WdAMAVQRdQEJF0jSKKIMgNAGdsxkbBmA0jB1AxSdQ1JAAIZQxUo/BgjZpCN5Kn6
11SVEVMgPzX69CJCENEqFqYwgo2MYUCKAENjCu4MAOZBgQCNH/9NUoAoVIkw1kTLfl
126qquKJhMeDYDqwERQRoVf9yOkI2/KTgfGbp4J5R3ViGlvGTKoANTiABk3I4ZrORF
13FGsSlhmXmTSJNKyaAKPArhsUAjc1oECOAcOHbXp8samehJOAhsSAAxViSUzKFGpg
14CSPCoWm6BiiXFNb/9waeRxqCmuhpM6ADy5P+zGAVBbyAHwYF/CQxATtTHFiDXIP7
15Uu3IEPZMDytieYokUhQOEpENTLCRuEegYYLFERXatMm5+dIoINCGBVIzeJEZMB8L
16mzK043xG3OimUQvHwF4IDUT5kqc5FyBmw1yJd1AAFtZkjKh7BN7GAd07nkSK+ayG
175gEpOEoSUwnUPPQFc13GfOGGTjwfPcFSMQ8aF3OnbRoIDxJUEGGQ43PvyyjUNYm5
18R+L+dQnzGg1SXeCw8wDTiemoG4YIIH/s0OCjY5E/VRfsTLyESO61GVgW++c1qlBd
19oQGDUYNre9xPB0NcEnFZJoPppi4o83gU8MxxFCK9Ewvk94bz4Lk2B2z3jvD1mhHg
205e/nLW60V8CjwZ7LTpKCxjNIzhNRXcER/6RVXUzaGdocqGY3vd+5LO7+qSV3pdFP
21+s6tv3Jp8EZg+V9qza9zKhf4b3xn4MfVSYOW+qaihPsHrc3O5hpzXCV77sROqxWw
22vbfaOrpClvTszr8+8pVc/ELc0aeOm+856kqfDYNZmUXt33+Y1nLT4nvH0tomz47f
23tfzP+dlpQW8vRj3v+qcXyXpef3Hvldy2gfECZ3LMGdMomlsR8fQm42zMcLh3eW1N
24Xszwqt5dLXimuVk6vb+/etNN8xgeuhoWeb79myzXg9jUv11xbQ8OR9/wnXP7QGzj
25kWN+v+RpX58qa2dbTr2VeMn/aPJrOZ3ZYS0dW7s6dhcu/3lzT1DdhS8zGgIrynIH
26tjkf21tmXtZ8pOjj/a7xsahsEGKxLG4h+St9Oj9ace1kn1+vdWl06+nEvhPlOWnh
275OVrw1nzTv6+pjo3K9Vr3YFZeZmu6K1jA2OW7M96Bs85ChL23ck95Cx5/bfuHeX3
28wktCXYN1/fvWpxxIfyk2/pm0N4bCRyrfS8z13VPNMr6rckbuP1YS2rp0z27X/FEy
29FPHm4OHHv7iXsuaPg5dpg6XWN9B/SG/81Bq8tv5WwMjFRVUZId6Rn+sL68uudls3
30z+vMvLwwrdw5t+Pb5ISuppDUVkvmme4nTahhwYX7setmpdxt29ZeO5MFPFK6Pep2
31+nlHdfFa78ZFpSMV/Q1n/wU=
32=zzr4
33-----END PGP MESSAGE-----
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox.html
deleted file mode 100644
index 585bb4f0..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox.html
+++ /dev/null
@@ -1,35 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signWarn">
9 <tr class="signWarnH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Not enough information to check signature validity.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signWarnB">
22 <td>
23 <div class="noquote">
24 <div dir="ltr">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.</div>
25 </div>
26 </td>
27 </tr>
28 <tr class="signWarnH">
29 <td dir="ltr">End of signed message</td>
30 </tr>
31 </table>
32 </div>
33 </div>
34 </body>
35</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox.tree
deleted file mode 100644
index ea8223fd..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encoded.mbox.tree
+++ /dev/null
@@ -1,4 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::TextMessagePart
3 * MimeTreeParser::EncryptedMessagePart
4 * MimeTreeParser::SignedMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox
deleted file mode 100644
index fbe5ce7f..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox
+++ /dev/null
@@ -1,46 +0,0 @@
1From test@kolab.org Wed, 08 Sep 2010 17:02:52 +0200
2From: OpenPGP Test <test@kolab.org>
3To: test@kolab.org
4Subject: OpenPGP encrypted
5Date: Wed, 08 Sep 2010 17:02:52 +0200
6User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; )
7MIME-Version: 1.0
8Content-Type: multipart/encrypted; boundary="nextPart1357031.ppLHckZtsp"; protocol="application/pgp-encrypted"
9Content-Transfer-Encoding: 7Bit
10
11
12--nextPart1357031.ppLHckZtsp
13Content-Type: application/pgp-encrypted
14Content-Disposition: attachment
15
16Version: 1
17--nextPart1357031.ppLHckZtsp
18Content-Type: application/octet-stream
19Content-Disposition: inline; filename="msg.asc"
20
21-----BEGIN PGP MESSAGE-----
22Version: GnuPG v2
23
24hQEMAwzOQ1qnzNo7AQgAkQI925mOOybpzcGcjUE7jmfMVoUvJW6Br9Zx9UEtko5H
25fdmnrrUhFDyhBdwcg2E6AChipNcJjZhdX17lNAO0kI2IoPJAEkX9lyhjoiVEH/M8
26xmJEKFRejYzefx0S8esKyqqtfAmMKfsA5HmKRY8iDmQnI5d/FKhkcqLTJYo7fQyL
27rEEycdr5PU5OJbMtE5+8+kbmG8PywjiCCad68FXakXIEFyWX1A99W/0ScWtqrqDB
28kuQSdxJs4aAZWopxGKxDobt/qVyG6W6+PUnLx3eg80KytcWNxLJRV7WEJMj4OYCU
29JdHrh4J1DTTRbuRmqx9de3fBDFHNNZpJP43UJYJWtoSMAxiZbYU0+6KtAQQAnRxD
30XNwzBSmPk9NG3HYf/RleTAS8/fMp3D973Y3VF5JV72ljWqZO/1o/3RIpD0pl5nSE
31nI0wPyncmPvAgQl5EAKTdYonKLuMCTbQ4eT7vkOdfA/HUxgaoE8ppH/OYXDDiqz/
322GlNCCHcaQcVWwkHbWWgyhd/VvB7Mt9PVqPgTsHSwQ4BZf/JDwWe3MDAg21Raryf
33dN4ZmWUzd3osDIRyy8H2hZL9vgZ3r0auIP6DMyYrPf3yTj9ApZeBiIpgBvqMwvR/
348si6r1JaXr48KRCxAkn9fIXe2jMwQE2bk5tYDrTXY868V3DA5iKq1dgXUSn0tzG3
350x9pjaOFkwxm0wtlpwnhZREJ9/ieIY7hy6p7CDpq4ZGRh8jQta4tWrjxN0wly+Dh
36a9TjzHzgTh9BTh7vjcDLitOQFL5NcCQtK717FQ5Z1DRnkHDVLPoyPnW+5sllOVr9
37UcqNXwrPbrtElFjHULL5Y1pem1+AE6nCAtlvCAc7cil6QDsU508sOXW7BhTWATIU
38tGHg/nIC0qVs24LR3MyYrwvfXL2JOkN/IK/g+0bbs6DMYVYaEOjcjqtidxWuLsE5
39aFEwlUFzcTcSauW+AOKwH+YFihRnlh9+4taaZxGZeutb12D5u8eEk+3nyVcsdogY
40k/nT6ElN8i/Z2vgcxL6ABvB+g/bZmp/eCJphDNYc00lP8NMC4EEJvTZL438ThJ3j
41wz0Qo4PlV0/OMXYxP2iZup2/rCe+pkmc9Gyz3Mkal4/9bBtIgP9cWBR7JZLMrK50
42KO4+NtrZYEY4JXRJlAo=
43=1lYB
44-----END PGP MESSAGE-----
45
46--nextPart1357031.ppLHckZtsp--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox.html
deleted file mode 100644
index 54c58b85..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox.html
+++ /dev/null
@@ -1,52 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
15 <tr class="signOkKeyOkH">
16 <td dir="ltr">
17 <table cellspacing="0" cellpadding="0" width="100%">
18 <tr>
19 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
20 <td align="right">
21 <a href="kmail:showSignatureDetails">Show Details</a>
22 </td>
23 </tr>
24 </table>
25 </td>
26 </tr>
27 <tr class="signOkKeyOkB">
28 <td>
29 <div style="position: relative; word-wrap: break-word">
30 <a name="att"/>
31 <div id="attachmentDiv">
32 <div class="noquote">
33 <div dir="ltr">encrypted message text</div>
34 </div>
35 </div>
36 </div>
37 </td>
38 </tr>
39 <tr class="signOkKeyOkH">
40 <td dir="ltr">End of signed message</td>
41 </tr>
42 </table>
43 </td>
44 </tr>
45 <tr class="encrH">
46 <td dir="ltr">End of encrypted message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </body>
52</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox.tree
deleted file mode 100644
index 7d5bbeb7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted+signed.mbox.tree
+++ /dev/null
@@ -1,5 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::SignedMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox
deleted file mode 100644
index f5d083ff..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox
+++ /dev/null
@@ -1,52 +0,0 @@
1Received: from konqi
2From: "Konqui" <konqi@example.org>
3To: "Bird" <bird@example.org>
4Subject: gpg problem 1/2
5Date: Tue, 22 Mar 2016 17:09:18 +0100
6Message-ID: <123456@example.org>
7Accept-Language: de-DE, en-US
8Content-Language: en-US
9Content-Type: multipart/mixed;
10 boundary="_003_55514CDCA78D430384C5F0810DF10C7Adsmpgde_"
11MIME-Version: 1.0
12
13
14--_003_55514CDCA78D430384C5F0810DF10C7Adsmpgde_
15Content-Type: text/plain; charset="us-ascii"
16
17
18--_003_55514CDCA78D430384C5F0810DF10C7Adsmpgde_
19Content-Type: application/pgp-encrypted;
20 name="PGPMIME Versions Identification"
21Content-Description: PGP/MIME Versions Identification
22Content-Disposition: attachment; filename="PGPMIME Versions Identification";
23 size=77; creation-date="Tue, 22 Mar 2016 16:09:18 GMT";
24 modification-date="Tue, 22 Mar 2016 16:09:18 GMT"
25Content-ID: <D82BB3DF89947646AD6C4C24C8C54BAC@example.org>
26Content-Transfer-Encoding: base64
27
28VmVyc2lvbjogMQ0NCg==
29
30--_003_55514CDCA78D430384C5F0810DF10C7Adsmpgde_
31Content-Type: application/octet-stream; name="encrypted.asc"
32Content-Description: OpenPGP encrypted message.asc
33Content-Disposition: attachment; filename="encrypted.asc"; size=872;
34 creation-date="Tue, 22 Mar 2016 16:09:18 GMT";
35 modification-date="Tue, 22 Mar 2016 16:09:18 GMT"
36Content-ID: <58A712E65AB1824AB726904A6449178F@example.org>
37Content-Transfer-Encoding: base64
38
39LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tClZlcnNpb246IEdudVBHIHYxCkNvbW1lbnQ6IFVz
40aW5nIEdudVBHIHdpdGggSWNlZG92ZSAtIGh0dHA6Ly93d3cuZW5pZ21haWwubmV0LwoKaEl3REdK
41bHRoVFQ3b3EwQkEvOU50TExYYmlJSlZTNnBPeW53RWVTem5yUUs3a1lWbGE4Uk00My8vSkVDQ2tH
42SgphekVhU0J6bmFiQnY2ZXBhRm1RdFZITE1YbENiWm5NbVc5bG95cVBCZk1vQW1zNmtLS0JkRy9q
43cWh1czg5aVhFCitzZVhuZ0MyMzNWYS9nWk1iMkR4T3FJb2tWTmZqOXRwUjd4UTh3Uy9qSFREaUxO
44YzFHT1FDN2t1NDJ6MmJOTEEKSVFGUkQvcWJCRno4OWhVNHdQNGNZb0F5c09uRURvakZyc3JuQ2lk
45VEhKT0pybmRNNlBQVXRIL2pRQ3lmci9FRwoydFNwSndZS3ZtVDZseTN5cWFHTEJ0UlBJeGl2K2RN
46ZSs3eXcwdDQwcWJqdnZhVEdhdkVyRUJKRUtYNWVXYlROCi9zamFqSHBVSHFzNlNJaU1oZUg5ZHIr
47V2Z6Rk9OdFZiUEVnR1JtT0VSaGxnVGwvbkxvODZBWnBqSnJvSUdLSkoKdFRIQ2NvUUdBV0crTjd3
48ckNFMVJ4UjBra01zNG5Sb3pqMFRMdTZaeVhNcytIMDYzTWV3VFBOeE5BaVFUMU5iaQp1ZEtXbWZM
49Qmx4bjA2cCtKRHpVS3hqOFBGd09iZGJ4VHZBQ3piQXZCWTFhSE1RPT0KPW1MbDMKLS0tLS1FTkQg
50UEdQIE1FU1NBR0UtLS0tLQoK
51
52--_003_55514CDCA78D430384C5F0810DF10C7Adsmpgde_--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox.html
deleted file mode 100644
index ca8d7fbb..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox.html
+++ /dev/null
@@ -1,39 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1"/>
10 <a name="att2"/>
11 <div id="attachmentDiv2">
12 <table cellspacing="1" cellpadding="1" class="encr">
13 <tr class="encrH">
14 <td dir="ltr">Encrypted message</td>
15 </tr>
16 <tr class="encrB">
17 <td>
18 <div style="position: relative; word-wrap: break-word">
19 <a name="att"/>
20 <div id="attachmentDiv">
21 <a name="att1"/>
22 <div id="attachmentDiv1">
23 <div class="noquote">
24 <div dir="ltr">test</div>
25 </div>
26 </div>
27 </div>
28 </div>
29 </td>
30 </tr>
31 <tr class="encrH">
32 <td dir="ltr">End of encrypted message</td>
33 </tr>
34 </table>
35 </div>
36 </div>
37 </div>
38 </body>
39</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox.tree
deleted file mode 100644
index 8ef3df2d..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-applemail.mbox.tree
+++ /dev/null
@@ -1,7 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::TextMessagePart
4 * MimeTreeParser::EncryptedMessagePart
5 * MimeTreeParser::MimeMessagePart
6 * MimeTreeParser::TextMessagePart
7 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox
deleted file mode 100644
index 2d9726ea..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox
+++ /dev/null
@@ -1,115 +0,0 @@
1From test@kolab.org Fri May 01 15:12:47 2015
2From: testkey <test@kolab.org>
3To: you@you.com
4Subject: enc & non enc attachment
5Date: Fri, 01 May 2015 17:12:47 +0200
6Message-ID: <13897561.XENKdJMSlR@tabin.local>
7X-KMail-Identity: 1197256126
8User-Agent: KMail/4.13.0.1 (Linux/3.19.1-towo.1-siduction-amd64; KDE/4.14.2; x86_64; git-cd33034; 2015-04-11)
9MIME-Version: 1.0
10Content-Type: multipart/mixed; boundary="nextPart1939768.sIoLGH0PD8"
11Content-Transfer-Encoding: 7Bit
12
13This is a multi-part message in MIME format.
14
15--nextPart1939768.sIoLGH0PD8
16Content-Type: multipart/encrypted; boundary="nextPart2814166.CHKktCGlQ3"; protocol="application/pgp-encrypted"
17
18
19--nextPart2814166.CHKktCGlQ3
20Content-Type: application/pgp-encrypted
21Content-Disposition: attachment
22Content-Transfer-Encoding: 7Bit
23
24Version: 1
25--nextPart2814166.CHKktCGlQ3
26Content-Type: application/octet-stream
27Content-Disposition: inline; filename="msg.asc"
28Content-Transfer-Encoding: 7Bit
29
30-----BEGIN PGP MESSAGE-----
31Version: GnuPG v2
32
33hIwDGJlthTT7oq0BA/9cXFQ6mN9Vxnc2B9M10odS3/6z1tsIY9oJdsiOjpfxqapX
34P7nOzR/jNWdFQanXoG1SjAcY2FeZEN0c3SkxEM6R5QVF1vMh/Xsni1clI+peZyVT
35Z4OSU74YCfYLg+cgDnPCF3kyNPVe6Z1pnfWOCZNCG3rpApw6UVLN63ScWC6eQIUB
36DAMMzkNap8zaOwEIANKHn1svvj+hBOIZYf8R+q2Bw7cd4xEChiJ7uQLnD98j0Fh1
3785v7/8JbZx6rEDDenPp1mCciDodb0aCmi0XLuzJz2ANGTVflfq+ZA+v1pwLksWCs
380YcHLEjOJzjr3KKmvu6wqnun5J2yV69K3OW3qTTGhNvcYZulqQ617pPa48+sFCgh
39nM8TMAD0ElVEwmMtrS3AWoJz52Af+R3YzpAnX8NzV317/JG+b6e2ksl3tR7TWp1q
402FOqC1sXAxuv+DIz4GgRfaK1+xYr2ckkg+H/3HJqa5LmJ7rGCyv+Epfp9u+OvdBG
41PBvuCtO3tm0crmnttMw57Gy35BKutRf/8MpBj/nS6QFX0t7XOLeL4Me7/a2H20wz
42HZsuRGDXMCh0lL0FYCBAwdbbYvvy0gz/5iaNvoADtaIu+VtbFNrTUN0SwuL+AIFS
43+WIiaSbFt4Ng3t9YmqL6pqB7fjxI10S+PK0s7ABqe4pgbzUWWt1yzBcxfk8l/47Q
44JrlvcE7HuDOhNOHfZIgUP2Dbeu+pVvHIJbmLsNWpl4s+nHhoxc9HrVhYG/MTZtQ3
45kkUWviegO6mwEZjQvgBxjWib7090sCxkO847b8A93mfQNHnuy2ZEEJ+9xyk7nIWs
464RsiNR8pYc/SMvdocyAvQMH/qSvmn/IFJ+jHhtT8UJlXJ0bHvXTHjHMqBp6fP69z
47Jh1ERadWQdMaTkzQ+asl+kl/x3p6RZP8MEVbZIl/3pcV+xiFCYcFu2TETKMtbW+b
48NYOlrltFxFDvyu3WeNNp0g9k0nFpD/T1OXHRBRcbUDWE4QF6NWTm6NO9wy2UYHCi
497QTSecBWgMaw7cUdwvnW6chIVoov1pm69BI9D0PoV76zCI7KzpiDsTFxdilKwbQf
50K/PDnv9Adx3ERh0/F8llBHrj2UGsRs4aHSEBDBJIHDCp8+lqtsRcINQBKEU3qIjt
51wf5vizdaVIgQnsD2z8QmBQ7QCCipI0ur6GKl+YWDDOSDLDUs9dK4A6xo/4Q0bsnI
52rH63ti5HslGq6uArfFkewH2MWff/8Li3uGEqzpK5NhP5UpbArelK+QaQQP5SdsmW
53XFwUqDS4QTCKNJXw/5SQMl8UE10l2Xaav3TkiOYTcBcvPNDovYgnMyRff/tTeFa8
5483STkvpGtkULkCntp22fydv5rg6DZ7eJrYfC2oZXdM87hHhUALUO6Y/VtVmNdNYw
55F3Uim4PDuLIKt+mFqRtFqnWm+5X/AslC31qLkjH+Fbb83TY+mC9gbIn7CZGJRCjn
56zzzMX2h15V/VHzNUgx9V/h28T0/z25FxoozZiJxpmhOtqoxMHp+y6nXXfMoIAD1D
57963Pc7u1HS0ny54A7bqc6KKd4W9IF7HkXn3SoBwCyn0IOPoKQTDD8mW3lbBI6+h9
58vP+MAQpfD8s+3VZ9r7OKYCVmUv47ViTRlf428Co6WT7rTHjGM09tqz826fTOXA==
59=6Eu9
60-----END PGP MESSAGE-----
61
62--nextPart2814166.CHKktCGlQ3--
63
64--nextPart1939768.sIoLGH0PD8
65Content-Disposition: attachment; filename="image.png"
66Content-Transfer-Encoding: base64
67Content-Type: image/png; name="image.png"
68
69iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAb
70rwAAG68BXhqRHAAAAAd0SU1FB9gHFg8aNG8uqeIAAAAGYktHRAD/AP8A/6C9p5MAAAkqSURBVHja
715VV7cFTVGf/OPefeu3fv3t1NdhMSCHkKASEpyEsaGwalWEWntLV1Wu0fdOxAx9Iq0xntAwac6ehY
72p+rwKLbjjLRFh9JadURKRGgFQTTECCYQE9nNgzzYZDe7m33d1+l3tpOOU61T2tF/+s1s7pzn9/t+
73v993Av/3QT6FO6WdO/d+M55Il8rMOdrT0x3Zt++3+c8EgM/nozseeviJiYmpe1zOQdM8BOOCIku/
74lIj1VrQ/0r9n9+78xwLgeAA3w4fHXV1d5Omnn6aapumlJSVVqalUJJvJZRdcu0RSfZQsaW7mjfPm
75cbF9+/btEIlEaq6Z03whXyhIjDFuGIZEKSP5fMFRVcVNT2Vf0jzsmMxYGtel9rff/vM/M8bjcZpM
76Jp1XX32VNDc3e7ovRP3JyZGVNdXVd1FGGwKBQEM8njiWTKV36IHgEACwibGx62LjU/cBd01Zljoc
77p9DHmLbHsmyK1UuKooJt24IMcLE+y3L45eEYLS8LgWH4YXR0bAPZtGmTVFvfoBZMEzKpFKmqqmqp
78qane4DhOteH3L1FkWZVlGSzLAtd1Oe4773C4LxoZvDWXh82OY2MtwAuFvCvSyDIFXdelYDDIvF4d
79xPzA0AgXFStMcWPxBPGoKvXpPh6JDG5hK1Zcv1H36Xc6tsMs21EMQ69CLSts2wGkDygTyW2CP8gX
80TKLIyvx0OrdDUXyLKXVUkdSne4QKtFAwuWmabjAYkDyqAgG/jziORh1EKaonkkQt2yRZRC5JHEGn
81L7OKyopNqqo2IbWQjqWgLOwFBFKsuGDa4PVyIssMk1sCACCjimXbrbquYKW41zJJOpXkeARyeZNQ
82SUKwHEqCKnBuAybkZeFSmssVSDKdhlBpCRgIcnQsdvKPB19sY4rMNIaH0BhQUVHKvXgpIiQF0wK/
834QORnOEayoDzOSBMXK4BSgpeTcMECqiqTDKZHDKmct3LCI55Kp0mQgK/3yDYkgIc3kNhfHzCkRk9
84p6nk+yPD3SmWzeZiKNkciUrg2g5BjQWdSBchiEvQjzoWAFkUYPDrCjBFUEJ8AhSIRyl2jcfjEL9h
85AFJODL8B6H7IZrNIt2g3B1mysShdQhmbT58+ExRdx3L5/PNomGU4kJkuA9ILYn+JP4CXOoDUoWO9
86IBhCSBCLTYCK+rqOg8CKvY6JPQhGxjkX1zyAdwrgAhTKWBDmxTUTC7Tcy5dHBiilL7cdaTsNGAwP
877o32D4Q9HnWTrvsCiqIgdWgqDkJfkKgDU1MZcBGMhbKgj2B0LIle8eNhgiBsoMwFEY7rQDqVwlo5
88esUE/AAR81gUYIUT8UR2//4/rK+pLjs3MhIFEVJN9WwXK2oM+P1BREpQO0hjwkw+BzJWY1oOXB5L
89w9DIOGTQvYS4UFqigR9ZwUqEXFghVop059AjonqcAIZrqCKg31AS3OU66Adf4sabWqKvvHIYpoNh
90y+Vj4xMHVEW93eUuo0izhT4oRbcSIoALbRle4AVVkfBup6g9thwCzRX1VRQmdMeqLVETEIkW2ZNx
91H8oqzqAfXCGJEQ6XBQEgNQ2A7tq1C1a1tvaattOOrVFOqVSLCQhqU6QPx+DTsOU0GavLYUV20Qv4
92rEIymYNQuB48Wkg8QTA0NIQeYKB6NGTgH90jIcJEMikAi1dRRo9NLV583ek33jjpFAGIPw8++IAj
93e9SIRGm5wliraVosnTWLmmemUugBkTiPSS3AtgV8VQA9A8LxdfULYXBoEKv2wMhIn2BHGFR0DZ6d
94glQ6hUDT6A/RWVSSmfx5DjxRV1vzVkdHBzDAWLNmDezc+aQVqqz5dSY52Z63nLn9A33lI9myLXNL
95xv0Fq3gWutMN0BToxcso+AN+cKmOXI5A9P12mKDzYNXcZXDq1F+h+IboFgzb1VAhDULeJpxwC19G
96g/uMgOXVfXW1tbWCYM6mtdi8+YfiM4m/Y1UrHzkergyXz/3czImCnRjuHiW3qxpPqGFPy6SpHJC9
97IR+Sm+2N8i/dcMOMZdGeshcrS/S58+c3zU2Z8oVD50cbVfP8M4pGkymoUxLxsUzOVhtmQ+5432Rg
98oj6QOLFj28/caQk+EjMXraUV1eW+8dH06StQZnlnNbQefGTD92pWfu3I6TOT8oY7brv4hWUt3xiw
992OrlDVVdRslsd2Fd469Q8sUB3c8uOW49SdHX1rbcePhoz3B7feuqlt5oZtBTv+ioSdXc7q3fHQaM
100fwtg6Vd/dEvn8Qssnzg/0Ns56jRcO6Nw4d1Af+/RH0/cdv+O/fRK7KnmBXPWGsQeDPhK9oWC6hdd
101R3pdUcg88Tx7U7Ej1y1qMjreGwjt/cnaF2YtvCXQe7bzxLkj+/sunT0Ry00OwHRI8DERLqeNmqGV
102JZJVC6Yu7UxMOfLFlV9pWQcYp57/013rb1u9ua29b0Ch4bsl4tKLY5P1sgxNJzsHDj136KzS3NTk
1039mTNusPvXJLrbnjUe/b16FDfsZ/3xC8d4/HoCQ4Anwzg91vWPL7+3pvvDM806sTY4IVyMxfrojO3
104BVubbyJMhnVVM3y+l187/nChIJ2ZpSs9hMD4qC6t6x6+0gkAoRC33/Sb8RdmXj9nzvWraivhP47g
105AyHxKb1mfWkRYHCjMb30nafeeWzerU9963w3L3/02c4f7D0y0NXTx3f3D/JTb7bzxpeODu55+PGT
106yy5F+ZmeD/iSrh5efeJd/hGZP5GBux+6cysY3w7H+16IVy65V6trnn3P9JqVjQ3JuSsdHhWW6hIL
107NuhyUpJgEF/ofSVBeLBuVtVjd3y55SHXhQ8UBht0DR4r98Fs+IRg/zrxlz2/2A7p5yYBY93Gu+4f
108H5xojLwOxfjd/WufOHhQ/IcD7eYVC5YyCjFMfkVV4NpMFvpTachoZeDaNryLnliOczsUCv1XBWD8
109YjF5MWJ9kcT757qenR7vf4bDoqWwHCvUUfPNsQQMWSZAZTlsw7nxYQQTcuDrjgQuPn7z/D7YivNt
110nPPfEDzwqcU75/j6SD/f8uG5vXs5dL7Hjb+d4gp8mnF8nAOabjcac+OBAxyuNiT4HyNwGZYgu0RW
111IDt/Icz4zAC0tXE4183rQ6XwU9uBXgLQ5Teg7GIv1+EqgsF/GY4DtCQALZMp2ITttmqoHzpWr756
112o/0d59+Lh3Y1HHcAAAAASUVORK5CYII=
113
114--nextPart1939768.sIoLGH0PD8--
115
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
deleted file mode 100644
index 092a3440..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,77 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">test text</div>
40 </div>
41 </div>
42 <a name="att1.2"/>
43 <div id="attachmentDiv1.2">
44 <hr/>
45 <div>
46 <a href="attachment:1:e0:1.2?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>file.txt</a>
47 </div>
48 <div/>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="signOkKeyOkH">
54 <td dir="ltr">End of signed message</td>
55 </tr>
56 </table>
57 </div>
58 </div>
59 </td>
60 </tr>
61 <tr class="encrH">
62 <td dir="ltr">End of encrypted message</td>
63 </tr>
64 </table>
65 </div>
66 <a name="att2"/>
67 <div id="attachmentDiv2">
68 <hr/>
69 <div>
70 <a href="attachment:2?place=body"><img align="center" height="48" width="48" src="file:image-png.svg" border="0" style="max-width: 100%" alt=""/>image.png</a>
71 </div>
72 <div/>
73 </div>
74 </div>
75 </div>
76 </body>
77</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.tree
deleted file mode 100644
index 473f0b10..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.tree
+++ /dev/null
@@ -1,11 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::EncryptedMessagePart
4 * MimeTreeParser::SignedMessagePart
5 * MimeTreeParser::MimeMessagePart
6 * MimeTreeParser::TextMessagePart
7 * MimeTreeParser::MessagePart
8 * MimeTreeParser::AttachmentMessagePart
9 * MimeTreeParser::MessagePart
10 * MimeTreeParser::AttachmentMessagePart
11 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox
deleted file mode 100644
index 4204fb0b..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox
+++ /dev/null
@@ -1,57 +0,0 @@
1From test@kolab.org Fri May 01 15:13:18 2015
2From: testkey <test@kolab.org>
3To: you@you.com
4Subject: enc attachment
5Date: Fri, 01 May 2015 17:13:18 +0200
6Message-ID: <2401407.XhOc2XYoOt@tabin.local>
7X-KMail-Identity: 1197256126
8User-Agent: KMail/4.13.0.1 (Linux/3.19.1-towo.1-siduction-amd64; KDE/4.14.2; x86_64; git-cd33034; 2015-04-11)
9MIME-Version: 1.0
10Content-Type: multipart/encrypted; boundary="nextPart4793536.cjk9hKXLQ5"; protocol="application/pgp-encrypted"
11
12
13--nextPart4793536.cjk9hKXLQ5
14Content-Type: application/pgp-encrypted
15Content-Disposition: attachment
16Content-Transfer-Encoding: 7Bit
17
18Version: 1
19--nextPart4793536.cjk9hKXLQ5
20Content-Type: application/octet-stream
21Content-Disposition: inline; filename="msg.asc"
22Content-Transfer-Encoding: 7Bit
23
24-----BEGIN PGP MESSAGE-----
25Version: GnuPG v2
26
27hIwDGJlthTT7oq0BBACLMnR5Mln6JGCccvqZCgM3qUkFWZ7a33b7Nl2g5lSOLX6q
28dlGOr/0jAuqdkRwCDTom3hsrH2vf1kARTSST+5cewngS2CgBTAwwc8JymEagTkKf
29VK/tTnM6G7puMVkwuafpuRggyJAUYvjktgUKOUaXtuxX71g0NagAFQGqlvGuq4UB
30DAMMzkNap8zaOwEH+wWSs5xdV1x37T11EnUvkhoOMu+uId2U7NEx2JdQ/FGJZdti
31mtqfM9GKTtQlGVcn3ISH7Wmrw3x0bsOLuW7oxkU4xIS3tVvibxaaWdmponN5TUai
32Dr4LCTEmG7+jLNopF6V4zPmpQ9YxMwQOm8ITml+auNOg9EtHxavwr3Xd1hOYA92N
331bkOiHzmb9hQtUy1GfRRk91tRqtRPoaamczLxWV9yROFDRNuSSbZ8oBU/K4YgSTL
34D+/FhCt6MxV0DQzp+UCSL7ZsMx+ldPnZK44Udd17+U3xQDDUffo6cSg6FAF425Rh
35v3ZQP0j7LtSIwDh2Rxc+Is4DuSmfZksL5nLPH5nS6QGJnsVEqVcZgQPktl1Zaeil
36x/6WaWruuJm92G2fd9x2/giTLZnk918BVi/n00xR/n4bnSQmmFhXVqAVjGlG6Tr9
37dxej8dSiFdxO8ZjFe5tguQw76xlCu/9MxmSXTP7Mfvm4jqdcjUOINwHOzR/h2T62
38ZlrmqoxMHm4RN0PQ334tSzQXD4gcoUHL+xq62ATt7/jx0p0pIXPmPVUFopCk8k1E
39m2ErPLnyfGLd4LNZRL03oP0jCjX6Q/LFWLTjCIdU6+aM6nT26CZy98yZV0SRGyhu
40qYxN0aVW+RatmDRWWtouOJllQouQ7ZaqmjHLgyOj32/oT8cYUWWdFswSsnMhJjxb
41r6iajUeAZgiN+zqwgf6j1Z8/mMvb+yirP+Rn9ME1fq3XSYHlnIOxKNBa+St8DdaP
42/ZvrkwNTpVp1GmaZLBXdqdeLmflJ4U/X7wphZGR3sgjOwj0oYotX1Zb8OrtlP5WC
43VXhhrt40e7Ilt2B0x7Xe9DWKByDCqrQUhwxwTS3miiKH9G1VEcHko70O98RjKJQ3
44I4VW6e/Gqv2zAMiiOu1MBTeGfPQItca4bUrVzhKjm27twtZD4wLSQDTQECxrCWHC
45BFAdzvsIry0FIXoO6Vh16Hojq+YZ8tpmknGfpg0pnuRvAdDWU+0uuECXDE0UZFWC
462g3Bs2Dn2BYYyrI6X92swHz8qP3JvdxN0dpsYMkMdHN4yWXJogNSfXzy2udf0A4P
47NNZMOonhlwH+DBRfcWS0A/j0/fdDCDzR5Ca5dbX7lL4EscbBeoCP1JJyVoOp6DUc
48ICuHJGGrnpNdG9DMa97tqpyGRHTAwI3lJXPKTDEHN9v9XobIyndFgi/tcPLZ7QWz
499mN94NKLmeYWjrMiRbNQk8BYXR9K17SHb4BkIMdBxRsJjgMEC8qniUH64Nnf8/x4
50yaRCuUo0bkHDE3AqCzZE1R0he66dDkfOIz+mLwcpG8jZWjFm7sXAflBe3jvIc0lm
51NyWQ1WnMkP83fWm/+YqrLLf+tTQtievRPeS1Dd/7v9yqUWEmQ0pUOj3MNf9Ej2KI
52vu5ap7fHIevcBn42BPwQgSnp4YmXEY0ir5Ccwogusnt7QliNSRmkN6Jap4AF
53=AVJ4
54-----END PGP MESSAGE-----
55
56--nextPart4793536.cjk9hKXLQ5--
57
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox.html
deleted file mode 100644
index 2b266b02..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,66 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <a name="att1.1"/>
35 <div id="attachmentDiv1.1">
36 <div class="noquote">
37 <div dir="ltr">test text</div>
38 </div>
39 </div>
40 <a name="att1.2"/>
41 <div id="attachmentDiv1.2">
42 <hr/>
43 <div>
44 <a href="attachment:e0:1.2?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>file.txt</a>
45 </div>
46 <div/>
47 </div>
48 </div>
49 </td>
50 </tr>
51 <tr class="signOkKeyOkH">
52 <td dir="ltr">End of signed message</td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </td>
58 </tr>
59 <tr class="encrH">
60 <td dir="ltr">End of encrypted message</td>
61 </tr>
62 </table>
63 </div>
64 </div>
65 </body>
66</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox.tree
deleted file mode 100644
index f433fd45..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-attachment.mbox.tree
+++ /dev/null
@@ -1,8 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::SignedMessagePart
4 * MimeTreeParser::MimeMessagePart
5 * MimeTreeParser::TextMessagePart
6 * MimeTreeParser::MessagePart
7 * MimeTreeParser::AttachmentMessagePart
8 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox
deleted file mode 100644
index 9afd17e3..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox
+++ /dev/null
@@ -1,48 +0,0 @@
1From you@you.com Sat, 29 Mar 2014 15:04:21 +0100
2FCC: imap://hefee%40netzguerilla.net@mail.netzguerilla.net/Sent
3X-Identity-Key: id1
4X-Account-Key: account4
5Message-ID: <5336D2E5.6010602@you.com>
6Date: Sat, 29 Mar 2014 15:04:21 +0100
7From: you <you@you.com>
8X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0
9User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0
10MIME-Version: 1.0
11To: test@kolab.com
12Subject: test
13X-Enigmail-Version: 1.6
14X-Enigmail-Draft-Status: 515
15X-Enigmail-Draft-Status: 739
16Content-Type: multipart/encrypted;
17 protocol="application/pgp-encrypted";
18 boundary="23VWJ4jAoB40SD17lh6TOBXK3fQSEGNu5"
19
20This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)
21--23VWJ4jAoB40SD17lh6TOBXK3fQSEGNu5
22Content-Type: application/pgp-encrypted
23Content-Description: PGP/MIME version identification
24
25Version: 1
26
27--23VWJ4jAoB40SD17lh6TOBXK3fQSEGNu5
28Content-Type: application/octet-stream; name="encrypted.asc"
29Content-Description: OpenPGP encrypted message
30Content-Disposition: inline; filename="encrypted.asc"
31
32-----BEGIN PGP MESSAGE-----
33Version: GnuPG v1
34Comment: Using GnuPG with Icedove - http://www.enigmail.net/
35
36hIwDGJlthTT7oq0BA/9NtLLXbiIJVS6pOynwEeSznrQK7kYVla8RM43//JECCkGJ
37azEaSBznabBv6epaFmQtVHLMXlCbZnMmW9loyqPBfMoAms6kKKBdG/jqhus89iXE
38+seXngC233Va/gZMb2DxOqIokVNfj9tpR7xQ8wS/jHTDiLNc1GOQC7ku42z2bNLA
39IQFRD/qbBFz89hU4wP4cYoAysOnEDojFrsrnCidTHJOJrndM6PPUtH/jQCyfr/EG
402tSpJwYKvmT6ly3yqaGLBtRPIxiv+dMe+7yw0t40qbjvvaTGavErEBJEKX5eWbTN
41/sjajHpUHqs6SIiMheH9dr+WfzFONtVbPEgGRmOERhlgTl/nLo86AZpjJroIGKJJ
42tTHCcoQGAWG+N7wrCE1RxR0kkMs4nRozj0TLu6ZyXMs+H063MewTPNxNAiQT1Nbi
43udKWmfLBlxn06p+JDzUKxj8PFwObdbxTvACzbAvBY1aHMQ==
44=mLl3
45-----END PGP MESSAGE-----
46
47--23VWJ4jAoB40SD17lh6TOBXK3fQSEGNu5--
48
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox.html
deleted file mode 100644
index 09d904bb..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox.html
+++ /dev/null
@@ -1,34 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <a name="att1"/>
18 <div id="attachmentDiv1">
19 <div class="noquote">
20 <div dir="ltr">test</div>
21 </div>
22 </div>
23 </div>
24 </div>
25 </td>
26 </tr>
27 <tr class="encrH">
28 <td dir="ltr">End of encrypted message</td>
29 </tr>
30 </table>
31 </div>
32 </div>
33 </body>
34</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox.tree
deleted file mode 100644
index 009ba99a..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-enigmail1.6.mbox.tree
+++ /dev/null
@@ -1,5 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::MimeMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox
deleted file mode 100644
index c4f14226..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox
+++ /dev/null
@@ -1,17 +0,0 @@
1From test@kolab.org Wed, 08 Sep 2010 17:02:52 +0200
2From: OpenPGP Test <test@kolab.org>
3To: test@kolab.org
4Subject: OpenPGP encrypted
5Date: Wed, 08 Sep 2010 17:02:52 +0200
6User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; )
7MIME-Version: 1.0
8Content-Type: multipart/encrypted; boundary="nextPart1357031.ppLHckZtsp"; protocol="application/pgp-encrypted"
9Content-Transfer-Encoding: 7Bit
10
11--nextPart1357031.ppLHckZtsp
12Content-Type: application/pgp-encrypted
13Content-Disposition: attachment
14
15Version: 1
16
17--nextPart1357031.ppLHckZtsp--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox.html
deleted file mode 100644
index 52196784..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox.html
+++ /dev/null
@@ -1,19 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <hr/>
11 <div>
12 <a href="attachment:1?place=body"><img align="center" height="48" width="48" src="file:application-pgp-encrypted.svg" border="0" style="max-width: 100%" alt=""/>Unnamed</a>
13 </div>
14 <div/>
15 </div>
16 </div>
17 </div>
18 </body>
19</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox.tree
deleted file mode 100644
index 79a20c8d..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-noData.mbox.tree
+++ /dev/null
@@ -1,4 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::AttachmentMessagePart
4 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox
deleted file mode 100644
index 2957bf3c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox
+++ /dev/null
@@ -1,114 +0,0 @@
1From test@kolab.org Fri May 01 15:13:51 2015
2From: testkey <test@kolab.org>
3To: you@you.com
4Subject: non enc attachment
5Date: Fri, 01 May 2015 17:13:51 +0200
6Message-ID: <20157069.RcaNBhWVXx@tabin.local>
7X-KMail-Identity: 1197256126
8User-Agent: KMail/4.13.0.1 (Linux/3.19.1-towo.1-siduction-amd64; KDE/4.14.2; x86_64; git-cd33034; 2015-04-11)
9MIME-Version: 1.0
10Content-Type: multipart/mixed; boundary="nextPart1612969.Xqz3IcFXZ3"
11Content-Transfer-Encoding: 7Bit
12
13This is a multi-part message in MIME format.
14
15--nextPart1612969.Xqz3IcFXZ3
16Content-Type: multipart/encrypted; boundary="nextPart2213427.hvfAsaxZ1O"; protocol="application/pgp-encrypted"
17
18
19--nextPart2213427.hvfAsaxZ1O
20Content-Type: application/pgp-encrypted
21Content-Disposition: attachment
22Content-Transfer-Encoding: 7Bit
23
24Version: 1
25--nextPart2213427.hvfAsaxZ1O
26Content-Type: application/octet-stream
27Content-Disposition: inline; filename="msg.asc"
28Content-Transfer-Encoding: 7Bit
29
30-----BEGIN PGP MESSAGE-----
31Version: GnuPG v2
32
33hIwDGJlthTT7oq0BBACdvp3PFrRx6vxZhxt06LqyaO7+SWBbVUr7GOa3QaYCCBm+
34/KTUZEfhPuGVcsVpJKZbPsUKVhYfvYpDAsZu3TehmKflobWAV/cCIK2BkQB744pd
35oaCtTj7pmCO05Zt5Uo/tXbrgceuW+/huwn2DO2fk4MUBsluH3fMbvccZJnR3yoUB
36DAMMzkNap8zaOwEIAOTKI8Bh3NhfuJdWDsjv+UT6E4kf/zg3D95mJ+3gK8kHFXdd
37YyEKaMsYx64kSwm1KcjsJ4gWykJlB34YDDfcIrnbgO2QRss9GhgOcUtLr0KNcY+0
38OJ4sbNmI8I3XssMb4rHtDrcXc0ODd0v/C/Lw2VfUdN+bBY4EetG096OPiZ4R41kF
39Rj95nhO8tpoJx9VltegCdZI2AxtykOYvUaLFyYqCoKMmQwqGjdaUv1CeMnxUIPsn
40A/x6TQ0AjpZ5IfMqO7QmOv3ACFo5/Ur93NauOK6szg/zdih9OxUL0Qid3nZQQwqA
41J9ZChTcUgdjQo8EjpWLy0oXR9uLSHcLwRo3OdRzS6QEz7Dus6hmpEal3zTZFj2NR
42mK38tpp+eWhzSAFAx8tyImz8SU2N2o7xQHlEdlWYGeIQg0embMnmMv6WJVWhYahb
43x5OTfHCGwHFsLhZDmtaNhAVMlYdqxKXoR45H9cmGNPpU5kN5Ckjr6I+I51cfgAOE
441vF54jYHXd1btfGrwAyKWBfFVQFPWjuIUdsEl8zDjNTmcCCbA77tEGohSqDi+WWL
45LyYw5g/uwwZ+5OzeRdjAJ+9xtJ+WXhnDUffG8GgGgZWBQD+S2Ix4lZ2NcAeyLPt/
46cXeDHkPUXj7cjm0hl7SvBKzR6X4EEWO/hh19mxngd4+e19q6Qm4K2QMfTwQQyNED
47whBkRXhcXcRxWlb/ICwFDIgxKLJko5HVTknBJDllNdm6l2C4Y9/IY2imqXni8xZX
48zQfAkDOBlfouUrHbPuBCRdCLmp7BgbanCaJDvgYGBvXEgjMKpV3bezTfm4Ugwiyk
49dJfMu/4XftZy7XqoFuDheNXuQ5JobpvVDaiTQ0EWHpHeX3TZ0xa8i1FO6ANLakUp
50aVFWzYl91bxbNHIcPh278neyi+LNWWT6TvkCwcbUYUfuIySOwfSUJAHDIJOx50Ha
51If0fNQDtF4o9mDFwXDwVf8e2zx5NjheqgYX/qIWjFE2cCCkUM4UkNrkYBOiwnh9F
52RJz4M6wKPhZT34MBlTKgwDbypDp+XYnM2HunzIDXCAigYsD/AuLNeFwsIPiXWJ47
53oXamEJxyqS9G0t/iy7+1mbNiFct7pvHt6QUKZ9aXSXj3MkQuWjjVNvMz6KocTSyL
54AeWQNYuvA5NkyZOA5+VU1ma3wn7IAXYkgw+OMvcz9VNevXNg956ZnGbb47Fqppp+
55MjK2ptM1UzIEnHxXtq3KFrXG1AzzhyFnKIjsiDpFTlMGTT9pRGnK8zyYXYPEgpwW
56874A5auLFOvhwPSNMhMai+XSoE3P+zZDqhXMYU8c49O+SeOtISg3Iy5tXuIPlIps
577k0KA60hPulMYBQLtZ/yDO/gXhkeWaw=
58=EJZ6
59-----END PGP MESSAGE-----
60
61--nextPart2213427.hvfAsaxZ1O--
62
63--nextPart1612969.Xqz3IcFXZ3
64Content-Disposition: attachment; filename="image.png"
65Content-Transfer-Encoding: base64
66Content-Type: image/png; name="image.png"
67
68iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAb
69rwAAG68BXhqRHAAAAAd0SU1FB9gHFg8aNG8uqeIAAAAGYktHRAD/AP8A/6C9p5MAAAkqSURBVHja
705VV7cFTVGf/OPefeu3fv3t1NdhMSCHkKASEpyEsaGwalWEWntLV1Wu0fdOxAx9Iq0xntAwac6ehY
71p+rwKLbjjLRFh9JadURKRGgFQTTECCYQE9nNgzzYZDe7m33d1+l3tpOOU61T2tF/+s1s7pzn9/t+
72v993Av/3QT6FO6WdO/d+M55Il8rMOdrT0x3Zt++3+c8EgM/nozseeviJiYmpe1zOQdM8BOOCIku/
73lIj1VrQ/0r9n9+78xwLgeAA3w4fHXV1d5Omnn6aapumlJSVVqalUJJvJZRdcu0RSfZQsaW7mjfPm
74cbF9+/btEIlEaq6Z03whXyhIjDFuGIZEKSP5fMFRVcVNT2Vf0jzsmMxYGtel9rff/vM/M8bjcZpM
75Jp1XX32VNDc3e7ovRP3JyZGVNdXVd1FGGwKBQEM8njiWTKV36IHgEACwibGx62LjU/cBd01Zljoc
76p9DHmLbHsmyK1UuKooJt24IMcLE+y3L45eEYLS8LgWH4YXR0bAPZtGmTVFvfoBZMEzKpFKmqqmqp
77qane4DhOteH3L1FkWZVlGSzLAtd1Oe4773C4LxoZvDWXh82OY2MtwAuFvCvSyDIFXdelYDDIvF4d
78xPzA0AgXFStMcWPxBPGoKvXpPh6JDG5hK1Zcv1H36Xc6tsMs21EMQ69CLSts2wGkDygTyW2CP8gX
79TKLIyvx0OrdDUXyLKXVUkdSne4QKtFAwuWmabjAYkDyqAgG/jziORh1EKaonkkQt2yRZRC5JHEGn
80L7OKyopNqqo2IbWQjqWgLOwFBFKsuGDa4PVyIssMk1sCACCjimXbrbquYKW41zJJOpXkeARyeZNQ
81SUKwHEqCKnBuAybkZeFSmssVSDKdhlBpCRgIcnQsdvKPB19sY4rMNIaH0BhQUVHKvXgpIiQF0wK/
824QORnOEayoDzOSBMXK4BSgpeTcMECqiqTDKZHDKmct3LCI55Kp0mQgK/3yDYkgIc3kNhfHzCkRk9
83p6nk+yPD3SmWzeZiKNkciUrg2g5BjQWdSBchiEvQjzoWAFkUYPDrCjBFUEJ8AhSIRyl2jcfjEL9h
84AFJODL8B6H7IZrNIt2g3B1mysShdQhmbT58+ExRdx3L5/PNomGU4kJkuA9ILYn+JP4CXOoDUoWO9
85IBhCSBCLTYCK+rqOg8CKvY6JPQhGxjkX1zyAdwrgAhTKWBDmxTUTC7Tcy5dHBiilL7cdaTsNGAwP
867o32D4Q9HnWTrvsCiqIgdWgqDkJfkKgDU1MZcBGMhbKgj2B0LIle8eNhgiBsoMwFEY7rQDqVwlo5
87esUE/AAR81gUYIUT8UR2//4/rK+pLjs3MhIFEVJN9WwXK2oM+P1BREpQO0hjwkw+BzJWY1oOXB5L
88w9DIOGTQvYS4UFqigR9ZwUqEXFghVop059AjonqcAIZrqCKg31AS3OU66Adf4sabWqKvvHIYpoNh
89y+Vj4xMHVEW93eUuo0izhT4oRbcSIoALbRle4AVVkfBup6g9thwCzRX1VRQmdMeqLVETEIkW2ZNx
90H8oqzqAfXCGJEQ6XBQEgNQ2A7tq1C1a1tvaattOOrVFOqVSLCQhqU6QPx+DTsOU0GavLYUV20Qv4
91rEIymYNQuB48Wkg8QTA0NIQeYKB6NGTgH90jIcJEMikAi1dRRo9NLV583ek33jjpFAGIPw8++IAj
92e9SIRGm5wliraVosnTWLmmemUugBkTiPSS3AtgV8VQA9A8LxdfULYXBoEKv2wMhIn2BHGFR0DZ6d
93glQ6hUDT6A/RWVSSmfx5DjxRV1vzVkdHBzDAWLNmDezc+aQVqqz5dSY52Z63nLn9A33lI9myLXNL
94xv0Fq3gWutMN0BToxcso+AN+cKmOXI5A9P12mKDzYNXcZXDq1F+h+IboFgzb1VAhDULeJpxwC19G
95g/uMgOXVfXW1tbWCYM6mtdi8+YfiM4m/Y1UrHzkergyXz/3czImCnRjuHiW3qxpPqGFPy6SpHJC9
96IR+Sm+2N8i/dcMOMZdGeshcrS/S58+c3zU2Z8oVD50cbVfP8M4pGkymoUxLxsUzOVhtmQ+5432Rg
97oj6QOLFj28/caQk+EjMXraUV1eW+8dH06StQZnlnNbQefGTD92pWfu3I6TOT8oY7brv4hWUt3xiw
982OrlDVVdRslsd2Fd469Q8sUB3c8uOW49SdHX1rbcePhoz3B7feuqlt5oZtBTv+ioSdXc7q3fHQaM
99fwtg6Vd/dEvn8Qssnzg/0Ns56jRcO6Nw4d1Af+/RH0/cdv+O/fRK7KnmBXPWGsQeDPhK9oWC6hdd
100R3pdUcg88Tx7U7Ej1y1qMjreGwjt/cnaF2YtvCXQe7bzxLkj+/sunT0Ry00OwHRI8DERLqeNmqGV
101JZJVC6Yu7UxMOfLFlV9pWQcYp57/013rb1u9ua29b0Ch4bsl4tKLY5P1sgxNJzsHDj136KzS3NTk
1029mTNusPvXJLrbnjUe/b16FDfsZ/3xC8d4/HoCQ4Anwzg91vWPL7+3pvvDM806sTY4IVyMxfrojO3
103BVubbyJMhnVVM3y+l187/nChIJ2ZpSs9hMD4qC6t6x6+0gkAoRC33/Sb8RdmXj9nzvWraivhP47g
104AyHxKb1mfWkRYHCjMb30nafeeWzerU9963w3L3/02c4f7D0y0NXTx3f3D/JTb7bzxpeODu55+PGT
105yy5F+ZmeD/iSrh5efeJd/hGZP5GBux+6cysY3w7H+16IVy65V6trnn3P9JqVjQ3JuSsdHhWW6hIL
106NuhyUpJgEF/ofSVBeLBuVtVjd3y55SHXhQ8UBht0DR4r98Fs+IRg/zrxlz2/2A7p5yYBY93Gu+4f
107H5xojLwOxfjd/WufOHhQ/IcD7eYVC5YyCjFMfkVV4NpMFvpTachoZeDaNryLnliOczsUCv1XBWD8
108YjF5MWJ9kcT757qenR7vf4bDoqWwHCvUUfPNsQQMWSZAZTlsw7nxYQQTcuDrjgQuPn7z/D7YivNt
109nPPfEDzwqcU75/j6SD/f8uG5vXs5dL7Hjb+d4gp8mnF8nAOabjcac+OBAxyuNiT4HyNwGZYgu0RW
110IDt/Icz4zAC0tXE4183rQ6XwU9uBXgLQ5Teg7GIv1+EqgsF/GY4DtCQALZMp2ITttmqoHzpWr756
111o/0d59+Lh3Y1HHcAAAAASUVORK5CYII=
112
113--nextPart1612969.Xqz3IcFXZ3--
114
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox.html
deleted file mode 100644
index e20a9568..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox.html
+++ /dev/null
@@ -1,69 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">test text</div>
40 </div>
41 </div>
42 </div>
43 </td>
44 </tr>
45 <tr class="signOkKeyOkH">
46 <td dir="ltr">End of signed message</td>
47 </tr>
48 </table>
49 </div>
50 </div>
51 </td>
52 </tr>
53 <tr class="encrH">
54 <td dir="ltr">End of encrypted message</td>
55 </tr>
56 </table>
57 </div>
58 <a name="att2"/>
59 <div id="attachmentDiv2">
60 <hr/>
61 <div>
62 <a href="attachment:2?place=body"><img align="center" height="48" width="48" src="file:image-png.svg" border="0" style="max-width: 100%" alt=""/>image.png</a>
63 </div>
64 <div/>
65 </div>
66 </div>
67 </div>
68 </body>
69</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox.tree
deleted file mode 100644
index c2a6ad01..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-non-encrypted-attachment.mbox.tree
+++ /dev/null
@@ -1,9 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::EncryptedMessagePart
4 * MimeTreeParser::SignedMessagePart
5 * MimeTreeParser::MimeMessagePart
6 * MimeTreeParser::TextMessagePart
7 * MimeTreeParser::MessagePart
8 * MimeTreeParser::AttachmentMessagePart
9 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox
deleted file mode 100644
index 222b5936..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox
+++ /dev/null
@@ -1,91 +0,0 @@
1From: firstname.lastname@example.com
2To: test@kolab.org
3Subject: OpenPGP encrypted one signed and one unsigned attachment
4Date: Sun, 30 Aug 2015 12:08:40 +0200
5Message-ID: <1737262.ESByPkoaL9@vkpc5>
6X-KMail-Identity: 402312391
7X-KMail-Dictionary: en_US
8User-Agent: KMail/5.0.42 pre (Linux/3.16.6-2-desktop; KDE/5.14.0; x86_64; ; )
9MIME-Version: 1.0
10Content-Type: multipart/mixed; boundary="nextPart2760349.k2GQmrcl5a"
11Content-Transfer-Encoding: 7Bit
12
13This is a multi-part message in MIME format.
14
15--nextPart2760349.k2GQmrcl5a
16Content-Type: multipart/encrypted; boundary="nextPart2260160.XvshVD34ka"; protocol="application/pgp-encrypted"
17
18--nextPart2260160.XvshVD34ka
19Content-Type: application/pgp-encrypted
20Content-Disposition: attachment
21Content-Transfer-Encoding: 7Bit
22
23Version: 1
24--nextPart2260160.XvshVD34ka
25Content-Type: application/octet-stream
26Content-Disposition: inline; filename="msg.asc"
27Content-Transfer-Encoding: 7Bit
28
29-----BEGIN PGP MESSAGE-----
30Version: GnuPG v2
31
32hQEMAwzOQ1qnzNo7AQgAooa+Peu1t5aiX4WvssEnRlapkr62/49/Dbz5assvshdr
33o9zOC+89Qr5P/ea+tC1MO7ek/DfyL9C4EzOMp/r08GeInLqWMc9qLZO//YaT2JUp
340IZFbpUQ4C2zjXMRuy/PMrltHuCfsvhvHX1YAHp/xjRsKpQoE3mSDzz5sc8/Hj9n
352eoKoCEW1rgt2qHtV4DD6lvUPo42LMZclJ9GqfoD7WLoEH9ebRLhXr3D00j6xBfy
36//nooAhzQSW8b7GZth4Qc7DKAZMhuEly/kp07nhuPd1fMJDEAB/zh9EYlgnn3STb
37MCdtFs6kMC24uA2eDCH330Bn9OzzWnsVU9ae4XiKnNLpAeactSFRKKvGytBQaloq
38Gvn1+D0Xmw6OsSmRJ84DzKqG4E6bzE+XhMEMnLlqDvZDsOtU/sCGvMK0MM3y5B7M
39ONqWLN3ng3zrGPec5gqfvnWgKpANUrbJkzS8LNjv4hwoKh0tFpghWQiefG0Z9Hw1
40UaYbFwvaFgXcm72oBkynDCleWjQ2vnDE4P38PldqZbAW/Pw1q6Yq8m9MhS1VpbI5
41WBjuRQhgQvMG0LY0gR/3Qor5tX9ASllWnPfWYVuOiSOAe5Hsp7BmELXkWftHii7k
42YW0Qim7jleDaY1MGfFr0vrO/PiYxGTb+4IUyUgEBYEpxa9ozUoeftF6JbHPuEZI0
43ENX8aIVJ9FnpssrR5HlpXieF12ec9ZFeV7mAwcucJ3RXuDcQHQTHgEbfnzTsaEpL
44Hxs+6euOCJXhKOYVrsAlB4IxK0OQm4XHiZ7WBp5Jp7rlSHltdxFpSnHIfqngyCA4
45L+c/gsUEVbNI++iOOhOKVT47XIf+s/xa1Y4XghGbHIA3/pQphYo4U5dTeLoX0OWI
4664tPxliQTKuJ+NAv9Km2bDgvlvn83jsc94THi5u+fIdDEGp7pgoQNXR69Lkz1bsA
47Hh9xqKzVloHu4SsT3OGX+bfTO3jUh8ieU/4tflZMrJ9RkEfE08PzTnopT08FppFx
48QWpHv/fwyJf6Cw1IevM5pVLAShg0sbCPF/xsYTjSyWNib1wFtxkmv5MToCFwkxi5
49b1yT23BNlV5RV6wcjmrum7p2fMwPjbt8X6z+pgUtkD7zImBWeYddMjgSjOFuFEjF
50gpfVoV3OIvMPZMe2jqWsjnjujHJr2z5IZn3A7WI0b4SIDP0sGwsTBiogKqcBNWpn
51O4MKUq9JwC0K/MY7yS1MCLoHfwU18z19Es/flaAgwtXk8IWIcjkkumAwNl+y8Q+I
52+8AFGdiXTKld9QVwCKnMS3QivHPuFNL8rfcWKsr1nOhOEhaO+zD94eOOiCbwiXGr
53E6WsewNCVQUN4bxAXl2vRi+9WRctLy7bsuIL5dgUz0CMYkQ+dDmrBflD0nyC
54=TGNA
55-----END PGP MESSAGE-----
56
57--nextPart2260160.XvshVD34ka--
58
59--nextPart2760349.k2GQmrcl5a
60Content-Type: multipart/encrypted; boundary="nextPart22530242.iRl14SoP0Q"; protocol="application/pgp-encrypted"
61
62--nextPart22530242.iRl14SoP0Q
63Content-Type: application/pgp-encrypted
64Content-Disposition: attachment
65Content-Transfer-Encoding: 7Bit
66
67Version: 1
68--nextPart22530242.iRl14SoP0Q
69Content-Type: application/octet-stream
70Content-Disposition: inline; filename="msg.asc"
71Content-Transfer-Encoding: 7Bit
72
73-----BEGIN PGP MESSAGE-----
74Version: GnuPG v2
75
76hQEMAwzOQ1qnzNo7AQgAtA94bBRwgpo64zcyh+4dzt0Pr2pmNjiS4ZX+a/xzYCmD
77oS1a26s/LVZH+aJYC13l1kEu+6YjKn+ruQvMfhihOxglHBLjmUO17TPFC05AReSn
78amMqPbgS6mOwhlBJHrBa/SVwkxmbMaNBUJ/KxRXFtTW/V4pPWImRvI9mnmpo8fHy
79ZLvVAI3hGe7vPG5Vbdi5/Iu/JzqwlglVsP82gYpLlx7HhWGF4gmTGc6YBwFtzEvS
80eqFtKRDqN60bo4HnNLOEnMaWlYPTpt3QibLWWIbtpA1Gb0Q/1NvDnn3Lyj8H+0WV
818H6Ks9/cvAuoAMOad6y4gDJb+K/AS7Ha+08/3lMYG9LAAgGe8Qocxg1W3ha1o0Ph
82YSfV2ooebsLiHjwspjYpsX5ijnRj6uNGp5Dt28EIo1ANF+oDiSKEwAMGPBtcnqaO
83FWXy39dP3VXE73nsO+dyTidaATFBlYg+IpPTDSFTgsk7XDV973EpdXvOkBEp/vBv
84EZknuZFOkS0v5QHk9Y/hhlSLACTIEWQpBiFGOwUVSZFXLEY5zQNTbQdRbz3ZYcE9
85mIFzD9Ujw6tIJIOFazhwr9SxxyeaAygWeg4ifmmdhAsmFYum
86=WsAv
87-----END PGP MESSAGE-----
88
89--nextPart22530242.iRl14SoP0Q--
90
91--nextPart2760349.k2GQmrcl5a--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox.html
deleted file mode 100644
index c0b9d79e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox.html
+++ /dev/null
@@ -1,99 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="encr">
11 <tr class="encrH">
12 <td dir="ltr">Encrypted message</td>
13 </tr>
14 <tr class="encrB">
15 <td>
16 <div style="position: relative; word-wrap: break-word">
17 <a name="att"/>
18 <div id="attachmentDiv">
19 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
20 <tr class="signOkKeyOkH">
21 <td dir="ltr">
22 <table cellspacing="0" cellpadding="0" width="100%">
23 <tr>
24 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
25 <td align="right">
26 <a href="kmail:showSignatureDetails">Show Details</a>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr class="signOkKeyOkB">
33 <td>
34 <a name="att1"/>
35 <div id="attachmentDiv1">
36 <a name="att1.1"/>
37 <div id="attachmentDiv1.1">
38 <div class="noquote">
39 <div dir="ltr">This is the main body.</div>
40 </div>
41 </div>
42 <a name="att1.2"/>
43 <div id="attachmentDiv1.2">
44 <table cellspacing="1" class="textAtm">
45 <tr class="textAtmH">
46 <td dir="ltr">attachment1.txt</td>
47 </tr>
48 <tr class="textAtmB">
49 <td>
50 <div class="noquote">
51 <div dir="ltr">This is a signed attachment.</div>
52 </div>
53 </td>
54 </tr>
55 </table>
56 </div>
57 </div>
58 </td>
59 </tr>
60 <tr class="signOkKeyOkH">
61 <td dir="ltr">End of signed message</td>
62 </tr>
63 </table>
64 </div>
65 </div>
66 </td>
67 </tr>
68 <tr class="encrH">
69 <td dir="ltr">End of encrypted message</td>
70 </tr>
71 </table>
72 </div>
73 <a name="att2"/>
74 <div id="attachmentDiv2">
75 <table cellspacing="1" cellpadding="1" class="encr">
76 <tr class="encrH">
77 <td dir="ltr">Encrypted message</td>
78 </tr>
79 <tr class="encrB">
80 <td>
81 <div style="position: relative; word-wrap: break-word">
82 <a name="att"/>
83 <div id="attachmentDiv">
84 <div class="noquote">
85 <div dir="ltr">This is an unsigned attachment.</div>
86 </div>
87 </div>
88 </div>
89 </td>
90 </tr>
91 <tr class="encrH">
92 <td dir="ltr">End of encrypted message</td>
93 </tr>
94 </table>
95 </div>
96 </div>
97 </div>
98 </body>
99</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox.tree
deleted file mode 100644
index 5cb83749..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-partially-signed-attachments.mbox.tree
+++ /dev/null
@@ -1,12 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::EncryptedMessagePart
4 * MimeTreeParser::SignedMessagePart
5 * MimeTreeParser::MimeMessagePart
6 * MimeTreeParser::TextMessagePart
7 * MimeTreeParser::MessagePart
8 * MimeTreeParser::AttachmentMessagePart
9 * MimeTreeParser::MessagePart
10 * MimeTreeParser::EncryptedMessagePart
11 * MimeTreeParser::TextMessagePart
12 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox
deleted file mode 100644
index c53e0916..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox
+++ /dev/null
@@ -1,42 +0,0 @@
1From: firstname.lastname@example.com
2To: test@kolab.org
3Subject: OpenPGP encrypted with 2 text attachments
4Date: Sun, 30 Aug 2015 12:05:17 +0200
5Message-ID: <1505824.VT0nqpAGu0@vkpc5>
6X-KMail-Identity: 402312391
7X-KMail-Dictionary: en_US
8User-Agent: KMail/5.0.42 pre (Linux/3.16.6-2-desktop; KDE/5.14.0; x86_64; ; )
9MIME-Version: 1.0
10Content-Type: multipart/encrypted; boundary="nextPart3335835.KxmPgziKxd"; protocol="application/pgp-encrypted"
11
12--nextPart3335835.KxmPgziKxd
13Content-Type: application/pgp-encrypted
14Content-Disposition: attachment
15Content-Transfer-Encoding: 7Bit
16
17Version: 1
18--nextPart3335835.KxmPgziKxd
19Content-Type: application/octet-stream
20Content-Disposition: inline; filename="msg.asc"
21Content-Transfer-Encoding: 7Bit
22
23-----BEGIN PGP MESSAGE-----
24Version: GnuPG v2
25
26hQEMAwzOQ1qnzNo7AQgA6tTJs017mI+xuhjcSTr3F5X/rJghq0oaXbjk1K0W33p+
27jsEyPTbuUIvI2a+5xHJ3BV+gnnO0Xosz57tGTF/eVAySnGiMse5cu2RQR9b/9EkC
28uzt3tIChyub3GUODG3yzXqkhSiwIImvedWgnJYTJ7eeBkWdizVT0b0byiG2d7Hjq
29hzYzyPJRwuoE36hryDsFycAhPfSsQAirxDJXk4HTsfBCmz7tzJhtt4wKc7z5m8fq
30y+jddnDADq5+tykJS6zemJOzgU3AOQyVJbmsx2vTV1CJdpKPHvTTgghpAaSuVbg0
31tR9BX1nPnA/bgX/V7C+3PwuCvB0ZKmv5d8kaGaTwO9LAhQGaWTfhG1cyy+MJhXdR
32rH63PMkZh/lrvj7qJYofI5iVoe1CiMaX44BiwKVclGf7bEFdzc2NSRvvTSzisN3T
33nSzydEttuEY5jGagQQNT1l1l4I8HAtUgwGtkKZVTAUL6iKHYAqzB77sRs33UJy4k
34ZSIWFnSY8l+HLG+MYKsYCGsvJHkxEHnMiS1EZcmpUFhxOGQpiF2rJ4qnL2jbFWbA
359N1O5N1N/DJ/YKjwgy/jVVj6AOCrBZrxvKKt2mtG/wVX0F/KSKiEd8mgrLIx1udw
36tibiDAJmDxUk8K0lAdOHBrzBChvysiT/QxCJFcSY6FE99Rral+BWjeyAIQQWvc2B
37cEceZCtzjCOrwvoJwl2uEX+51nmMp+z1EoeyyhmUZZ4y65yOg4P6KGXGcLmIjSbH
38IhsSls1jRkSrypf/wcEd6o7KZdeYbfA=
39=Sud3
40-----END PGP MESSAGE-----
41
42--nextPart3335835.KxmPgziKxd--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox.html
deleted file mode 100644
index cca4c455..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox.html
+++ /dev/null
@@ -1,64 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <a name="att1"/>
18 <div id="attachmentDiv1">
19 <div class="noquote">
20 <div dir="ltr">this is the main body part</div>
21 </div>
22 </div>
23 <a name="att2"/>
24 <div id="attachmentDiv2">
25 <table cellspacing="1" class="textAtm">
26 <tr class="textAtmH">
27 <td dir="ltr">attachment1.txt</td>
28 </tr>
29 <tr class="textAtmB">
30 <td>
31 <div class="noquote">
32 <div dir="ltr">this is the first attachment</div>
33 </div>
34 </td>
35 </tr>
36 </table>
37 </div>
38 <a name="att3"/>
39 <div id="attachmentDiv3">
40 <table cellspacing="1" class="textAtm">
41 <tr class="textAtmH">
42 <td dir="ltr">attachment2.txt</td>
43 </tr>
44 <tr class="textAtmB">
45 <td>
46 <div class="noquote">
47 <div dir="ltr">this is the second attachment</div>
48 </div>
49 </td>
50 </tr>
51 </table>
52 </div>
53 </div>
54 </div>
55 </td>
56 </tr>
57 <tr class="encrH">
58 <td dir="ltr">End of encrypted message</td>
59 </tr>
60 </table>
61 </div>
62 </div>
63 </body>
64</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox.tree
deleted file mode 100644
index 71a67b58..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted-two-attachments.mbox.tree
+++ /dev/null
@@ -1,9 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::MimeMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
6 * MimeTreeParser::AttachmentMessagePart
7 * MimeTreeParser::MessagePart
8 * MimeTreeParser::AttachmentMessagePart
9 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox
deleted file mode 100644
index 5102fa78..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox
+++ /dev/null
@@ -1,36 +0,0 @@
1From test@kolab.org Wed, 08 Sep 2010 17:02:52 +0200
2From: OpenPGP Test <test@kolab.org>
3To: test@kolab.org
4Subject: OpenPGP encrypted
5Date: Wed, 08 Sep 2010 17:02:52 +0200
6User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; )
7MIME-Version: 1.0
8Content-Type: multipart/encrypted; boundary="nextPart1357031.ppLHckZtsp"; protocol="application/pgp-encrypted"
9Content-Transfer-Encoding: 7Bit
10
11
12--nextPart1357031.ppLHckZtsp
13Content-Type: application/pgp-encrypted
14Content-Disposition: attachment
15
16Version: 1
17--nextPart1357031.ppLHckZtsp
18Content-Type: application/octet-stream
19Content-Disposition: inline; filename="msg.asc"
20
21-----BEGIN PGP MESSAGE-----
22Version: GnuPG v2.0.15 (GNU/Linux)
23
24hQEMAwzOQ1qnzNo7AQgAtWfDWWI2JUGuptpackiIxpWViEEpGAeruETubiIPwxNb
25DNmXrMDhbm/zIbPntIGWJDgUMfABZCUgmlJLWhsceDTt+tXnWGha2VYrN2/WsF6/
26Pqs/TavTvMIJQHDaIH5yDDCaMoq/mGSbcu7go2H8Sw7aBEYlM8jGlqc1HziXnZ1q
273vDiA+4qWfvbNoSRo1kb9Pcq997yg6WqZXH2hJ7cp+hIQ4uTP1/+qgYHMvfPlzQk
28XcDguGbIer88ELhuR5622unGBAB4dqp+5w6n9c6rrCH81qhV4W0nqSEvj1tBj78S
29ZTi6VBAo5eS0e3iOJqMpwUZz6hQUpJw2wnNRGvLgI9KZAag0HkgPdMeANowg7vpE
30L4nU7B0ybhswA2Y7QT/wwCDZu9N1JGeBmy0dgy4sA38Ki27rn2/lIaP0j14JycwM
31RTJ1uwI+ZuQiwXlyYtdFZJWe8nraWARch0oKqhaR7aSsxGWo63eiGEQhkQCBFBb3
32Vg0nNCZRBauEqIESEW5EV2zrJqdfNYcz+f9IP125dnQEKgLZ6FxTt3+v
33=mhNl
34-----END PGP MESSAGE-----
35
36--nextPart1357031.ppLHckZtsp--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.html
deleted file mode 100644
index ba0976cd..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.html
+++ /dev/null
@@ -1,31 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <div class="noquote">
18 <div dir="ltr">encrypted message text</div>
19 </div>
20 </div>
21 </div>
22 </td>
23 </tr>
24 <tr class="encrH">
25 <td dir="ltr">End of encrypted message</td>
26 </tr>
27 </table>
28 </div>
29 </div>
30 </body>
31</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.inProgress.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.inProgress.html
deleted file mode 100644
index e5eb55d0..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.inProgress.html
+++ /dev/null
@@ -1,24 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Please wait while the message is being decrypted...</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="font-size:x-large; text-align:center; padding:20pt;"/>
15 </td>
16 </tr>
17 <tr class="encrH">
18 <td dir="ltr">End of encrypted message</td>
19 </tr>
20 </table>
21 </div>
22 </div>
23 </body>
24</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.tree
deleted file mode 100644
index 82f705c2..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-encrypted.mbox.tree
+++ /dev/null
@@ -1,4 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::TextMessagePart
4 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox
deleted file mode 100644
index 8bd06910..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox
+++ /dev/null
@@ -1,40 +0,0 @@
1From test@example.com Thu, 17 Oct 2013 02:13:03 +0200
2Return-Path: <test@example.com>
3Delivered-To: you@you.com
4Received: from localhost (localhost [127.0.0.1])
5 by test@example.com (Postfix) with ESMTP id B30D8120030
6 for <you@you.com>; Thu, 17 Oct 2013 02:13:05 +0200 (CEST)
7From: test <test@example.com>
8To: you@you.com
9Subject: charset
10Date: Thu, 17 Oct 2013 02:13:03 +0200
11Message-ID: <4081645.yGjUJ4o4Se@example.local>
12User-Agent: KMail/4.12 pre (Linux/3.11-4.towo-siduction-amd64; KDE/4.11.2; x86_64; git-f7f14e3; 2013-10-15)
13MIME-Version: 1.0
14Content-Transfer-Encoding: 7Bit
15Content-Type: text/plain; charset="ISO-8859-15"
16
17-----BEGIN PGP MESSAGE-----
18Version: GnuPG v2.0.22 (GNU/Linux)
19
20hIwDGJlthTT7oq0BBACbaRZudMigMTetPZNRgkfEXv4QQowR1jborw0dcgKKqMQ1
216o67NkpxvmXKGJTfTVCLBX3nk6FKYo6NwlPCyU7X9X0DDk8hvaBdR9wGfrdm5YWX
22GKOzcqJY1EypiMsspXeZvjzEW7O8I956c3vBb/2pM3xqYEK1kh8+d9bVH+cjf4UB
23DAMMzkNap8zaOwEH/1rPShyYL8meJN+/GGgS8+Nf1BW5pSHdAPCg0dnX4QCLEx7u
24GkBU6N4JGYayaCBofibOLacQPhYZdnR5Xb/Pvrx03GrzyzyDp0WyeI9nGNfkani7
25sCRWbzlMPsEvGEvJVnMLNRSk4xhPIWumL4APkw+Mgi6mf+Br8z0RhfnGwyMA53Mr
26pG9VQKlq3v7/aaN40pMjAsxiytcHS515jXrb3Ko4pWbTlAr/eytOEfkLRJgSOpQT
27BY7lWs+UQJqiG8Yn65vS9LMDNJgX9EOGx77Z4u9wvv4ZieOxzgbHGg5kYCoae7ba
28hxZeNjYKscH+E6epbOxM/wlTdr4UTiiW9dMsH0zSwMUB891gToeXq+LDGEPTKVSX
29tsJm4HS/kISJBwrCI4EUqWZML6xQ427NkZGmF2z/sD3kmL66GjspIKnb4zHmXacp
3084n2KrI9s7p6AnKnQjsxvB/4/lpXPCIY5GH7KjySEJiMsHECzeN1dJSL6keykBsx
31DtmYDA+dhZ6UWbwzx/78+mjNREhyp/UiSAmLzlJh89OH/xelAPvKcIosYwz4cY9N
32wjralTmL+Y0aHKeZJOeqPLaXADcPFiZrCNPCH65Ey5GEtDpjLpEbjVbykPV9+YkK
337JKW6bwMraOl5zmAoR77PWMo3IoYb9q4GuqDr1V2ZGlb7eMH1gj1nfgfVintKC1X
343jFfy7aK6LIQDVKEwbi0SxVXTKStuliVUy5oX4woDOxmTEotJf1QlKZpn5oF20UP
35tumYrp0SPoP8Bo4EVRVaLupduI5cYce1q/kFj9Iho/wk56MoG9PxMMfsH7oKg3AA
36CqQ6/kM4oJNdN5xIf1EH5HeaNFkDy1jlLznnhwVAZKPo/9ffpg==
37=bPqu
38-----END PGP MESSAGE-----
39
40
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.html
deleted file mode 100644
index 344dc237..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.html
+++ /dev/null
@@ -1,47 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
15 <tr class="signOkKeyOkH">
16 <td dir="ltr">
17 <table cellspacing="0" cellpadding="0" width="100%">
18 <tr>
19 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
20 <td align="right">
21 <a href="kmail:showSignatureDetails">Show Details</a>
22 </td>
23 </tr>
24 </table>
25 </td>
26 </tr>
27 <tr class="signOkKeyOkB">
28 <td>
29 <div class="noquote">
30 <div dir="ltr">asdasd asd asd asdf sadf sdaf sadf öäü</div>
31 </div>
32 </td>
33 </tr>
34 <tr class="signOkKeyOkH">
35 <td dir="ltr">End of signed message</td>
36 </tr>
37 </table>
38 </td>
39 </tr>
40 <tr class="encrH">
41 <td dir="ltr">End of encrypted message</td>
42 </tr>
43 </table>
44 </div>
45 </div>
46 </body>
47</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.inProgress.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.inProgress.html
deleted file mode 100644
index e5eb55d0..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.inProgress.html
+++ /dev/null
@@ -1,24 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Please wait while the message is being decrypted...</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="font-size:x-large; text-align:center; padding:20pt;"/>
15 </td>
16 </tr>
17 <tr class="encrH">
18 <td dir="ltr">End of encrypted message</td>
19 </tr>
20 </table>
21 </div>
22 </div>
23 </body>
24</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.tree
deleted file mode 100644
index ea8223fd..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-charset-encrypted.mbox.tree
+++ /dev/null
@@ -1,4 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::TextMessagePart
3 * MimeTreeParser::EncryptedMessagePart
4 * MimeTreeParser::SignedMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed-broken.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed-broken.mbox
deleted file mode 100644
index fc0d2df9..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed-broken.mbox
+++ /dev/null
@@ -1,26 +0,0 @@
1From: test <test@kolab.org>
2To: you@you.de
3Subject: test
4Date: Tue, 25 Aug 2015 16:47:10 +0200
5Message-ID: <1662097.O9NVKTC5pT@11b508545ba2>
6X-KMail-Identity: 1428848833
7User-Agent: KMail/4.13.0.3 (Linux/4.1.0-rc5-siduction-amd64; KDE/4.14.3; x86_64; git-7c86098; 2015-08-23)
8MIME-Version: 1.0
9Content-Transfer-Encoding: quoted-printable
10Content-Type: text/plain; charset="iso-8859-1"
11
12-----BEGIN PGP SIGNED MESSAGE-----
13Hash: SHA256
14
15ohno break it =F6=E4=FC
16-----BEGIN PGP SIGNATURE-----
17Version: GnuPG v2
18
19iQEcBAEBCAAGBQJV3H/vAAoJEI2YYMWPJG3mEZQH/2mbCDa60risTUsomEecasc7
20kIc8Ch+OjZwlEQWKEiFbpLCMVjMwf0oGFcpc/dqnIyIqeVvF6Em+v7iqKuyAaihu
217ZxxC816tDDI7UIpmyWu39McqGB/2hoA/q+QAMgBiaIuMwYJK9Aw08hXzoCds6O7
22Uor2Y6kMSwEiRnTSYvQHdoaZY3F9SFTLPgjvwfSu7scvp7xvH7bAVIqGGfkLjXpP
23OFkDhEqUI7ORwD5cvvzEu57XmbGB7Nj5LRCGcTq6IlaGeN6Pw5+hOdd6MQ4iISwy
24870msP9NvktURnfXYC3fYnJaK/eUln7LYCBl/k04Z/3Um6dMYyQGh63oGv/2qxQ=3D
25=3D4ctb
26-----END PGP SIGNATURE-----
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox
deleted file mode 100644
index 6099a51f..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox
+++ /dev/null
@@ -1,26 +0,0 @@
1From: test <test@kolab.org>
2To: you@you.de
3Subject: test
4Date: Tue, 25 Aug 2015 16:47:10 +0200
5Message-ID: <1662097.O9NVKTC5pT@11b508545ba2>
6X-KMail-Identity: 1428848833
7User-Agent: KMail/4.13.0.3 (Linux/4.1.0-rc5-siduction-amd64; KDE/4.14.3; x86_64; git-7c86098; 2015-08-23)
8MIME-Version: 1.0
9Content-Transfer-Encoding: quoted-printable
10Content-Type: text/plain; charset="iso-8859-1"
11
12-----BEGIN PGP SIGNED MESSAGE-----
13Hash: SHA256
14
15ohno =F6=E4=FC
16-----BEGIN PGP SIGNATURE-----
17Version: GnuPG v2
18
19iQEcBAEBCAAGBQJV3H/vAAoJEI2YYMWPJG3mEZQH/2mbCDa60risTUsomEecasc7
20kIc8Ch+OjZwlEQWKEiFbpLCMVjMwf0oGFcpc/dqnIyIqeVvF6Em+v7iqKuyAaihu
217ZxxC816tDDI7UIpmyWu39McqGB/2hoA/q+QAMgBiaIuMwYJK9Aw08hXzoCds6O7
22Uor2Y6kMSwEiRnTSYvQHdoaZY3F9SFTLPgjvwfSu7scvp7xvH7bAVIqGGfkLjXpP
23OFkDhEqUI7ORwD5cvvzEu57XmbGB7Nj5LRCGcTq6IlaGeN6Pw5+hOdd6MQ4iISwy
24870msP9NvktURnfXYC3fYnJaK/eUln7LYCBl/k04Z/3Um6dMYyQGh63oGv/2qxQ=3D
25=3D4ctb
26-----END PGP SIGNATURE-----
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.html
deleted file mode 100644
index d32d0235..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.html
+++ /dev/null
@@ -1,35 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signOkKeyOkB">
22 <td>
23 <div class="noquote">
24 <div dir="ltr">ohno öäü</div>
25 </div>
26 </td>
27 </tr>
28 <tr class="signOkKeyOkH">
29 <td dir="ltr">End of signed message</td>
30 </tr>
31 </table>
32 </div>
33 </div>
34 </body>
35</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.inProgress.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.inProgress.html
deleted file mode 100644
index 45a999d3..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.inProgress.html
+++ /dev/null
@@ -1,22 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signInProgress">
9 <tr class="signInProgressH">
10 <td dir="ltr">Please wait while the signature is being verified...</td>
11 </tr>
12 <tr class="signInProgressB">
13 <td/>
14 </tr>
15 <tr class="signInProgressH">
16 <td dir="ltr">End of signed message</td>
17 </tr>
18 </table>
19 </div>
20 </div>
21 </body>
22</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.tree
deleted file mode 100644
index 23e99880..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-signed.mbox.tree
+++ /dev/null
@@ -1,3 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::TextMessagePart
3 * MimeTreeParser::SignedMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox
deleted file mode 100644
index 5ecfc612..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox
+++ /dev/null
@@ -1,34 +0,0 @@
1From t.glaser@tarent.de Mon Aug 18 10:59:01 2014
2Return-Path: <t.glaser@tarent.de>
3Received: from tgwrk.ig42.org (tgwrk.ig42.org.
4 [2a01:238:4200:4342:321e:80ff:fe12:4223]) by mx.google.com with ESMTPSA id
5 pe6sm40660135wjb.38.2014.08.18.01.59.01 for <t.glaser@tarent.de>
6 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18
7 Aug 2014 01:59:01 -0700 (PDT)
8Date: Mon, 18 Aug 2014 10:59:00 +0200 (CEST)
9From: Thorsten Glaser <t.glaser@tarent.de>
10X-X-Sender: tglase@tglase.lan.tarent.de
11To: Thorsten Glaser <t.glaser@tarent.de>
12Subject: Test for Mozilla bug#1054187
13Message-ID: <alpine.DEB.2.11.1408181058220.30583@tglase.lan.tarent.de>
14User-Agent: Alpine 2.11 (DEB 23 2013-08-11)
15MIME-Version: 1.0
16Content-Type: TEXT/PLAIN; charset=US-ASCII
17
18-----BEGIN PGP MESSAGE-----
19Version: GnuPG v2
20
21hIwDTFSKP3rBSXcBBAClcHW9/6kw8i+XkMes47vcmGBCjIC0UysqkVYyNqT2Y6tb
22s7pdfZFQPVWbdYoxP0WLzGgNFEWttlojWJmaTNiDVLOP22hFuJL3LUxesC1cWE+6
23foCkENDI2YnkAw4o5HTrmHoBlG7N/Nzzu3+1kfUVANSoAhgWd5WJDsXyvPMoD9LA
247gHZZmq4bK5OwTHvAvdUOstCGd6Wqj5zkVXT59WOfYxYLcrGZ8I62lBS1/90TlJe
25iEolBoaufZT7K2YW7k/+DPYgRIzvWISTccPWpcS7OOyifvK4zOFJeGsVq/DowP52
26Zt1xQj1En5CVUT/MkpvS1rB4BfSuhJETZdtUGveUe0HhcAzbnbIJULdK0p1XAo4O
27q84vmOVD0BtKJVy/+rIW7h4aOr8C66HNDKLiUzWtdEaG97GQwhpQZ05JNsulG9tV
28wyP6UWmDMY/5YuRoVHOYx8NXORHX4E5P151Tr5Fted9TpXI/gOTHHyPK5AiiDG6U
29ja4fgkO6hYnjHxqqooxfGj+pg5atynnbMTALfWoXxmqyKrIB+SKqnsw+sCL3ro2x
30j54EGZZ9wM6AYDQ48lJV5beWgQ55r28HxlhPNl/driNkMZHUazAdsubWo5NqJPXl
31HrHQ4lv53ZUohbpVvdkmsldWhA5me7yRhQHytTQMMfadmSiYZVsy53siQ/5gEhUv
32DQ4ggpUjf8twqR+5TLue5/r/fRXkGfKr5U1w4qcMcFcGwEIbwE+qtIDY0Cw/+xU=
33=Ecl0
34-----END PGP MESSAGE-----
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox.html
deleted file mode 100644
index 3ed4e0fb..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox.html
+++ /dev/null
@@ -1,47 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
15 <tr class="signOkKeyOkH">
16 <td dir="ltr">
17 <table cellspacing="0" cellpadding="0" width="100%">
18 <tr>
19 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
20 <td align="right">
21 <a href="kmail:showSignatureDetails">Show Details</a>
22 </td>
23 </tr>
24 </table>
25 </td>
26 </tr>
27 <tr class="signOkKeyOkB">
28 <td>
29 <div class="noquote">
30 <div dir="ltr">This is a utf-8 message you see - öäüß@ł€¶ŧ←↓→øþ</div>
31 </div>
32 </td>
33 </tr>
34 <tr class="signOkKeyOkH">
35 <td dir="ltr">End of signed message</td>
36 </tr>
37 </table>
38 </td>
39 </tr>
40 <tr class="encrH">
41 <td dir="ltr">End of encrypted message</td>
42 </tr>
43 </table>
44 </div>
45 </div>
46 </body>
47</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox.tree
deleted file mode 100644
index ea8223fd..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-inline-wrong-charset-encrypted.mbox.tree
+++ /dev/null
@@ -1,4 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::TextMessagePart
3 * MimeTreeParser::EncryptedMessagePart
4 * MimeTreeParser::SignedMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox
deleted file mode 100644
index ba85df86..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox
+++ /dev/null
@@ -1,129 +0,0 @@
1Return-Path: <sender@example.org>
2Sender: sender@example.org
3From: Quonk <sender@example.org>
4X-Pgp-Agent: GPGMail
5Content-Type: multipart/signed; boundary="Apple-Mail=_12345678-1234-1234-1234-12345678"; protocol="application/pgp-signature"; micalg=pgp-sha512
6Subject: PDF
7Date: Mon, 16 Jan 2017 15:14:51 +0100
8Message-Id: <199E2891-3080-42B6-ABCD-1230B78EBABC@example.org>
9To: Konqi <konqui@example.org>
10Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
11
12
13--Apple-Mail=_12345678-1234-1234-1234-12345678
14Content-Type: multipart/alternative;
15 boundary="Apple-Mail=_23456789-1234-1234-1234-12345678"
16
17
18--Apple-Mail=_23456789-1234-1234-1234-12345678
19Content-Transfer-Encoding: quoted-printable
20Content-Type: text/plain;
21 charset=utf-8
22
23
24
25=E2=80=A6
26Quonk
27Klar=C3=A4lvdalens Datakonsult AB, a KDAB Group company
28Sweden (HQ) +46-563-540090, Germany +49-30-521325470
29KDAB - The Qt, C++ and OpenGL Experts | www.kdab.com
30
31
32--Apple-Mail=_23456789-1234-1234-1234-12345678
33Content-Type: multipart/mixed;
34 boundary="Apple-Mail=_34567890-1234-1234-1234-12345678"
35
36
37--Apple-Mail=_34567890-1234-1234-1234-12345678
38Content-Transfer-Encoding: 7bit
39Content-Type: text/html;
40 charset=us-ascii
41
42<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">pre attachment</div></body></html>
43--Apple-Mail=_34567890-1234-1234-1234-12345678
44Content-Disposition: attachment; filename="image.png"
45Content-Transfer-Encoding: base64
46Content-Type: image/png; name="image.png"
47
48iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAb
49rwAAG68BXhqRHAAAAAd0SU1FB9gHFg8aNG8uqeIAAAAGYktHRAD/AP8A/6C9p5MAAAkqSURBVHja
505VV7cFTVGf/OPefeu3fv3t1NdhMSCHkKASEpyEsaGwalWEWntLV1Wu0fdOxAx9Iq0xntAwac6ehY
51p+rwKLbjjLRFh9JadURKRGgFQTTECCYQE9nNgzzYZDe7m33d1+l3tpOOU61T2tF/+s1s7pzn9/t+
52v993Av/3QT6FO6WdO/d+M55Il8rMOdrT0x3Zt++3+c8EgM/nozseeviJiYmpe1zOQdM8BOOCIku/
53lIj1VrQ/0r9n9+78xwLgeAA3w4fHXV1d5Omnn6aapumlJSVVqalUJJvJZRdcu0RSfZQsaW7mjfPm
54cbF9+/btEIlEaq6Z03whXyhIjDFuGIZEKSP5fMFRVcVNT2Vf0jzsmMxYGtel9rff/vM/M8bjcZpM
55Jp1XX32VNDc3e7ovRP3JyZGVNdXVd1FGGwKBQEM8njiWTKV36IHgEACwibGx62LjU/cBd01Zljoc
56p9DHmLbHsmyK1UuKooJt24IMcLE+y3L45eEYLS8LgWH4YXR0bAPZtGmTVFvfoBZMEzKpFKmqqmqp
57qane4DhOteH3L1FkWZVlGSzLAtd1Oe4773C4LxoZvDWXh82OY2MtwAuFvCvSyDIFXdelYDDIvF4d
58xPzA0AgXFStMcWPxBPGoKvXpPh6JDG5hK1Zcv1H36Xc6tsMs21EMQ69CLSts2wGkDygTyW2CP8gX
59TKLIyvx0OrdDUXyLKXVUkdSne4QKtFAwuWmabjAYkDyqAgG/jziORh1EKaonkkQt2yRZRC5JHEGn
60L7OKyopNqqo2IbWQjqWgLOwFBFKsuGDa4PVyIssMk1sCACCjimXbrbquYKW41zJJOpXkeARyeZNQ
61SUKwHEqCKnBuAybkZeFSmssVSDKdhlBpCRgIcnQsdvKPB19sY4rMNIaH0BhQUVHKvXgpIiQF0wK/
624QORnOEayoDzOSBMXK4BSgpeTcMECqiqTDKZHDKmct3LCI55Kp0mQgK/3yDYkgIc3kNhfHzCkRk9
63p6nk+yPD3SmWzeZiKNkciUrg2g5BjQWdSBchiEvQjzoWAFkUYPDrCjBFUEJ8AhSIRyl2jcfjEL9h
64AFJODL8B6H7IZrNIt2g3B1mysShdQhmbT58+ExRdx3L5/PNomGU4kJkuA9ILYn+JP4CXOoDUoWO9
65IBhCSBCLTYCK+rqOg8CKvY6JPQhGxjkX1zyAdwrgAhTKWBDmxTUTC7Tcy5dHBiilL7cdaTsNGAwP
667o32D4Q9HnWTrvsCiqIgdWgqDkJfkKgDU1MZcBGMhbKgj2B0LIle8eNhgiBsoMwFEY7rQDqVwlo5
67esUE/AAR81gUYIUT8UR2//4/rK+pLjs3MhIFEVJN9WwXK2oM+P1BREpQO0hjwkw+BzJWY1oOXB5L
68w9DIOGTQvYS4UFqigR9ZwUqEXFghVop059AjonqcAIZrqCKg31AS3OU66Adf4sabWqKvvHIYpoNh
69y+Vj4xMHVEW93eUuo0izhT4oRbcSIoALbRle4AVVkfBup6g9thwCzRX1VRQmdMeqLVETEIkW2ZNx
70H8oqzqAfXCGJEQ6XBQEgNQ2A7tq1C1a1tvaattOOrVFOqVSLCQhqU6QPx+DTsOU0GavLYUV20Qv4
71rEIymYNQuB48Wkg8QTA0NIQeYKB6NGTgH90jIcJEMikAi1dRRo9NLV583ek33jjpFAGIPw8++IAj
72e9SIRGm5wliraVosnTWLmmemUugBkTiPSS3AtgV8VQA9A8LxdfULYXBoEKv2wMhIn2BHGFR0DZ6d
73glQ6hUDT6A/RWVSSmfx5DjxRV1vzVkdHBzDAWLNmDezc+aQVqqz5dSY52Z63nLn9A33lI9myLXNL
74xv0Fq3gWutMN0BToxcso+AN+cKmOXI5A9P12mKDzYNXcZXDq1F+h+IboFgzb1VAhDULeJpxwC19G
75g/uMgOXVfXW1tbWCYM6mtdi8+YfiM4m/Y1UrHzkergyXz/3czImCnRjuHiW3qxpPqGFPy6SpHJC9
76IR+Sm+2N8i/dcMOMZdGeshcrS/S58+c3zU2Z8oVD50cbVfP8M4pGkymoUxLxsUzOVhtmQ+5432Rg
77oj6QOLFj28/caQk+EjMXraUV1eW+8dH06StQZnlnNbQefGTD92pWfu3I6TOT8oY7brv4hWUt3xiw
782OrlDVVdRslsd2Fd469Q8sUB3c8uOW49SdHX1rbcePhoz3B7feuqlt5oZtBTv+ioSdXc7q3fHQaM
79fwtg6Vd/dEvn8Qssnzg/0Ns56jRcO6Nw4d1Af+/RH0/cdv+O/fRK7KnmBXPWGsQeDPhK9oWC6hdd
80R3pdUcg88Tx7U7Ej1y1qMjreGwjt/cnaF2YtvCXQe7bzxLkj+/sunT0Ry00OwHRI8DERLqeNmqGV
81JZJVC6Yu7UxMOfLFlV9pWQcYp57/013rb1u9ua29b0Ch4bsl4tKLY5P1sgxNJzsHDj136KzS3NTk
829mTNusPvXJLrbnjUe/b16FDfsZ/3xC8d4/HoCQ4Anwzg91vWPL7+3pvvDM806sTY4IVyMxfrojO3
83BVubbyJMhnVVM3y+l187/nChIJ2ZpSs9hMD4qC6t6x6+0gkAoRC33/Sb8RdmXj9nzvWraivhP47g
84AyHxKb1mfWkRYHCjMb30nafeeWzerU9963w3L3/02c4f7D0y0NXTx3f3D/JTb7bzxpeODu55+PGT
85yy5F+ZmeD/iSrh5efeJd/hGZP5GBux+6cysY3w7H+16IVy65V6trnn3P9JqVjQ3JuSsdHhWW6hIL
86NuhyUpJgEF/ofSVBeLBuVtVjd3y55SHXhQ8UBht0DR4r98Fs+IRg/zrxlz2/2A7p5yYBY93Gu+4f
87H5xojLwOxfjd/WufOHhQ/IcD7eYVC5YyCjFMfkVV4NpMFvpTachoZeDaNryLnliOczsUCv1XBWD8
88YjF5MWJ9kcT757qenR7vf4bDoqWwHCvUUfPNsQQMWSZAZTlsw7nxYQQTcuDrjgQuPn7z/D7YivNt
89nPPfEDzwqcU75/j6SD/f8uG5vXs5dL7Hjb+d4gp8mnF8nAOabjcac+OBAxyuNiT4HyNwGZYgu0RW
90IDt/Icz4zAC0tXE4183rQ6XwU9uBXgLQ5Teg7GIv1+EqgsF/GY4DtCQALZMp2ITttmqoHzpWr756
91o/0d59+Lh3Y1HHcAAAAASUVORK5CYII=
92--Apple-Mail=_34567890-1234-1234-1234-12345678
93Content-Transfer-Encoding: quoted-printable
94Content-Type: text/html;
95 charset=utf-8
96
97<html><head><meta name="qrichtext" content="1" /><style type="text/css">
98p, li { white-space: pre-wrap; }
99</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
100<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p>
101</body></html>
102
103--Apple-Mail=_34567890-1234-1234-1234-12345678--
104
105--Apple-Mail=_23456789-1234-1234-1234-12345678--
106
107--Apple-Mail=_12345678-1234-1234-1234-12345678
108Content-Transfer-Encoding: 7bit
109Content-Disposition: attachment;
110 filename=signature.asc
111Content-Type: application/pgp-signature;
112 name=signature.asc
113Content-Description: Message signed with OpenPGP using GPGMail
114
115-----BEGIN PGP SIGNATURE-----
116
117iQEzBAEBCAAdFiEEG6Mjkys/qoJhMseejZhgxY8kbeYFAlh/rcwACgkQjZhgxY8k
118beYaoQf+Miuj4cnVumYXMopVMHJs6AK6D+uKO4jXHl/XUK3TOg17kFUZDEN/9JFd
119SCN9oD5emzpBl4GSmYBbjvLvXTHTLHviVD6In35+wgMlQL+xfAv91Dx56QslCQMo
120UhDYGgFPiEAfCY2UozQD/R3KWOHFB9bNdtOM0hdT84D35W2PZhzTlz2q3hpq3bYw
121lNhFVebqURh9OEAZglB3Q9oDE13PJDtRLflKquC5ZU8N4Bj23TCOgxv4FzSyyAn/
122XalEKdwYrkZ8p4rRtd0YvAVevDUC4pQNGTgfsXgldoPEGUBXsdlczLPEj2sjLvNu
123HX1GMDrZL/+7DZsURYV5DjhsqWzExQ==
124=q0F6
125-----END PGP SIGNATURE-----
126
127--Apple-Mail=_12345678-1234-1234-1234-12345678--
128
129
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.html
deleted file mode 100644
index 234eaae4..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.html
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signWarn">
9 <tr class="signWarnH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Not enough information to check signature validity.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signWarnB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.2"/>
26 <div id="attachmentDiv1.2">
27 <a name="att1.2.1"/>
28 <div id="attachmentDiv1.2.1">
29 <div style="position: relative">
30 <div class="">pre attachment</div>
31 </div>
32 </div>
33 <a name="att1.2.2"/>
34 <div id="attachmentDiv1.2.2">
35 <hr/>
36 <div>
37 <a href="attachment:1.2.2?place=body"><img align="center" height="48" width="48" src="file:image-png.svg" border="0" style="max-width: 100%" alt=""/>image.png</a>
38 </div>
39 <div/>
40 </div>
41 <a name="att1.2.3"/>
42 <div id="attachmentDiv1.2.3">
43 <div style="position: relative">
44 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p>
45 </div>
46 </div>
47 </div>
48 </div>
49 </td>
50 </tr>
51 <tr class="signWarnH">
52 <td dir="ltr">End of signed message</td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </body>
58</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.inProgress.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.inProgress.html
deleted file mode 100644
index b5236fe4..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.inProgress.html
+++ /dev/null
@@ -1,49 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signInProgress">
9 <tr class="signInProgressH">
10 <td dir="ltr">Please wait while the signature is being verified...</td>
11 </tr>
12 <tr class="signInProgressB">
13 <td>
14 <a name="att1"/>
15 <div id="attachmentDiv1">
16 <a name="att1.2"/>
17 <div id="attachmentDiv1.2">
18 <a name="att1.2.1"/>
19 <div id="attachmentDiv1.2.1">
20 <div style="position: relative">
21 <div class="">pre attachment</div>
22 </div>
23 </div>
24 <a name="att1.2.2"/>
25 <div id="attachmentDiv1.2.2">
26 <hr/>
27 <div>
28 <a href="attachment:1.2.2?place=body"><img align="center" height="48" width="48" src="file:image-png.svg" border="0" style="max-width: 100%" alt=""/>image.png</a>
29 </div>
30 <div/>
31 </div>
32 <a name="att1.2.3"/>
33 <div id="attachmentDiv1.2.3">
34 <div style="position: relative">
35 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some <span style=" font-weight:600;">HTML</span> text</p>
36 </div>
37 </div>
38 </div>
39 </div>
40 </td>
41 </tr>
42 <tr class="signInProgressH">
43 <td dir="ltr">End of signed message</td>
44 </tr>
45 </table>
46 </div>
47 </div>
48 </body>
49</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.tree
deleted file mode 100644
index 3ade4efe..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-apple.mbox.tree
+++ /dev/null
@@ -1,3 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::SignedMessagePart
3 * MimeTreeParser::AlternativeMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox
deleted file mode 100644
index 70bf4ef8..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox
+++ /dev/null
@@ -1,117 +0,0 @@
1Return-Path: <kde-pim-bounces@kde.org>
2X-Sieve: CMU Sieve 2.3
3X-Virus-Scanned: amavisd-new at site
4Authentication-Results: linux.site (amavisd-new); dkim=pass (1024-bit key)
5 header.d=kde.org
6Received: from postbox.kde.org (localhost.localdomain [127.0.0.1])
7 by postbox.kde.org (Postfix) with ESMTP id 867B8BF274;
8 Sat, 22 Aug 2015 09:32:21 +0000 (UTC)
9DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kde.org; s=default;
10 t=1440235945; bh=WhGhdxvdvRs04JdzjAkPcBVPmx7putlUE3ka9dvMIoc=;
11 h=From:To:Date:Subject:Reply-To:List-Id:List-Unsubscribe:List-Post:
12 List-Help:List-Subscribe:From;
13 b=mvxeMMGebkZKq7hekRypkPvt6S8lidA/8vQ3AC5Kft8HDmj8lDUpvOo0VXwCF0OG+
14 iAOPKxYtxclf8PgYvgK8NIzr56CwcdlNm3/PpoSe20P3I1DGFpDDMFtW5tOD05SSHz
15 5L6PCQyb+KFW1GrXgcm+eHshzJh3U8nHcyd8Vw2E=
16X-Original-To: kde-pim@kde.org
17Delivered-To: kde-pim@localhost.kde.org
18X-Virus-Scanned: amavisd-new at site
19From: Volker Krause <vkrause@kde.org>
20To: KDEPIM <kde-pim@kde.org>
21Date: Sat, 22 Aug 2015 11:31:38 +0200
22Message-ID: <11737387.KAAPH2KlE3@vkpc5>
23Organization: KDE
24User-Agent: KMail/4.14.3 (Linux/3.16.6-2-desktop; KDE/4.14.7; x86_64;
25 git-c97b13e; 2014-12-30)
26MIME-Version: 1.0
27Subject: [Kde-pim] Phabricator Project Setup
28X-BeenThere: kde-pim@kde.org
29X-Mailman-Version: 2.1.16
30Precedence: list
31Reply-To: KDE PIM <kde-pim@kde.org>
32List-Id: KDE PIM <kde-pim.kde.org>
33List-Unsubscribe: <https://mail.kde.org/mailman/options/kde-pim>,
34 <mailto:kde-pim-request@kde.org?subject=unsubscribe>
35List-Post: <mailto:kde-pim@kde.org>
36List-Help: <mailto:kde-pim-request@kde.org?subject=help>
37List-Subscribe: <https://mail.kde.org/mailman/listinfo/kde-pim>,
38 <mailto:kde-pim-request@kde.org?subject=subscribe>
39Content-Type: multipart/mixed; boundary="===============1910646461178264940=="
40Errors-To: kde-pim-bounces@kde.org
41Sender: "kde-pim" <kde-pim-bounces@kde.org>
42
43
44--===============1910646461178264940==
45Content-Type: multipart/signed; boundary="nextPart2440608.7aDuJBW7cK"; micalg="pgp-sha1"; protocol="application/pgp-signature"
46
47--nextPart2440608.7aDuJBW7cK
48Content-Transfer-Encoding: quoted-printable
49Content-Type: text/plain; charset="us-ascii"
50
51Hi,
52
53I've talked to Ben, the current Phabricator test setup would actually b=
54e=20
55usable for "production" use for task/project management for us, without=
56=20
57causing the sysadmins unreasonable trouble when migrating to the full=20=
58
59production deployment of Phabricator eventually.
60
61Phabricator project layout it orthogonal to repo layout, so we can stru=
62cture=20
63this however we want. Among other teams I see at least the following la=
64youts:
65- single project for everything
66- a project per release
67- a project per component/module (ie. close to the repo layout)
68
69How do we want to structure this?
70
71I would start with a single project to not fragment this too much, as w=
72e have=20
73a relatively small team actually looking into this, so everyone is look=
74ing at=20
75most sub-projects anyway. And should we eventually hit scaling limits, =
76we can=20
77always expand this I think.
78
79We of course should also talk about what we actually want to put in the=
80re. My=20
81current motivation is having a place to collect the tasks for getting m=
82ore of=20
83the former pimlibs into KF5, and anything else I run into on the way th=
84ere=20
85that we eventually should clean up/improve.
86
87regards,
88Volker
89
90--nextPart2440608.7aDuJBW7cK
91Content-Type: application/pgp-signature; name="signature.asc"
92Content-Description: This is a digitally signed message part.
93Content-Transfer-Encoding: 7Bit
94
95-----BEGIN PGP SIGNATURE-----
96Version: GnuPG v2
97
98iD8DBQBV2EF9f5bM1k0S0kcRAk9cAJ4vHEh9JkT3Jy3EfxII7nP9HPmxrQCgjeLF
99eYXCyN9NRAyC6CHeNnWZN10=
100=Y8W4
101-----END PGP SIGNATURE-----
102
103--nextPart2440608.7aDuJBW7cK--
104
105
106--===============1910646461178264940==
107Content-Type: text/plain; charset="utf-8"
108MIME-Version: 1.0
109Content-Transfer-Encoding: base64
110Content-Disposition: inline
111
112X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KS0RFIFBJTSBt
113YWlsaW5nIGxpc3Qga2RlLXBpbUBrZGUub3JnCmh0dHBzOi8vbWFpbC5rZGUub3JnL21haWxtYW4v
114bGlzdGluZm8va2RlLXBpbQpLREUgUElNIGhvbWUgcGFnZSBhdCBodHRwOi8vcGltLmtkZS5vcmcv
115
116--===============1910646461178264940==--
117
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox.html
deleted file mode 100644
index 50eddaa6..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox.html
+++ /dev/null
@@ -1,78 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="signWarn">
11 <tr class="signWarnH">
12 <td dir="ltr">
13 <table cellspacing="0" cellpadding="0" width="100%">
14 <tr>
15 <td>Not enough information to check signature validity.</td>
16 <td align="right">
17 <a href="kmail:showSignatureDetails">Show Details</a>
18 </td>
19 </tr>
20 </table>
21 </td>
22 </tr>
23 <tr class="signWarnB">
24 <td>
25 <a name="att1.1"/>
26 <div id="attachmentDiv1.1">
27 <div class="noquote">
28 <div dir="ltr">Hi,</div>
29 <br/>
30 <div dir="ltr">I've talked to Ben, the current Phabricator test setup would actually be&nbsp;</div>
31 <div dir="ltr">usable for "production" use for task/project management for us, without&nbsp;</div>
32 <div dir="ltr">causing the sysadmins unreasonable trouble when migrating to the full&nbsp;</div>
33 <div dir="ltr">production deployment of Phabricator eventually.</div>
34 <br/>
35 <div dir="ltr">Phabricator project layout it orthogonal to repo layout, so we can structure&nbsp;</div>
36 <div dir="ltr">this however we want. Among other teams I see at least the following layouts:</div>
37 <div dir="ltr">- single project for everything</div>
38 <div dir="ltr">- a project per release</div>
39 <div dir="ltr">- a project per component/module (ie. close to the repo layout)</div>
40 <br/>
41 <div dir="ltr">How do we want to structure this?</div>
42 <br/>
43 <div dir="ltr">I would start with a single project to not fragment this too much, as we have&nbsp;</div>
44 <div dir="ltr">a relatively small team actually looking into this, so everyone is looking at&nbsp;</div>
45 <div dir="ltr">most sub-projects anyway. And should we eventually hit scaling limits, we can&nbsp;</div>
46 <div dir="ltr">always expand this I think.</div>
47 <br/>
48 <div dir="ltr">We of course should also talk about what we actually want to put in there. My&nbsp;</div>
49 <div dir="ltr">current motivation is having a place to collect the tasks for getting more of&nbsp;</div>
50 <div dir="ltr">the former pimlibs into KF5, and anything else I run into on the way there&nbsp;</div>
51 <div dir="ltr">that we eventually should clean up/improve.</div>
52 <br/>
53 <div dir="ltr">regards,</div>
54 <div dir="ltr">Volker</div>
55 </div>
56 </div>
57 </td>
58 </tr>
59 <tr class="signWarnH">
60 <td dir="ltr">End of signed message</td>
61 </tr>
62 </table>
63 </div>
64 <a name="att2"/>
65 <div id="attachmentDiv2">
66 <div class="noquote">
67 <div dir="ltr">_______________________________________________</div>
68 <div dir="ltr">KDE PIM mailing list <a href="mailto:kde-pim@kde.org">kde-pim@kde.org</a></div>
69 <div dir="ltr">
70 <a href="https://mail.kde.org/mailman/listinfo/kde-pim">https://mail.kde.org/mailman/listinfo/kde-pim</a>
71 </div>
72 <div dir="ltr">KDE PIM home page at <a href="http://pim.kde.org/">http://pim.kde.org/</a></div>
73 </div>
74 </div>
75 </div>
76 </div>
77 </body>
78</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox.tree
deleted file mode 100644
index 2753978c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-base64-mailman-footer.mbox.tree
+++ /dev/null
@@ -1,7 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::SignedMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
6 * MimeTreeParser::AttachmentMessagePart
7 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox
deleted file mode 100644
index 7939af83..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox
+++ /dev/null
@@ -1,52 +0,0 @@
1From: firstname.lastname@example.com
2To: test@kolab.org
3Subject: OpenPGP signed+encrypted with 2 text attachments
4Date: Sun, 30 Aug 2015 12:01:20 +0200
5Message-ID: <4368981.7YjI8cQ7Br@vkpc5>
6X-KMail-Identity: 402312391
7X-KMail-Dictionary: en_US
8User-Agent: KMail/5.0.42 pre (Linux/3.16.6-2-desktop; KDE/5.14.0; x86_64; ; )
9MIME-Version: 1.0
10Content-Type: multipart/encrypted; boundary="nextPart3246504.5GAivIUY6Q"; protocol="application/pgp-encrypted"
11
12--nextPart3246504.5GAivIUY6Q
13Content-Type: application/pgp-encrypted
14Content-Disposition: attachment
15Content-Transfer-Encoding: 7Bit
16
17Version: 1
18--nextPart3246504.5GAivIUY6Q
19Content-Type: application/octet-stream
20Content-Disposition: inline; filename="msg.asc"
21Content-Transfer-Encoding: 7Bit
22
23-----BEGIN PGP MESSAGE-----
24Version: GnuPG v2
25
26hQEMAwzOQ1qnzNo7AQf9Ge9nFjtqLOKSQNhobS+0iCB2GUdLP7LCIWu6gBo9pWa+
279wCNLxwmhqWOYv37RAk6v5VXjCYUX3/7UF7e7epSqo7YjS7VsUOow0gszQjJqocK
28Gd1T1oyNknza6oaRGgVeWPOZVAPb+Gj+3yS8VZa33Aq2ay7F7eI8dvRUN7Z3TuAh
29BOVV+itwHHzanfNG8RoCvokcE1vkANfvI3u7R4Q93U8Q+Qmjh1L5ypPe37N5BtAF
30UCPCiD9XySHjm5PyXx8ImrJDeUgFs1YhYox4B6NKsCcmm7R8NdYZYGNo1kzR4yKV
31FzMu1NUU/bwtvrpRXLe4dBL1pEkO2PpuMYDUR9+WVNLpAafTDbeIHPi/Z8v48seQ
32JxscRehfOB3DG1xrvQTMFJc3UJEBqNMkM9gOxLKOQcCcZp79FMsfWB7EjjlPR1Oh
33gyA5NR+4HxNw75Q5FpZ7qziWvIrb1Kzwfbsb9Dimx+MmiNMX9kUEPqkPo4pspwZ9
34pLCfjYUnikcnYyQ0b2ojsjQmLotYlz8mK0GH9L40zfFb1+oYfuu4Y9FPzHdPzNjx
35aFRY8cJQy1CNkCITsz53kni5rk3zVsapq0+NeBDEBYoUqX815fo0W+HVF7/j/uhT
36lPkJhRnJZPwOr5XgzPk3Yk9GlSRLJiqKF4/G8ya/nKyiNIebKM7DTcldWCmZM95B
37BIftaRN4hvVBhl0ElFnZg0xLP1AePFuuplRQTDuW8gpaNKrxwXiF3d4XJdVmjh/p
38YmnieIhbogUHFXugc3g9rE8c3oHA8b514ajSHUm9DXc0cXqw/DrsxXZtKXb+IDpF
39uv9AiM7bSU7I0h/AlaAL5uU0mL58XhkXXFQtaTbMS+u4Rv/Ie1IsnlWR4QSc4m7x
4091rfC1fIf/U43wwwnR+UjIRyr2vWcgTTpwnsZFDD8eSoJ8WqinazJRlMud6Sv+L6
41gI2wiCYyEYHrFEHy0WuS2nUSMNl5AWm31zB+erfKSLZr4EIFBIy4dJWZKwYhi46Q
42pDbw1Svf7xVdHix+5UkkYy3AY70ipf5bxA7FTJ1geJa86VKShDkqVpU6EtT+YQIJ
437geWCyskT0DTaPp6qc8QpjajmRYssDcjiTke5WiqLQAjm8BIuny0fNm6kNC8KMS7
44eGmaBI2nB92bgrqlAW+LhvW95YB0dfO8beg3jKk8s6OJ4gicGFEFp6hXFfEsEZiv
45gi7Q2QCVFvCV11884H8rtZYmMRFGmuVUvm6xh/z1xicmfSy0YUowgkA3jpi7o913
46fqmYOHAwzCxv8Zp7xBf9hLT8DxMXdxqYUnJ+FaEMRcFkJ1MAFBpQ9uDbbqAz5bd5
47F3d6o0JSleOOTDlNH7wpN15HYtaCx9v3mXLN9FY4Y1g4mE8wdU0JZn7sFEmgmAkV
48/vj9khHS6eB01GPiCA6sy/u2tSdCQQ==
49=1GHi
50-----END PGP MESSAGE-----
51
52--nextPart3246504.5GAivIUY6Q--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox.html
deleted file mode 100644
index 53856e74..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox.html
+++ /dev/null
@@ -1,88 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <a name="att1.1"/>
35 <div id="attachmentDiv1.1">
36 <div class="noquote">
37 <div dir="ltr">this is the main body</div>
38 </div>
39 </div>
40 <a name="att1.2"/>
41 <div id="attachmentDiv1.2">
42 <table cellspacing="1" class="textAtm">
43 <tr class="textAtmH">
44 <td dir="ltr">attachment1.txt</td>
45 </tr>
46 <tr class="textAtmB">
47 <td>
48 <div class="noquote">
49 <div dir="ltr">this is one attachment</div>
50 </div>
51 </td>
52 </tr>
53 </table>
54 </div>
55 <a name="att1.3"/>
56 <div id="attachmentDiv1.3">
57 <table cellspacing="1" class="textAtm">
58 <tr class="textAtmH">
59 <td dir="ltr">attachment2.txt</td>
60 </tr>
61 <tr class="textAtmB">
62 <td>
63 <div class="noquote">
64 <div dir="ltr">this is the second attachment</div>
65 </div>
66 </td>
67 </tr>
68 </table>
69 </div>
70 </div>
71 </td>
72 </tr>
73 <tr class="signOkKeyOkH">
74 <td dir="ltr">End of signed message</td>
75 </tr>
76 </table>
77 </div>
78 </div>
79 </td>
80 </tr>
81 <tr class="encrH">
82 <td dir="ltr">End of encrypted message</td>
83 </tr>
84 </table>
85 </div>
86 </div>
87 </body>
88</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox.tree
deleted file mode 100644
index 6705a4d7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted-two-attachments.mbox.tree
+++ /dev/null
@@ -1,10 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::SignedMessagePart
4 * MimeTreeParser::MimeMessagePart
5 * MimeTreeParser::TextMessagePart
6 * MimeTreeParser::MessagePart
7 * MimeTreeParser::AttachmentMessagePart
8 * MimeTreeParser::MessagePart
9 * MimeTreeParser::AttachmentMessagePart
10 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox
deleted file mode 100644
index 6d723d52..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox
+++ /dev/null
@@ -1,47 +0,0 @@
1From: OpenPGP Test <test@kolab.org>
2To: test@kolab.org
3Subject: OpenPGP signed and encrypted
4Date: Tue, 07 Sep 2010 18:08:44 +0200
5User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; )
6MIME-Version: 1.0
7Content-Type: multipart/encrypted; boundary="nextPart25203163.0xtB501Z4V"; protocol="application/pgp-encrypted"
8Content-Transfer-Encoding: 7Bit
9
10
11--nextPart25203163.0xtB501Z4V
12Content-Type: application/pgp-encrypted
13Content-Disposition: attachment
14
15Version: 1
16--nextPart25203163.0xtB501Z4V
17Content-Type: application/octet-stream
18Content-Disposition: inline; filename="msg.asc"
19
20-----BEGIN PGP MESSAGE-----
21Version: GnuPG v2.0.15 (GNU/Linux)
22
23hQEMAwzOQ1qnzNo7AQf7BFYWaGiCTGtXY59bSh3LCXNnWZejblYALxIUNXOFEXbm
24y/YA95FmQsy3U5HRCAJV/DY1PEaJz1RTm9bcdIpDC3Ab2YzSwmOwV5fcoUOB2df4
25KjX19Q+2F3JxpPQ0N1gHf4dKfIu19LH+CKeFzUN13aJs5J4A5wlj+NjJikxzmxDS
26kDtNYndynPmo9DJQcsUFw3gpvx5HaHvx1cT4mAB2M5cd2l+vN1jYbaWb0x5Zq41z
27mRNI89aPieC3rcM2289m68fGloNbYvi8mZJu5RrI4Tbi/D7Rjm1y63lHgVV6AN88
28XAzRiedOeF99LoTBulrJdtT8AAgCs8nCetcWpIffdtLpAZiZkzHmYOU7nqGxqpRk
29OVeUTrCn9DW2SMmHjaP4IiKnMvzEycu5F4a72+V1LeMIhMSjTRTq+ZE2PTaqH59z
30QsMn7Nb6GlOICbTptRKNNtyJKO7xXlpT7YtvNKnCyEOkH2XrYH7GvpYCiuQ0/o+7
31SxV436ZejiYIg6DQDXJCoa2DXimGp0C10Jh0HwX0BixpoNtwEjkGRYcX6P/JzkH0
32oBood4Ly+Tiu6iVDisrK3AVGYpIzCrKkE9qULTw4R/jFKR2tcCqGb7Fxtk2LV7Md
333S+DyOKrvKQ5GNwbp9OE97pwk+Lr1JS3UAvj5f6BR+1PVNcC0i0wWkgwDjPh1eGD
34enMQmorE6+N0uHtH2F4fOxo/TbbA3+zhI25kVW3bO03xyUl/cmQZeb52nvfOvtOo
35gSb2j6bPkzljDMPEzrtJjbFtGHJbPfUQYJgZv9OE2EQIqpg6goIw279alBq6GLIX
36pkO+dRmztzjcDyhcLxMuQ4cTizel/0J/bU7U6lvwHSyZVbT4Ev+opG5K70Hbqbwr
37NZcgdWXbSeesxGM/oQaMeSurOevxVl+/zrTVAek61aRRd1baAYqgi2pf2V7y4oK3
38qkdxzmoFpRdNlfrQW65NZWnHOi9rC9XxANIwnVn3kRcDf+t2K4PrFluI157lXM/o
39wX91j88fazysbJlQ6TjsApO9ETiPOFEBqouxCTtCZzlUgyVG8jpIjdHWFnagHeXH
40+lXNdYjxnTWTjTxMOZC9ySMpXkjWdFI1ecxVwu6Ik6RX51rvBJAAXWP75yUjPKJ4
41rRi5oQl/VLl0QznO7lvgMPtUwgDVNWO/r7Kn9B387h9fAJZ/kWFAEDW2yhAzABqO
42rCNKDzBPgfAwCnikCpMoCbOL7SU8BdbzQHD8/Lkv4m0pzliHQ/KkGF710koBzTmF
43N7+wk9pwIuvcrEBQj567
44=GV0c
45-----END PGP MESSAGE-----
46
47--nextPart25203163.0xtB501Z4V--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox.html
deleted file mode 100644
index 86a964b8..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox.html
+++ /dev/null
@@ -1,55 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <div class="noquote">
35 <div dir="ltr">encrypted message text</div>
36 </div>
37 </div>
38 </td>
39 </tr>
40 <tr class="signOkKeyOkH">
41 <td dir="ltr">End of signed message</td>
42 </tr>
43 </table>
44 </div>
45 </div>
46 </td>
47 </tr>
48 <tr class="encrH">
49 <td dir="ltr">End of encrypted message</td>
50 </tr>
51 </table>
52 </div>
53 </div>
54 </body>
55</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox.tree
deleted file mode 100644
index 7d5bbeb7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-encrypted.mbox.tree
+++ /dev/null
@@ -1,5 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::SignedMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox
deleted file mode 100644
index dbca8d45..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox
+++ /dev/null
@@ -1,126 +0,0 @@
1Return-Path: <plasma-devel-bounces@kde.org>
2Delivered-To: einar@heavensinferno.net
3Received: from localhost (localhost.localdomain [127.0.0.1])
4 by akihabara.dennogumi.org (Postfix) with ESMTP id 15AB75CD846
5 for <einar@heavensinferno.net>; Mon, 8 Apr 2013 12:15:03 +0200 (CEST)
6Authentication-Results: akihabara.dennogumi.org; dkim=pass
7 (1024-bit key; insecure key) header.i=@kde.org header.b=vQ0NnJ9g;
8 dkim-adsp=pass
9X-Virus-Scanned: Debian amavisd-new at akihabara.dennogumi.org
10X-Spam-Flag: NO
11X-Spam-Score: -3.818
12X-Spam-Level:
13X-Spam-Status: No, score=-3.818 required=5 tests=[BAYES_50=0.8,
14 RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-2.328, T_DKIM_INVALID=0.01]
15 autolearn=unavailable
16Received: from akihabara.dennogumi.org ([127.0.0.1])
17 by localhost (akihabara.dennogumi.org [127.0.0.1]) (amavisd-new, port 10024)
18 with ESMTP id RMAq-XNJ040f for <einar@heavensinferno.net>;
19 Mon, 8 Apr 2013 12:14:44 +0200 (CEST)
20Received: from postbox.kde.org (postbox.kde.org [46.4.96.248])
21 by akihabara.dennogumi.org (Postfix) with ESMTP id 321675CD845
22 for <einar@heavensinferno.net>; Mon, 8 Apr 2013 12:14:44 +0200 (CEST)
23Authentication-Results: akihabara.dennogumi.org; dkim=pass
24 (1024-bit key; insecure key) header.i=@kde.org header.b=vQ0NnJ9g;
25 dkim-adsp=pass
26Received: from postbox.kde.org (localhost [IPv6:::1])
27 by postbox.kde.org (Postfix) with ESMTP id 9F5E1B37F95;
28 Mon, 8 Apr 2013 10:13:32 +0000 (UTC)
29DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kde.org; s=default;
30 t=1365416012; bh=ZJtmtbDLoGFwSyJUINdTk4UpuX+xzxcjGp7LSPrKNUs=;
31 h=From:To:Subject:Date:Message-ID:MIME-Version:Reply-To:List-Id:
32 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
33 Content-Type:Sender; b=vQ0NnJ9gjeyPLhPbQx6o9UxmILkS9KrhaKG6luAS/GR
34 6iR3HKXR3HE0BCkTMD5xmKL5ztFMGcU5e79fz0ch0sd2pnZ0y1WVw7KjCxsv/YtO9HM
35 OplAHmhwRI5zH8KKQbyvdPULvssI/ISdViAXmHw04hNPsBjsIGkTPgvNbPFuk=
36X-Original-To: plasma-devel@kde.org
37Delivered-To: plasma-devel@localhost.kde.org
38Received: from mail.bddf.ca (unknown [64.141.113.219])
39 by postbox.kde.org (Postfix) with ESMTP id 782C6B37BE6
40 for <plasma-devel@kde.org>; Mon, 8 Apr 2013 09:51:17 +0000 (UTC)
41Received: from freedom.localnet (242.13.24.31.ftth.as8758.net [31.24.13.242])
42 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
43 (No client certificate requested)
44 by mail.bddf.ca (Postfix) with ESMTPSA id 0CB712DC040
45 for <plasma-devel@kde.org>; Mon, 8 Apr 2013 03:51:16 -0600 (MDT)
46From: "Aaron J. Seigo" <aseigo@kde.org>
47To: plasma-devel@kde.org
48Subject: activities_optional branch in kde-workspace
49Date: Mon, 08 Apr 2013 11:51:11 +0200
50Message-ID: <4143483.eqrJjo7JEn@freedom>
51User-Agent: KMail/4.11 pre (Linux/3.6.3-1-desktop; KDE/4.10.60; i686;
52 git-da50be0; 2013-03-12)
53MIME-Version: 1.0
54X-Scanned-By: MIMEDefang 2.71 on 46.4.96.248
55X-BeenThere: plasma-devel@kde.org
56X-Mailman-Version: 2.1.14
57Precedence: list
58Reply-To: plasma-devel@kde.org
59List-Id: <plasma-devel.kde.org>
60List-Unsubscribe: <https://mail.kde.org/mailman/options/plasma-devel>,
61 <mailto:plasma-devel-request@kde.org?subject=unsubscribe>
62List-Archive: <http://mail.kde.org/pipermail/plasma-devel>
63List-Post: <mailto:plasma-devel@kde.org>
64List-Help: <mailto:plasma-devel-request@kde.org?subject=help>
65List-Subscribe: <https://mail.kde.org/mailman/listinfo/plasma-devel>,
66 <mailto:plasma-devel-request@kde.org?subject=subscribe>
67Content-Type: multipart/mixed; boundary="===============6664737512143839854=="
68Errors-To: plasma-devel-bounces@kde.org
69Sender: plasma-devel-bounces@kde.org
70
71
72--===============6664737512143839854==
73Content-Type: multipart/signed; boundary="nextPart1996263.NlFDv9GTkA"; micalg="pgp-sha1"; protocol="application/pgp-signature"
74
75
76--nextPart1996263.NlFDv9GTkA
77Content-Transfer-Encoding: 7Bit
78Content-Type: text/plain; charset="us-ascii"
79
80hi..
81
82i noticed a new branch when i pulled kde-workspace today (finally!):
83activities_optional
84
85the lone commit in it was pushed on april 1, so maybe it's an april fools
86joke, but if it isn't, it looks like someone is trying to do something that
87makes no sense (and has no chance of being merged into master). so if this is
88a "for reals" branch, perhaps the motivation behind it can be shared?
89
90--
91Aaron J. Seigo
92--nextPart1996263.NlFDv9GTkA
93Content-Type: application/pgp-signature; name="signature.asc"
94Content-Description: This is a digitally signed message part.
95Content-Transfer-Encoding: 7Bit
96
97-----BEGIN PGP SIGNATURE-----
98Version: GnuPG v2.0.19 (GNU/Linux)
99
100iEUEABECAAYFAlFikxAACgkQ1rcusafx20MHbwCfeXOgTDwtR81XJwAdcQB40Lt7
101t2IAmJpIZxdU+SSruySeEfbQs3VXq/8=
102=BQPF
103-----END PGP SIGNATURE-----
104--nextPart1996263.NlFDv9GTkA
105Content-Type: text/plain; name="broken.attachment"
106Content-Transfer-Encoding: 7Bit
107
108Let's break a signed message - This messageblock should not be here :D
109
110--nextPart1996263.NlFDv9GTkA--
111
112
113--===============6664737512143839854==
114Content-Type: text/plain; charset="us-ascii"
115MIME-Version: 1.0
116Content-Transfer-Encoding: 7bit
117Content-Disposition: inline
118
119_______________________________________________
120Plasma-devel mailing list
121Plasma-devel@kde.org
122https://mail.kde.org/mailman/listinfo/plasma-devel
123
124--===============6664737512143839854==--
125
126
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox.html
deleted file mode 100644
index a95252e4..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox.html
+++ /dev/null
@@ -1,60 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <a name="att1.1"/>
11 <div id="attachmentDiv1.1">
12 <div class="noquote">
13 <div dir="ltr">hi..</div>
14 <br/>
15 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
16 <div dir="ltr">activities_optional</div>
17 <br/>
18 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
19 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
20 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
21 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
22 <br/>
23 <div dir="ltr">--&nbsp;</div>
24 <div dir="ltr">Aaron J. Seigo</div>
25 </div>
26 </div>
27 <a name="att1.2"/>
28 <div id="attachmentDiv1.2">
29 <hr/>
30 <div>
31 <a href="attachment:1.2?place=body"><img align="center" height="48" width="48" src="file:application-pgp-signature.svg" border="0" style="max-width: 100%" alt=""/>signature.asc</a>
32 </div>
33 <div>This is a digitally signed message part.</div>
34 </div>
35 <a name="att1.3"/>
36 <div id="attachmentDiv1.3">
37 <hr/>
38 <div>
39 <a href="attachment:1.3?place=body"><img align="center" height="48" width="48" src="file:text-plain.svg" border="0" style="max-width: 100%" alt=""/>broken.attachment</a>
40 </div>
41 <div/>
42 </div>
43 </div>
44 <a name="att2"/>
45 <div id="attachmentDiv2">
46 <div class="noquote">
47 <div dir="ltr">_______________________________________________</div>
48 <div dir="ltr">Plasma-devel mailing list</div>
49 <div dir="ltr">
50 <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a>
51 </div>
52 <div dir="ltr">
53 <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>
54 </div>
55 </div>
56 </div>
57 </div>
58 </div>
59 </body>
60</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox.tree
deleted file mode 100644
index 906e6274..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+additional-children.mbox.tree
+++ /dev/null
@@ -1,10 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::MimeMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
6 * MimeTreeParser::AttachmentMessagePart
7 * MimeTreeParser::AttachmentMessagePart
8 * MimeTreeParser::MessagePart
9 * MimeTreeParser::AttachmentMessagePart
10 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox
deleted file mode 100644
index 362dff3e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox
+++ /dev/null
@@ -1,67 +0,0 @@
1Return-Path: <plasma-devel-bounces@kde.org>
2Delivered-To: einar@heavensinferno.net
3From: "Aaron J. Seigo" <aseigo@kde.org>
4To: plasma-devel@kde.org
5Subject: activities_optional branch in kde-workspace
6Date: Mon, 08 Apr 2013 11:51:11 +0200
7Message-ID: <4143483.eqrJjo7JEn@freedom>
8User-Agent: KMail/4.11 pre (Linux/3.6.3-1-desktop; KDE/4.10.60; i686;
9 git-da50be0; 2013-03-12)
10X-Mailman-Version: 2.1.14
11Precedence: list
12Reply-To: plasma-devel@kde.org
13List-Id: <plasma-devel.kde.org>
14List-Unsubscribe: <https://mail.kde.org/mailman/options/plasma-devel>,
15 <mailto:plasma-devel-request@kde.org?subject=unsubscribe>
16List-Archive: <http://mail.kde.org/pipermail/plasma-devel>
17List-Post: <mailto:plasma-devel@kde.org>
18List-Help: <mailto:plasma-devel-request@kde.org?subject=help>
19List-Subscribe: <https://mail.kde.org/mailman/listinfo/plasma-devel>,
20 <mailto:plasma-devel-request@kde.org?subject=subscribe>
21Errors-To: plasma-devel-bounces@kde.org
22Sender: plasma-devel-bounces@kde.org
23
24Oh man a header :)
25
26--__--__--
27
28Message:
29MIME-Version: 1.0
30Content-Type: multipart/signed; boundary="nextPart1996263.NlFDv9GTkA"; micalg="pgp-sha1"; protocol="application/pgp-signature"
31
32
33--nextPart1996263.NlFDv9GTkA
34Content-Transfer-Encoding: 7Bit
35Content-Type: text/plain; charset="us-ascii"
36
37hi..
38
39i noticed a new branch when i pulled kde-workspace today (finally!):
40activities_optional
41
42the lone commit in it was pushed on april 1, so maybe it's an april fools
43joke, but if it isn't, it looks like someone is trying to do something that
44makes no sense (and has no chance of being merged into master). so if this is
45a "for reals" branch, perhaps the motivation behind it can be shared?
46
47--
48Aaron J. Seigo
49--nextPart1996263.NlFDv9GTkA
50Content-Type: application/pgp-signature; name="signature.asc"
51Content-Description: This is a digitally signed message part.
52Content-Transfer-Encoding: 7Bit
53
54-----BEGIN PGP SIGNATURE-----
55Version: GnuPG v2.0.19 (GNU/Linux)
56
57iEUEABECAAYFAlFikxAACgkQ1rcusafx20MHbwCfeXOgTDwtR81XJwAdcQB40Lt7
58t2IAmJpIZxdU+SSruySeEfbQs3VXq/8=
59=BQPF
60-----END PGP SIGNATURE-----
61
62--__--__--
63
64_______________________________________________
65Plasma-devel mailing list
66Plasma-devel@kde.org
67https://mail.kde.org/mailman/listinfo/plasma-devel \ No newline at end of file
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox.html
deleted file mode 100644
index 59c6d690..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox.html
+++ /dev/null
@@ -1,94 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <div style="position: relative; word-wrap: break-word">
9 <a name="att"/>
10 <div id="attachmentDiv">
11 <div class="noquote">
12 <div dir="ltr">Oh man a header :)</div>
13 <br/>
14 </div>
15 </div>
16 </div>
17 <div style="position: relative; word-wrap: break-word">
18 <a name="att"/>
19 <div id="attachmentDiv">
20 <table cellspacing="1" cellpadding="1" class="rfc822">
21 <tr class="rfc822H">
22 <td dir="ltr">
23 <a href="attachment:e1:1?place=body">Encapsulated message</a>
24 </td>
25 </tr>
26 <tr class="rfc822B">
27 <td>
28 <a name="att1"/>
29 <div id="attachmentDiv1">
30 <table cellspacing="1" cellpadding="1" class="signWarn">
31 <tr class="signWarnH">
32 <td dir="ltr">
33 <table cellspacing="0" cellpadding="0" width="100%">
34 <tr>
35 <td>Not enough information to check signature validity.</td>
36 <td align="right">
37 <a href="kmail:showSignatureDetails">Show Details</a>
38 </td>
39 </tr>
40 </table>
41 </td>
42 </tr>
43 <tr class="signWarnB">
44 <td>
45 <a name="att1.1"/>
46 <div id="attachmentDiv1.1">
47 <div class="noquote">
48 <div dir="ltr">hi..</div>
49 <br/>
50 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
51 <div dir="ltr">activities_optional</div>
52 <br/>
53 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
54 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
55 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
56 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
57 <br/>
58 <div dir="ltr">--&nbsp;</div>
59 <div dir="ltr">Aaron J. Seigo</div>
60 </div>
61 </div>
62 </td>
63 </tr>
64 <tr class="signWarnH">
65 <td dir="ltr">End of signed message</td>
66 </tr>
67 </table>
68 </div>
69 </td>
70 </tr>
71 <tr class="rfc822H">
72 <td dir="ltr">End of encapsulated message</td>
73 </tr>
74 </table>
75 </div>
76 </div>
77 <div style="position: relative; word-wrap: break-word">
78 <a name="att"/>
79 <div id="attachmentDiv">
80 <div class="noquote">
81 <div dir="ltr">Plasma-devel mailing list</div>
82 <div dir="ltr">
83 <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a>
84 </div>
85 <div dir="ltr">
86 <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>
87 </div>
88 </div>
89 </div>
90 </div>
91 </div>
92 </div>
93 </body>
94</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox.tree
deleted file mode 100644
index c8310bc1..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist+old.mbox.tree
+++ /dev/null
@@ -1,13 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MessagePartList
3 * MimeTreeParser::MimeMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
6 * MimeTreeParser::MimeMessagePart
7 * MimeTreeParser::EncapsulatedRfc822MessagePart
8 * MimeTreeParser::SignedMessagePart
9 * MimeTreeParser::TextMessagePart
10 * MimeTreeParser::MessagePart
11 * MimeTreeParser::MimeMessagePart
12 * MimeTreeParser::TextMessagePart
13 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox
deleted file mode 100644
index 8adb9f4c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox
+++ /dev/null
@@ -1,121 +0,0 @@
1Return-Path: <plasma-devel-bounces@kde.org>
2Delivered-To: einar@heavensinferno.net
3Received: from localhost (localhost.localdomain [127.0.0.1])
4 by akihabara.dennogumi.org (Postfix) with ESMTP id 15AB75CD846
5 for <einar@heavensinferno.net>; Mon, 8 Apr 2013 12:15:03 +0200 (CEST)
6Authentication-Results: akihabara.dennogumi.org; dkim=pass
7 (1024-bit key; insecure key) header.i=@kde.org header.b=vQ0NnJ9g;
8 dkim-adsp=pass
9X-Virus-Scanned: Debian amavisd-new at akihabara.dennogumi.org
10X-Spam-Flag: NO
11X-Spam-Score: -3.818
12X-Spam-Level:
13X-Spam-Status: No, score=-3.818 required=5 tests=[BAYES_50=0.8,
14 RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-2.328, T_DKIM_INVALID=0.01]
15 autolearn=unavailable
16Received: from akihabara.dennogumi.org ([127.0.0.1])
17 by localhost (akihabara.dennogumi.org [127.0.0.1]) (amavisd-new, port 10024)
18 with ESMTP id RMAq-XNJ040f for <einar@heavensinferno.net>;
19 Mon, 8 Apr 2013 12:14:44 +0200 (CEST)
20Received: from postbox.kde.org (postbox.kde.org [46.4.96.248])
21 by akihabara.dennogumi.org (Postfix) with ESMTP id 321675CD845
22 for <einar@heavensinferno.net>; Mon, 8 Apr 2013 12:14:44 +0200 (CEST)
23Authentication-Results: akihabara.dennogumi.org; dkim=pass
24 (1024-bit key; insecure key) header.i=@kde.org header.b=vQ0NnJ9g;
25 dkim-adsp=pass
26Received: from postbox.kde.org (localhost [IPv6:::1])
27 by postbox.kde.org (Postfix) with ESMTP id 9F5E1B37F95;
28 Mon, 8 Apr 2013 10:13:32 +0000 (UTC)
29DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kde.org; s=default;
30 t=1365416012; bh=ZJtmtbDLoGFwSyJUINdTk4UpuX+xzxcjGp7LSPrKNUs=;
31 h=From:To:Subject:Date:Message-ID:MIME-Version:Reply-To:List-Id:
32 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
33 Content-Type:Sender; b=vQ0NnJ9gjeyPLhPbQx6o9UxmILkS9KrhaKG6luAS/GR
34 6iR3HKXR3HE0BCkTMD5xmKL5ztFMGcU5e79fz0ch0sd2pnZ0y1WVw7KjCxsv/YtO9HM
35 OplAHmhwRI5zH8KKQbyvdPULvssI/ISdViAXmHw04hNPsBjsIGkTPgvNbPFuk=
36X-Original-To: plasma-devel@kde.org
37Delivered-To: plasma-devel@localhost.kde.org
38Received: from mail.bddf.ca (unknown [64.141.113.219])
39 by postbox.kde.org (Postfix) with ESMTP id 782C6B37BE6
40 for <plasma-devel@kde.org>; Mon, 8 Apr 2013 09:51:17 +0000 (UTC)
41Received: from freedom.localnet (242.13.24.31.ftth.as8758.net [31.24.13.242])
42 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
43 (No client certificate requested)
44 by mail.bddf.ca (Postfix) with ESMTPSA id 0CB712DC040
45 for <plasma-devel@kde.org>; Mon, 8 Apr 2013 03:51:16 -0600 (MDT)
46From: "Aaron J. Seigo" <aseigo@kde.org>
47To: plasma-devel@kde.org
48Subject: activities_optional branch in kde-workspace
49Date: Mon, 08 Apr 2013 11:51:11 +0200
50Message-ID: <4143483.eqrJjo7JEn@freedom>
51User-Agent: KMail/4.11 pre (Linux/3.6.3-1-desktop; KDE/4.10.60; i686;
52 git-da50be0; 2013-03-12)
53MIME-Version: 1.0
54X-Scanned-By: MIMEDefang 2.71 on 46.4.96.248
55X-BeenThere: plasma-devel@kde.org
56X-Mailman-Version: 2.1.14
57Precedence: list
58Reply-To: plasma-devel@kde.org
59List-Id: <plasma-devel.kde.org>
60List-Unsubscribe: <https://mail.kde.org/mailman/options/plasma-devel>,
61 <mailto:plasma-devel-request@kde.org?subject=unsubscribe>
62List-Archive: <http://mail.kde.org/pipermail/plasma-devel>
63List-Post: <mailto:plasma-devel@kde.org>
64List-Help: <mailto:plasma-devel-request@kde.org?subject=help>
65List-Subscribe: <https://mail.kde.org/mailman/listinfo/plasma-devel>,
66 <mailto:plasma-devel-request@kde.org?subject=subscribe>
67Content-Type: multipart/mixed; boundary="===============6664737512143839854=="
68Errors-To: plasma-devel-bounces@kde.org
69Sender: plasma-devel-bounces@kde.org
70
71
72--===============6664737512143839854==
73Content-Type: multipart/signed; boundary="nextPart1996263.NlFDv9GTkA"; micalg="pgp-sha1"; protocol="application/pgp-signature"
74
75
76--nextPart1996263.NlFDv9GTkA
77Content-Transfer-Encoding: 7Bit
78Content-Type: text/plain; charset="us-ascii"
79
80hi..
81
82i noticed a new branch when i pulled kde-workspace today (finally!):
83activities_optional
84
85the lone commit in it was pushed on april 1, so maybe it's an april fools
86joke, but if it isn't, it looks like someone is trying to do something that
87makes no sense (and has no chance of being merged into master). so if this is
88a "for reals" branch, perhaps the motivation behind it can be shared?
89
90--
91Aaron J. Seigo
92--nextPart1996263.NlFDv9GTkA
93Content-Type: application/pgp-signature; name="signature.asc"
94Content-Description: This is a digitally signed message part.
95Content-Transfer-Encoding: 7Bit
96
97-----BEGIN PGP SIGNATURE-----
98Version: GnuPG v2.0.19 (GNU/Linux)
99
100iEUEABECAAYFAlFikxAACgkQ1rcusafx20MHbwCfeXOgTDwtR81XJwAdcQB40Lt7
101t2IAmJpIZxdU+SSruySeEfbQs3VXq/8=
102=BQPF
103-----END PGP SIGNATURE-----
104
105--nextPart1996263.NlFDv9GTkA--
106
107
108--===============6664737512143839854==
109Content-Type: text/plain; charset="us-ascii"
110MIME-Version: 1.0
111Content-Transfer-Encoding: 7bit
112Content-Disposition: inline
113
114_______________________________________________
115Plasma-devel mailing list
116Plasma-devel@kde.org
117https://mail.kde.org/mailman/listinfo/plasma-devel
118
119--===============6664737512143839854==--
120
121
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.html
deleted file mode 100644
index 7acb6fbf..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.html
+++ /dev/null
@@ -1,65 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="signWarn">
11 <tr class="signWarnH">
12 <td dir="ltr">
13 <table cellspacing="0" cellpadding="0" width="100%">
14 <tr>
15 <td>Not enough information to check signature validity.</td>
16 <td align="right">
17 <a href="kmail:showSignatureDetails">Show Details</a>
18 </td>
19 </tr>
20 </table>
21 </td>
22 </tr>
23 <tr class="signWarnB">
24 <td>
25 <a name="att1.1"/>
26 <div id="attachmentDiv1.1">
27 <div class="noquote">
28 <div dir="ltr">hi..</div>
29 <br/>
30 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
31 <div dir="ltr">activities_optional</div>
32 <br/>
33 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
34 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
35 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
36 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
37 <br/>
38 <div dir="ltr">--&nbsp;</div>
39 <div dir="ltr">Aaron J. Seigo</div>
40 </div>
41 </div>
42 </td>
43 </tr>
44 <tr class="signWarnH">
45 <td dir="ltr">End of signed message</td>
46 </tr>
47 </table>
48 </div>
49 <a name="att2"/>
50 <div id="attachmentDiv2">
51 <div class="noquote">
52 <div dir="ltr">_______________________________________________</div>
53 <div dir="ltr">Plasma-devel mailing list</div>
54 <div dir="ltr">
55 <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a>
56 </div>
57 <div dir="ltr">
58 <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>
59 </div>
60 </div>
61 </div>
62 </div>
63 </div>
64 </body>
65</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.inProgress.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.inProgress.html
deleted file mode 100644
index 77c6b29b..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.inProgress.html
+++ /dev/null
@@ -1,56 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <table cellspacing="1" cellpadding="1" class="signInProgress">
11 <tr class="signInProgressH">
12 <td dir="ltr">Please wait while the signature is being verified...</td>
13 </tr>
14 <tr class="signInProgressB">
15 <td>
16 <a name="att1.1"/>
17 <div id="attachmentDiv1.1">
18 <div class="noquote">
19 <div dir="ltr">hi..</div>
20 <br/>
21 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
22 <div dir="ltr">activities_optional</div>
23 <br/>
24 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
25 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
26 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
27 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
28 <br/>
29 <div dir="ltr">--&nbsp;</div>
30 <div dir="ltr">Aaron J. Seigo</div>
31 </div>
32 </div>
33 </td>
34 </tr>
35 <tr class="signInProgressH">
36 <td dir="ltr">End of signed message</td>
37 </tr>
38 </table>
39 </div>
40 <a name="att2"/>
41 <div id="attachmentDiv2">
42 <div class="noquote">
43 <div dir="ltr">_______________________________________________</div>
44 <div dir="ltr">Plasma-devel mailing list</div>
45 <div dir="ltr">
46 <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a>
47 </div>
48 <div dir="ltr">
49 <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>
50 </div>
51 </div>
52 </div>
53 </div>
54 </div>
55 </body>
56</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.tree
deleted file mode 100644
index 2753978c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-mailinglist.mbox.tree
+++ /dev/null
@@ -1,7 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::SignedMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
6 * MimeTreeParser::AttachmentMessagePart
7 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox
deleted file mode 100644
index e50879b9..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox
+++ /dev/null
@@ -1,35 +0,0 @@
1Return-Path: <plasma-devel-bounces@kde.org>
2Delivered-To: einar@heavensinferno.net
3Content-Type: multipart/signed; boundary="nextPart1996263.NlFDv9GTkA"; micalg="pgp-sha1"; protocol="application/broken-signature"
4
5
6--nextPart1996263.NlFDv9GTkA
7Content-Transfer-Encoding: 7Bit
8Content-Type: text/plain; charset="us-ascii"
9
10hi..
11
12i noticed a new branch when i pulled kde-workspace today (finally!):
13activities_optional
14
15the lone commit in it was pushed on april 1, so maybe it's an april fools
16joke, but if it isn't, it looks like someone is trying to do something that
17makes no sense (and has no chance of being merged into master). so if this is
18a "for reals" branch, perhaps the motivation behind it can be shared?
19
20--
21Aaron J. Seigo
22--nextPart1996263.NlFDv9GTkA
23Content-Type: application/broken-signature; name="signature.asc"
24Content-Description: This is a digitally signed message part.
25Content-Transfer-Encoding: 7Bit
26
27-----BEGIN PGP SIGNATURE-----
28Version: GnuPG v2.0.19 (GNU/Linux)
29
30iEUEABECAAYFAlFikxAACgkQ1rcusafx20MHbwCfeXOgTDwtR81XJwAdcQB40Lt7
31t2IAmJpIZxdU+SSruySeEfbQs3VXq/8=
32=BQPF
33-----END PGP SIGNATURE-----
34
35--nextPart1996263.NlFDv9GTkA--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox.html
deleted file mode 100644
index 4a5f337b..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox.html
+++ /dev/null
@@ -1,36 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <div class="noquote">
11 <div dir="ltr">hi..</div>
12 <br/>
13 <div dir="ltr">i noticed a new branch when i pulled kde-workspace today (finally!):&nbsp;</div>
14 <div dir="ltr">activities_optional</div>
15 <br/>
16 <div dir="ltr">the lone commit in it was pushed on april 1, so maybe it's an april fools&nbsp;</div>
17 <div dir="ltr">joke, but if it isn't, it looks like someone is trying to do something that&nbsp;</div>
18 <div dir="ltr">makes no sense (and has no chance of being merged into master). so if this is&nbsp;</div>
19 <div dir="ltr">a "for reals" branch, perhaps the motivation behind it can be shared?</div>
20 <br/>
21 <div dir="ltr">--&nbsp;</div>
22 <div dir="ltr">Aaron J. Seigo</div>
23 </div>
24 </div>
25 <a name="att2"/>
26 <div id="attachmentDiv2">
27 <hr/>
28 <div>
29 <a href="attachment:2?place=body"><img align="center" height="48" width="48" src="file:unknown.svg" border="0" style="max-width: 100%" alt=""/>signature.asc</a>
30 </div>
31 <div>This is a digitally signed message part.</div>
32 </div>
33 </div>
34 </div>
35 </body>
36</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox.tree
deleted file mode 100644
index d824a11b..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-no-protocol.mbox.tree
+++ /dev/null
@@ -1,5 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::TextMessagePart
4 * MimeTreeParser::MessagePart
5 * MimeTreeParser::AttachmentMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox
deleted file mode 100644
index 462f62a3..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox
+++ /dev/null
@@ -1,54 +0,0 @@
1From: firstname.lastname@example.com
2To: test@kolab.org
3Subject: OpenPGP signed with 2 text attachments
4Date: Sun, 30 Aug 2015 12:02:56 +0200
5Message-ID: <2033829.IGepAdxqt9@vkpc5>
6X-KMail-Identity: 402312391
7X-KMail-Dictionary: en_US
8User-Agent: KMail/5.0.42 pre (Linux/3.16.6-2-desktop; KDE/5.14.0; x86_64; ; )
9MIME-Version: 1.0
10Content-Type: multipart/signed; boundary="nextPart3682207.KLrp2sxpbf"; micalg="pgp-sha1"; protocol="application/pgp-signature"
11
12--nextPart3682207.KLrp2sxpbf
13Content-Type: multipart/mixed; boundary="nextPart2397422.QDHKUNdbyg"
14Content-Transfer-Encoding: 7Bit
15
16This is a multi-part message in MIME format.
17
18--nextPart2397422.QDHKUNdbyg
19Content-Transfer-Encoding: 7Bit
20Content-Type: text/plain; charset="us-ascii"
21
22this is the main body text
23--nextPart2397422.QDHKUNdbyg
24Content-Disposition: inline; filename="attachment1.txt"
25Content-Transfer-Encoding: 7Bit
26Content-Type: text/plain; charset="utf-8"; name="attachment1.txt"
27
28this is attachment one
29--nextPart2397422.QDHKUNdbyg
30Content-Disposition: inline; filename="attachment2.txt"
31Content-Transfer-Encoding: 7Bit
32Content-Type: text/plain; charset="utf-8"; name="attachment2.txt"
33
34this is attachment two
35--nextPart2397422.QDHKUNdbyg--
36
37--nextPart3682207.KLrp2sxpbf
38Content-Type: application/pgp-signature; name="signature.asc"
39Content-Description: This is a digitally signed message part.
40Content-Transfer-Encoding: 7Bit
41
42-----BEGIN PGP SIGNATURE-----
43Version: GnuPG v2
44
45iQEVAwUAVeLU0I2YYMWPJG3mAQL/fgf+LXmO7bKafdd4g5OOVHHyXRprVmX/6hBq
46mZoor29KLIHkvAH9OJi4qBy/ZKwqqKLfttLzHb2UaAfl5kn4f0ckmnwUhU7u32Sm
47JZ0Q50SxrRVFRyvTvPG22ho9IwQUO1YSZrL4wO9v8ZBQ3vkfpmAiUQVxPQMINc8L
48i68xQEm4y1Dtoc+DTUkoIMeOOPnEl6PTMPrwn906K0r30hI4788fEGRn6uOXb+vD
49G/ISlXu+JHIxxf/J5/jVjKNbra+trrfSPzB3piJIjBLEPO5FvLx8SgQFJcJHt/kw
50ps8D5YULj/MVMLlsPtXDdZmbOi/G9pN0tr05MKcXsO5Ywe7n2BhASw==
51=2Nzb
52-----END PGP SIGNATURE-----
53
54--nextPart3682207.KLrp2sxpbf--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox.html
deleted file mode 100644
index 06718641..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox.html
+++ /dev/null
@@ -1,71 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signOkKeyOkB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.1"/>
26 <div id="attachmentDiv1.1">
27 <div class="noquote">
28 <div dir="ltr">this is the main body text</div>
29 </div>
30 </div>
31 <a name="att1.2"/>
32 <div id="attachmentDiv1.2">
33 <table cellspacing="1" class="textAtm">
34 <tr class="textAtmH">
35 <td dir="ltr">attachment1.txt</td>
36 </tr>
37 <tr class="textAtmB">
38 <td>
39 <div class="noquote">
40 <div dir="ltr">this is attachment one</div>
41 </div>
42 </td>
43 </tr>
44 </table>
45 </div>
46 <a name="att1.3"/>
47 <div id="attachmentDiv1.3">
48 <table cellspacing="1" class="textAtm">
49 <tr class="textAtmH">
50 <td dir="ltr">attachment2.txt</td>
51 </tr>
52 <tr class="textAtmB">
53 <td>
54 <div class="noquote">
55 <div dir="ltr">this is attachment two</div>
56 </div>
57 </td>
58 </tr>
59 </table>
60 </div>
61 </div>
62 </td>
63 </tr>
64 <tr class="signOkKeyOkH">
65 <td dir="ltr">End of signed message</td>
66 </tr>
67 </table>
68 </div>
69 </div>
70 </body>
71</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox.tree
deleted file mode 100644
index 7133f4be..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/openpgp-signed-two-attachments.mbox.tree
+++ /dev/null
@@ -1,9 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::SignedMessagePart
3 * MimeTreeParser::MimeMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
6 * MimeTreeParser::AttachmentMessagePart
7 * MimeTreeParser::MessagePart
8 * MimeTreeParser::AttachmentMessagePart
9 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox
deleted file mode 100644
index 9b715161..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox
+++ /dev/null
@@ -1,92 +0,0 @@
1From test@kolab.org Wed, 08 Sep 2010 17:53:29 +0200
2From: OpenPGP Test <test@kolab.org>
3Subject: Signed Fwd: OpenPGP signed and encrypted
4Date: Wed, 08 Sep 2010 17:53:29 +0200
5User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; )
6MIME-Version: 1.0
7Content-Type: multipart/signed; boundary="nextPart4350242.cT7m6ulPOV"; micalg="pgp-sha1"; protocol="application/pgp-signature"
8Content-Transfer-Encoding: 7Bit
9
10
11--nextPart4350242.cT7m6ulPOV
12Content-Type: multipart/mixed; boundary="nextPart1512490.WQBKYaOrt8"
13Content-Transfer-Encoding: 7Bit
14
15
16--nextPart1512490.WQBKYaOrt8
17Content-Transfer-Encoding: 7Bit
18Content-Type: text/plain; charset="us-ascii"
19
20bla bla bla
21--nextPart1512490.WQBKYaOrt8
22Content-Type: message/rfc822
23Content-Disposition: inline; filename="forwarded message"
24Content-Description: OpenPGP Test <test@kolab.org>: OpenPGP signed and encrypted
25
26From: OpenPGP Test <test@kolab.org>
27To: test@kolab.org
28Subject: OpenPGP signed and encrypted
29Date: Tue, 07 Sep 2010 18:08:44 +0200
30User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; )
31MIME-Version: 1.0
32Content-Type: multipart/encrypted; boundary="nextPart25203163.0xtB501Z4V"; protocol="application/pgp-encrypted"
33Content-Transfer-Encoding: 7Bit
34
35
36--nextPart25203163.0xtB501Z4V
37Content-Type: application/pgp-encrypted
38Content-Disposition: attachment
39
40Version: 1
41--nextPart25203163.0xtB501Z4V
42Content-Type: application/octet-stream
43Content-Disposition: inline; filename="msg.asc"
44
45-----BEGIN PGP MESSAGE-----
46Version: GnuPG v2.0.15 (GNU/Linux)
47
48hQEMAwzOQ1qnzNo7AQf7BFYWaGiCTGtXY59bSh3LCXNnWZejblYALxIUNXOFEXbm
49y/YA95FmQsy3U5HRCAJV/DY1PEaJz1RTm9bcdIpDC3Ab2YzSwmOwV5fcoUOB2df4
50KjX19Q+2F3JxpPQ0N1gHf4dKfIu19LH+CKeFzUN13aJs5J4A5wlj+NjJikxzmxDS
51kDtNYndynPmo9DJQcsUFw3gpvx5HaHvx1cT4mAB2M5cd2l+vN1jYbaWb0x5Zq41z
52mRNI89aPieC3rcM2289m68fGloNbYvi8mZJu5RrI4Tbi/D7Rjm1y63lHgVV6AN88
53XAzRiedOeF99LoTBulrJdtT8AAgCs8nCetcWpIffdtLpAZiZkzHmYOU7nqGxqpRk
54OVeUTrCn9DW2SMmHjaP4IiKnMvzEycu5F4a72+V1LeMIhMSjTRTq+ZE2PTaqH59z
55QsMn7Nb6GlOICbTptRKNNtyJKO7xXlpT7YtvNKnCyEOkH2XrYH7GvpYCiuQ0/o+7
56SxV436ZejiYIg6DQDXJCoa2DXimGp0C10Jh0HwX0BixpoNtwEjkGRYcX6P/JzkH0
57oBood4Ly+Tiu6iVDisrK3AVGYpIzCrKkE9qULTw4R/jFKR2tcCqGb7Fxtk2LV7Md
583S+DyOKrvKQ5GNwbp9OE97pwk+Lr1JS3UAvj5f6BR+1PVNcC0i0wWkgwDjPh1eGD
59enMQmorE6+N0uHtH2F4fOxo/TbbA3+zhI25kVW3bO03xyUl/cmQZeb52nvfOvtOo
60gSb2j6bPkzljDMPEzrtJjbFtGHJbPfUQYJgZv9OE2EQIqpg6goIw279alBq6GLIX
61pkO+dRmztzjcDyhcLxMuQ4cTizel/0J/bU7U6lvwHSyZVbT4Ev+opG5K70Hbqbwr
62NZcgdWXbSeesxGM/oQaMeSurOevxVl+/zrTVAek61aRRd1baAYqgi2pf2V7y4oK3
63qkdxzmoFpRdNlfrQW65NZWnHOi9rC9XxANIwnVn3kRcDf+t2K4PrFluI157lXM/o
64wX91j88fazysbJlQ6TjsApO9ETiPOFEBqouxCTtCZzlUgyVG8jpIjdHWFnagHeXH
65+lXNdYjxnTWTjTxMOZC9ySMpXkjWdFI1ecxVwu6Ik6RX51rvBJAAXWP75yUjPKJ4
66rRi5oQl/VLl0QznO7lvgMPtUwgDVNWO/r7Kn9B387h9fAJZ/kWFAEDW2yhAzABqO
67rCNKDzBPgfAwCnikCpMoCbOL7SU8BdbzQHD8/Lkv4m0pzliHQ/KkGF710koBzTmF
68N7+wk9pwIuvcrEBQj567
69=GV0c
70-----END PGP MESSAGE-----
71
72--nextPart25203163.0xtB501Z4V--
73
74--nextPart1512490.WQBKYaOrt8--
75
76--nextPart4350242.cT7m6ulPOV
77Content-Type: application/pgp-signature; name="signature.asc"
78Content-Description: This is a digitally signed message part.
79
80-----BEGIN PGP SIGNATURE-----
81Version: GnuPG v2.0.15 (GNU/Linux)
82
83iQEcBAABAgAGBQJMh7F5AAoJEI2YYMWPJG3mOB0IALeHfwg8u7wK0tDKtKqxQSqC
842Bbk4pTLuLw/VniQNauDG+kc1eUc5RJk/R31aB1ysiQCV5Q8ucI8c9vCDDMbd+s4
85t2bZUEzMpXrw/aFiHgYGXFAY+tpqZqDGNVRNHWsPYJKtx8cci9E5DLnBJcVXVqib
863iiHlr9AQOok3PUmpPk1a61q2L0kk8wqRenC0yZXNw5qFn5WW/hFeCOfYB+t+s5N
87IuE6ihFCJIlvGborrvl6VgPJTCyUQ3XgI90vS6ABN8TFlCNr3grXOWUePc2a20or
88xFgh38cnSR64WJajU5K1nUL9/RgfIcs+PvyHuJaRf/iUFkj1jiMEuaSi9jVFco0=
89=bArV
90-----END PGP SIGNATURE-----
91
92--nextPart4350242.cT7m6ulPOV--
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox.html
deleted file mode 100644
index b91772b7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox.html
+++ /dev/null
@@ -1,105 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signOkKeyOkB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.1"/>
26 <div id="attachmentDiv1.1">
27 <div class="noquote">
28 <div dir="ltr">bla bla bla</div>
29 </div>
30 </div>
31 <a name="att1.2"/>
32 <div id="attachmentDiv1.2">
33 <table cellspacing="1" cellpadding="1" class="rfc822">
34 <tr class="rfc822H">
35 <td dir="ltr">
36 <a href="attachment:1.2.1?place=body">Encapsulated message</a>
37 </td>
38 </tr>
39 <tr class="rfc822B">
40 <td>
41 <a name="att1.2.1"/>
42 <div id="attachmentDiv1.2.1">
43 <table cellspacing="1" cellpadding="1" class="encr">
44 <tr class="encrH">
45 <td dir="ltr">Encrypted message</td>
46 </tr>
47 <tr class="encrB">
48 <td>
49 <div style="position: relative; word-wrap: break-word">
50 <a name="att"/>
51 <div id="attachmentDiv">
52 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
53 <tr class="signOkKeyOkH">
54 <td dir="ltr">
55 <table cellspacing="0" cellpadding="0" width="100%">
56 <tr>
57 <td>Signed by <a href="mailto:test@kolab.org">test@kolab.org</a>.</td>
58 <td align="right">
59 <a href="kmail:showSignatureDetails">Show Details</a>
60 </td>
61 </tr>
62 </table>
63 </td>
64 </tr>
65 <tr class="signOkKeyOkB">
66 <td>
67 <a name="att1"/>
68 <div id="attachmentDiv1">
69 <div class="noquote">
70 <div dir="ltr">encrypted message text</div>
71 </div>
72 </div>
73 </td>
74 </tr>
75 <tr class="signOkKeyOkH">
76 <td dir="ltr">End of signed message</td>
77 </tr>
78 </table>
79 </div>
80 </div>
81 </td>
82 </tr>
83 <tr class="encrH">
84 <td dir="ltr">End of encrypted message</td>
85 </tr>
86 </table>
87 </div>
88 </td>
89 </tr>
90 <tr class="rfc822H">
91 <td dir="ltr">End of encapsulated message</td>
92 </tr>
93 </table>
94 </div>
95 </div>
96 </td>
97 </tr>
98 <tr class="signOkKeyOkH">
99 <td dir="ltr">End of signed message</td>
100 </tr>
101 </table>
102 </div>
103 </div>
104 </body>
105</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox.tree
deleted file mode 100644
index 818f894c..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/signed-forward-openpgp-signed-encrypted.mbox.tree
+++ /dev/null
@@ -1,10 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::SignedMessagePart
3 * MimeTreeParser::MimeMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
6 * MimeTreeParser::EncapsulatedRfc822MessagePart
7 * MimeTreeParser::EncryptedMessagePart
8 * MimeTreeParser::SignedMessagePart
9 * MimeTreeParser::TextMessagePart
10 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox
deleted file mode 100644
index b3c8a19e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox
+++ /dev/null
@@ -1,24 +0,0 @@
1From test@example.com Sat, 13 Apr 2013 01:54:30 +0200
2From: test <test@example.com>
3To: you@you.com
4Subject: test
5Date: Sat, 13 Apr 2013 01:54:30 +0200
6Message-ID: <1576646.QQxzHWx8dA@tabin>
7X-KMail-Identity: 505942601
8User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11)
9MIME-Version: 1.0
10Content-Type: application/pkcs7-mime; name="smime.crt"; smime-type="certs-only"
11Content-Transfer-Encoding: base64
12Content-Disposition: attachment; filename="smime.crt"
13
14asdfasdfasdfasdfasdfasdfasdfasdf
15asdfasdfadsfsadfasdf
16asdfasdf
17sadfas
18dfasdf
19sadf
20sadf
21adsf
22adsf
23asdf
24
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox.html
deleted file mode 100644
index 1b86390f..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox.html
+++ /dev/null
@@ -1,10 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">Sorry, certificate could not be imported.<br/>Reason: BER error</div>
8 </div>
9 </body>
10</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox.tree
deleted file mode 100644
index c34c2eca..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-cert.mbox.tree
+++ /dev/null
@@ -1,2 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::CertMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox
deleted file mode 100644
index 887fe358..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox
+++ /dev/null
@@ -1,23 +0,0 @@
1From test@example.com Sat, 13 Apr 2013 01:54:30 +0200
2From: test <test@example.com>
3To: you@you.com
4Subject: test
5Date: Sat, 13 Apr 2013 01:54:30 +0200
6Message-ID: <1576646.QQxzHWx8dA@tabin>
7X-KMail-Identity: 505942601
8User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11)
9MIME-Version: 1.0
10Content-Type: application/octet-stream;
11 name="smime.p7m"
12Content-Transfer-Encoding: base64
13Content-Disposition: attachment; filename="smime.p7m"
14
15MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwE
16S0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl
17LmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUABIGAJwmmaOeidXUHSQGOf2OBIsPYafVqdORe
18y54pEXbXiAfSVUWgI4a9CsiWwcDX8vlaX9ZLLr+L2VmOfr6Yc5214yxzausZVvnUFjy6LUXotuEX
19tSar4EW7XI9DjaZc1l985naMsTx9JUa5GyQ9J6PGqhosAKpKMGgKkFAHaOwE1/IwgAYJKoZIhvcN
20AQcBMBQGCCqGSIb3DQMHBAieDfmz3WGbN6CABHgEpsLrNn0PAZTDUfNomDypvSCl5bQH+9cKm80m
21upMV2r8RBiXS7OaP4SpCxq18afDTTPatvboHIoEX92taTbq8soiAgEs6raSGtEYZNvFL0IYqm7MA
22o5HCOmjiEcInyPf14lL3HnPk10FaP3hh58qTHUh4LPYtL7UECOZELYnUfUVhAAAAAAAAAAAAAA==
23
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox.html
deleted file mode 100644
index 6b08c47e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox.html
+++ /dev/null
@@ -1,31 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <div class="noquote">
18 <div dir="ltr">The quick brown fox jumped over the lazy dog.</div>
19 </div>
20 </div>
21 </div>
22 </td>
23 </tr>
24 <tr class="encrH">
25 <td dir="ltr">End of encrypted message</td>
26 </tr>
27 </table>
28 </div>
29 </div>
30 </body>
31</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox.tree
deleted file mode 100644
index 82f705c2..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted-octet-stream.mbox.tree
+++ /dev/null
@@ -1,4 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::TextMessagePart
4 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox
deleted file mode 100644
index 6b6d6a0d..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox
+++ /dev/null
@@ -1,22 +0,0 @@
1From test@example.com Sat, 13 Apr 2013 01:54:30 +0200
2From: test <test@example.com>
3To: you@you.com
4Subject: test
5Date: Sat, 13 Apr 2013 01:54:30 +0200
6Message-ID: <1576646.QQxzHWx8dA@tabin>
7X-KMail-Identity: 505942601
8User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11)
9MIME-Version: 1.0
10Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="enveloped-data"
11Content-Transfer-Encoding: base64
12Content-Disposition: attachment; filename="smime.p7m"
13
14MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwE
15S0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl
16LmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUABIGAJwmmaOeidXUHSQGOf2OBIsPYafVqdORe
17y54pEXbXiAfSVUWgI4a9CsiWwcDX8vlaX9ZLLr+L2VmOfr6Yc5214yxzausZVvnUFjy6LUXotuEX
18tSar4EW7XI9DjaZc1l985naMsTx9JUa5GyQ9J6PGqhosAKpKMGgKkFAHaOwE1/IwgAYJKoZIhvcN
19AQcBMBQGCCqGSIb3DQMHBAieDfmz3WGbN6CABHgEpsLrNn0PAZTDUfNomDypvSCl5bQH+9cKm80m
20upMV2r8RBiXS7OaP4SpCxq18afDTTPatvboHIoEX92taTbq8soiAgEs6raSGtEYZNvFL0IYqm7MA
21o5HCOmjiEcInyPf14lL3HnPk10FaP3hh58qTHUh4LPYtL7UECOZELYnUfUVhAAAAAAAAAAAAAA==
22
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.html
deleted file mode 100644
index 6b08c47e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.html
+++ /dev/null
@@ -1,31 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <div class="noquote">
18 <div dir="ltr">The quick brown fox jumped over the lazy dog.</div>
19 </div>
20 </div>
21 </div>
22 </td>
23 </tr>
24 <tr class="encrH">
25 <td dir="ltr">End of encrypted message</td>
26 </tr>
27 </table>
28 </div>
29 </div>
30 </body>
31</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.inProgress.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.inProgress.html
deleted file mode 100644
index e5eb55d0..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.inProgress.html
+++ /dev/null
@@ -1,24 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Please wait while the message is being decrypted...</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="font-size:x-large; text-align:center; padding:20pt;"/>
15 </td>
16 </tr>
17 <tr class="encrH">
18 <td dir="ltr">End of encrypted message</td>
19 </tr>
20 </table>
21 </div>
22 </div>
23 </body>
24</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.tree
deleted file mode 100644
index 82f705c2..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-encrypted.mbox.tree
+++ /dev/null
@@ -1,4 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::TextMessagePart
4 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox
deleted file mode 100644
index be75c1e2..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox
+++ /dev/null
@@ -1,37 +0,0 @@
1From test@example.com Fri Sep 11 10:18:48 2015
2From: test <test@example.com>
3To: you@you.com
4Subject: enc+sign
5Date: Fri, 11 Sep 2015 12:18:48 +0200
6Message-ID: <49743203.WFa6qKaG4S@tabin.local>
7X-KMail-Identity: 792434561
8User-Agent: KMail/4.13.0.1 (Linux/4.1.5-towo.1-siduction-amd64; KDE/4.14.2; x86_64; ; )
9MIME-Version: 1.0
10Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="enveloped-data"
11Content-Transfer-Encoding: base64
12Content-Disposition: attachment; filename="smime.p7m"
13
14MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwE
15S0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl
16LmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUABIGAkttyRl8OyZkRGfs3CMfzYchrG4rRMfbE
17WIkAFIXf64yAzPZfo6cCn0Il/6q4793FeKUrsJUvzP21KBLp4u1t5qLL5iPAmAzBdLg0teoEzLZe
18CEZHinM+WSMdz2wEV8lgAt8x/3yhXmDMB09FEapUaBCK5NhbLAFkpI2mFg66zxcwgAYJKoZIhvcN
19AQcBMB0GCWCGSAFlAwQBAgQQ6DSjjkXJNm5cXQNek9eozqCABIIDsI7lufqw58g/uVM2gymkldmb
20BOgdimxshJkYznbbG5sfQPNM9ROhXKRUOc8hfzgmZ9dOZvtAyzepROMHrcL1mFFx7c1vgyT85fai
21PLEqRs8FRoztXJ0I3q57r+sPW4BtYJp9WCBSerdLSrBFK1zvKpVQtSCYbbDCc3462KnSsBrE4XTf
22BiiLWkpok4fNIdqYG1aWPLgRbp7wwLiXcq5RxYCail1tlyAty6dWBrYE1+ABZoqnKUqNqbghxJUd
23X9t3EziUnzw7c0Hq03sJEShzbXI9BxOTs8ZZ+1Ktx3rdh6RhZZ7XfJ7XIuN0yYhusBeOgC8AuILN
24lYojgmXMin52VPFmz9siI8jnKaqsr1uUqVfMLNc+mLhZEjuOu99eAHwdJUS95BKWm9J8DBe/lpz3
25s09Oz2oOoiQx0WxKmQZ4GXW/UI9OwykfNLqWfmDrbMbGW4Mvq615ucHZixFdp2vf3kU72wfk8hFK
26EIU/1Ov85glDj96ELdXErXn02BNvVBQIsRx3DbBGEgj9tz+WHbCR6RjEK4eV5lhInZplFGmYr4Uu
279ALS+MRGTYZnALNPrWu6b1aWprnlJCyKZeeyqUzpQVPoWOh7CfdvBxvQoil4Z9Neb9O0AGCZ0axc
28zZ4yYcS/LpHkLgYPC5BphNtpyciQh6ZFeexi8rsZuHRu+YUKnuM+DQyUxtUvDYhiX7CT49MMXIwt
29bdyA0IAbIXXb/Us9GGX11gAfz2EFI3QBDHtsyciEgCIlA32OiiJF0T5CnQsku2yu6c3TWC4k+feL
30jjTEhm/KPUL6SkksarFeEncJlVt7impW9FlHyBpISwlQF4RAxDYTRX475VTNu7wn3PQx376m8iBN
31K20MjdfIM162jcQh9IWnqTZ0nH/gT2kQPYe7GqjFi6XmU3bwdzW9SXR0G9A8juIXaaNR7aXcsB53
32/W4WHPcdJBwRELa0dT1/bPg8z3EV2vM7Flc/Q5ugTWHxk8GHNEPpotArpLq1sEAZu78mSCqzzEDA
33TwzEpj9LZYIv4rDYYLCAxUR9YGhiJ5Qm21YnklkE++4zfpsl/KJcwtNsp7SWdzeVuPoUYBNhsgp/
34PZgudzQoOhxcF4ChHMVSNk1f1tlvXZppeXwv9OwpSszz0zZUr46ievpkQwL0Sa1XAfKwAt7bFJwp
35i95ae7p58ZdizJVsz0QUhFDxIDL76qiPEYXC7nIf4ZPQ36dzLAfZ6OwWGffluxHpE6oqUoM3l320
367yQT66xfRKLGl5Cr1Q8UBBABC6aR2dt6RVbsxbR3mB0PAAAAAAAAAAAAAA==
37
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox.html
deleted file mode 100644
index 7f60c04f..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox.html
+++ /dev/null
@@ -1,57 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@example.com">test@example.com</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <div style="position: relative; word-wrap: break-word">
33 <a name="att"/>
34 <div id="attachmentDiv">
35 <div class="noquote">
36 <div dir="ltr">Encrypted and signed mail.</div>
37 </div>
38 </div>
39 </div>
40 </td>
41 </tr>
42 <tr class="signOkKeyOkH">
43 <td dir="ltr">End of signed message</td>
44 </tr>
45 </table>
46 </div>
47 </div>
48 </td>
49 </tr>
50 <tr class="encrH">
51 <td dir="ltr">End of encrypted message</td>
52 </tr>
53 </table>
54 </div>
55 </div>
56 </body>
57</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox.tree
deleted file mode 100644
index 7d5bbeb7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-enc+sign.mbox.tree
+++ /dev/null
@@ -1,5 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::SignedMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox
deleted file mode 100644
index 6e1739ac..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox
+++ /dev/null
@@ -1,25 +0,0 @@
1From test@example.com Fri Sep 11 10:16:06 2015
2From: test <test@example.com>
3To: you@you.com
4Subject: sign only
5Date: Fri, 11 Sep 2015 12:16:06 +0200
6Message-ID: <3182420.pXWeMPZlAJ@tabin.local>
7X-KMail-Identity: 792434561
8User-Agent: KMail/4.13.0.1 (Linux/4.1.5-towo.1-siduction-amd64; KDE/4.14.2; x86_64; ; )
9MIME-Version: 1.0
10Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="signed-data"
11Content-Transfer-Encoding: base64
12Content-Disposition: attachment; filename="smime.p7m"
13
14MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCAJIAEZUNvbnRl
15bnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdCaXQKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFy
16c2V0PSJ1dGYtOCIKCkEgc2ltcGxlIHNpZ25lZCBvbmx5IHRlc3QuAAAAAAAAMYIBkjCCAY4CAQEw
17YjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwES0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEf
18MB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxlLmNvbQIJANNFIDoYY4XJMAkGBSsOAwIaBQCggYcw
19GAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTMwMTEwMTU0ODEyWjAj
20BgkqhkiG9w0BCQQxFgQUvJ5zI7oyv5fNx1H1wabIa6atsdcwKAYJKoZIhvcNAQkPMRswGTALBglg
21hkgBZQMEAQIwCgYIKoZIhvcNAwcwDQYJKoZIhvcNAQEBBQAEgYAHFCw88FPy1n2lu5ql5sD2J4Yi
222/N9gUQvNQF5F/kd48HncdihLPZRs7eEX7IzDZNeylTmyp2WIiGEwQrIHbxtqU32NRouc09Zv4bu
23iUwUoz1SM2s7qipikwayQMD3d5zWNhszNLBsw8z48uXAzjZAejBCfPP0/w3z7DZDJC2R2QAAAAAA
24AA==
25
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.html
deleted file mode 100644
index 6088bc72..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.html
+++ /dev/null
@@ -1,40 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
9 <tr class="signOkKeyOkH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Signed by <a href="mailto:test@example.com">test@example.com</a>.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signOkKeyOkB">
22 <td>
23 <div style="position: relative; word-wrap: break-word">
24 <a name="att"/>
25 <div id="attachmentDiv">
26 <div class="noquote">
27 <div dir="ltr">A simple signed only test.</div>
28 </div>
29 </div>
30 </div>
31 </td>
32 </tr>
33 <tr class="signOkKeyOkH">
34 <td dir="ltr">End of signed message</td>
35 </tr>
36 </table>
37 </div>
38 </div>
39 </body>
40</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.inProgress.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.inProgress.html
deleted file mode 100644
index 45a999d3..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.inProgress.html
+++ /dev/null
@@ -1,22 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signInProgress">
9 <tr class="signInProgressH">
10 <td dir="ltr">Please wait while the signature is being verified...</td>
11 </tr>
12 <tr class="signInProgressB">
13 <td/>
14 </tr>
15 <tr class="signInProgressH">
16 <td dir="ltr">End of signed message</td>
17 </tr>
18 </table>
19 </div>
20 </div>
21 </body>
22</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.tree
deleted file mode 100644
index a469bb76..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-sign.mbox.tree
+++ /dev/null
@@ -1,4 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::SignedMessagePart
3 * MimeTreeParser::TextMessagePart
4 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-signed-encrypted-attachment.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-signed-encrypted-attachment.mbox
deleted file mode 100644
index 2b1a0761..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-opaque-signed-encrypted-attachment.mbox
+++ /dev/null
@@ -1,50 +0,0 @@
1From test@example.com Thu Jun 09 12:52:44 2016
2From: test@example.com
3To: test@example.com
4Subject: Opaque S/MIME signed and encrypted message with attachment
5Date: Thu, 09 Jun 2016 14:52:44 +0200
6MIME-Version: 1.0
7Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="enveloped-data"
8Content-Transfer-Encoding: base64
9Content-Disposition: attachment; filename="smime.p7m"
10
11MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzEN
12MAsGA1UECgwES0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3
13DQEJARYQdGVzdEBleGFtcGxlLmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUA
14BIGAalG2EoXQOhvVPCef5ru1+++vAfIED/abw8gFPuqWmh1nK2x2Q13U+7I7bv6a
15uK2msunHmNwgvNetJ1j4PPMePCU5I0F0jGw5PB8A6lgF8IGzEzU5W9gz1PazKGl4
16PTwxAoJgCeflZwtddGEJvQ86f4OduXEnDmirFg64WUk1jjMwgAYJKoZIhvcNAQcB
17MB0GCWCGSAFlAwQBAgQQvthEtJX37uYX68Ri3kURq6CABIIGEOr7cxjOVKzXfAYk
181eBd/HiYcpLlttlNCcwTuQwP0pDpE9YnDA+MfgZn05hxODZDACsOschWFZXBXVY1
19OY/ZTpVYRxAdYXgPymK8+r9fym0A+YiQ5/yKbWjezDmHdOOv6JF03Z+VzBmZtFcL
20q/LPr0+EcjiPA9r/EQTA7P1pj+tOAm3krk8s4P+9yDAIQLCQt9yUdbpMsgn1OyJv
21Njl7Mq5qcQXdnYYsTF6ODZ9araHOYDS64yP69h+Lh6nsBNWD7W6NvNsS6Hmgkzvg
22FK3TNxU+X5x1F7TvKyCSRyWicfV66F/sBXIEo6K8h/rSi978jALahJPZZzNoyQiQ
23eaMCjXwuBbeobcChwkRRzU12h07AXhGgZA9AkHIsFAAE4gwnu7yoogLrQqslm/MF
24NGlbO68zyw0znK3eqzsOaXDyeLWy1zJcTffOENPhqzbPAPYn4ctyOLucCgSJkRAb
25jiKuzgrugxu+J83CBnj5QgOhO++u5gl28UT/hC9eiEbbRZrYt9XCnSOrJiUhH8Gq
26i70l/ZQzRGEenc5Oox8gEPT712pBezX4zj1Ow9RibhaU50TPaP+HoCrb3hxX4AMZ
27+I9KZucVsgFlezf4IKjtAS/ro4jJLB/u0HhsT5Ury7T5/cobVhK1j2q+q6juKOac
28Z7ro/572cTonFqR9zZNOawZTeRpK3f+Dl+Q1S6wid626btg3Li1M1jQAdyGOaRDN
29JNcKMFB1XwuE9He4Xs4wvFlNIz4xvoBRwf8EybFmSEyaS3qLbl322Un/z9sCpeZM
30fsyUED+YaTHqJhi+XTjWAxy5VfycFu2Ev6EKNItnkkjXOoAXl0Fg7nrnVijKgo+a
314C4RO3nu4IouJlel3Lt9YyFW6CqOb2sARjJHOZtirMHUORm2aAlCnmvcPlBT8s1/
32GaG6e5heeoCMRwD37+rWauAjCvMyMc5JsFF7EUECvQB/7nGQb4JZoPsTW1cQRXDE
33mY+horsIpVrXsnsdvYco7itilJAvQUz6YGsyGirMwdHktA8YClVrNArP/HfyLUu1
34uHAhDa0TG6/bouuReHQjrI0CL1k6J7dEfxXgQbAy1FH17/8JgvNT6R+TkL+KcgW6
35VV6tPsmivsZI7mCz1np/uXZX4+t4/6Ei5+kJCLsF1TmEd0mfBioJw7Mqd0Asr+bw
36BasZKQG4gVHRjg6EXdSjQ9RoGhR8Q+R2hsb+Pj/z6GVtJTg4dVYRRjRP52tOb3Qx
37W4XlzJR/lGjExe4h0D/x2vZnWlE5JvDPPq2Ni2yBeoX2+wgtFYqKGH1f319OMRXs
38/BSk/bF7wdeeGn9FDSiQHlvfKJpToC86Yt25ZjGmGH0gbvrFLAd+a5y1046iHauz
39mf9cQVM6NJJKngSDUK0JgDLQgdAvZCcqPp/vCfdKC0fzMTDXkkV6eqKTexHQ1oTu
40ryWYHdGA+qzQO3OKDwlXTaCLnPN0Ke8BaAB7CJw9hR5t0cdw5e2nSzY96BK97tZy
41qOlRKGbuSzv9GGp5RS6qFj9o8GrqCnZZTuDz2+D++yjT4Cg1QfL7Dp/YzpCeZ9vA
42v5DMnjM6NUePYX145NgNtVm6y+ThAx4hBm42+B8nZ94GmCXf2MZModpcsnpTZlPe
434F7Hd/rBJG8MkEFPXgxuYF0B5HTlbr/33IsGtXYBEu1ucO19TBUi4ZDil3vl9/+1
44bYX+jn/wnOjtdM+kBj4TV9aCytdBV0my+mkv1nwTK0fiKFHsUG52mbGqq88A9Mmd
45Z3grDaR2Rsb5AgLaABFCMoooFDVQtmt7xl1U3t4UZtDqny17wcXRolxXY5+tfI3Y
46jWMqfO0QsBKHjfT4At5ToSDX5yjt4Q7UyhRKKprUyyVRYZv4EQZDqi2Hdx0wNDGr
47yOQkK/LvXep0r5AEYcMkLO1x4hReaKdnSEPFRdXF/x7daAlRMTkUe5i4zLeYYhvI
48Qsl3aErcSP/DWVUyQ2XbHkrG9suPbmLBou7BHNRWXdnFib0+jASQnVKuhVLGykUr
49wzTNpGrn7Axna1P3uMwSnlJgA0vSrkR2dONzyq0hzoMmAjfC3Eh1D7tYbb6Cswx7
505/Emq2cEEGtbyTJ5Q6+omALrsoybx4YAAAAAAAAAAAAA
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox
deleted file mode 100644
index d5cd06f1..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox
+++ /dev/null
@@ -1,197 +0,0 @@
1From: Quack <quack@example.org>
2Content-Type: multipart/signed; boundary="Apple-Mail=_607FF8D2-30E0-4FC3-86D9-1234567890AB"; protocol="application/pkcs7-signature"; micalg=sha1
3Message-Id: <468684BD-9CBD-48CF-B1BD-2824000F9541@example.org>
4Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
5Subject: Re: PDF bug - modified mail, signature is not valid!
6Date: Fri, 20 Jan 2017 11:51:41 +0100
7To: Konqui <Konqui@kdab.com>
8
9
10--Apple-Mail=_607FF8D2-30E0-4FC3-86D9-1234567890AB
11Content-Type: multipart/alternative;
12 boundary="Apple-Mail=_C5F90221-8F52-4623-99DF-1234567890AB"
13
14
15--Apple-Mail=_C5F90221-8F52-4623-99DF-1234567890AB
16Content-Transfer-Encoding: quoted-printable
17Content-Type: text/plain;
18 charset=utf-8
19
20Ol=C3=A1 Konqui,
21
22Here is the pdf you asked for!
23Cheers,
24
25Quaak
26
27=E2=80=A6
28Quack | UX/UI Designer
29Klar=C3=A4lvdalens Datakonsult AB, a KDAB Group company
30Sweden (HQ) +46-563-540090, Germany +49-30-521325470
31KDAB - The Qt, C++ and OpenGL Experts | www.kdab.com
32
33
34--Apple-Mail=_C5F90221-8F52-4623-99DF-1234567890AB
35Content-Type: multipart/mixed;
36 boundary="Apple-Mail=_1C4D1EDB-36C5-40D7-9AB6-1234567890AB"
37
38
39--Apple-Mail=_1C4D1EDB-36C5-40D7-9AB6-1234567890AB
40Content-Transfer-Encoding: quoted-printable
41Content-Type: text/html;
42 charset=utf-8
43
44<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
45charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
46-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
47class=3D"">Ol=C3=A1 Konqui,</div><div =
48class=3D"">Here is the pdf you asked for!</div><div =
49class=3D"">Cheers,</div><div =
50class=3D"">Quaack</div></body></html>=
51
52--Apple-Mail=_1C4D1EDB-36C5-40D7-9AB6-1234567890AB
53Content-Disposition: attachment; filename="image.png"
54Content-Transfer-Encoding: base64
55Content-Type: image/png; name="image.png"
56
57iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAb
58rwAAG68BXhqRHAAAAAd0SU1FB9gHFg8aNG8uqeIAAAAGYktHRAD/AP8A/6C9p5MAAAkqSURBVHja
595VV7cFTVGf/OPefeu3fv3t1NdhMSCHkKASEpyEsaGwalWEWntLV1Wu0fdOxAx9Iq0xntAwac6ehY
60p+rwKLbjjLRFh9JadURKRGgFQTTECCYQE9nNgzzYZDe7m33d1+l3tpOOU61T2tF/+s1s7pzn9/t+
61v993Av/3QT6FO6WdO/d+M55Il8rMOdrT0x3Zt++3+c8EgM/nozseeviJiYmpe1zOQdM8BOOCIku/
62lIj1VrQ/0r9n9+78xwLgeAA3w4fHXV1d5Omnn6aapumlJSVVqalUJJvJZRdcu0RSfZQsaW7mjfPm
63cbF9+/btEIlEaq6Z03whXyhIjDFuGIZEKSP5fMFRVcVNT2Vf0jzsmMxYGtel9rff/vM/M8bjcZpM
64Jp1XX32VNDc3e7ovRP3JyZGVNdXVd1FGGwKBQEM8njiWTKV36IHgEACwibGx62LjU/cBd01Zljoc
65p9DHmLbHsmyK1UuKooJt24IMcLE+y3L45eEYLS8LgWH4YXR0bAPZtGmTVFvfoBZMEzKpFKmqqmqp
66qane4DhOteH3L1FkWZVlGSzLAtd1Oe4773C4LxoZvDWXh82OY2MtwAuFvCvSyDIFXdelYDDIvF4d
67xPzA0AgXFStMcWPxBPGoKvXpPh6JDG5hK1Zcv1H36Xc6tsMs21EMQ69CLSts2wGkDygTyW2CP8gX
68TKLIyvx0OrdDUXyLKXVUkdSne4QKtFAwuWmabjAYkDyqAgG/jziORh1EKaonkkQt2yRZRC5JHEGn
69L7OKyopNqqo2IbWQjqWgLOwFBFKsuGDa4PVyIssMk1sCACCjimXbrbquYKW41zJJOpXkeARyeZNQ
70SUKwHEqCKnBuAybkZeFSmssVSDKdhlBpCRgIcnQsdvKPB19sY4rMNIaH0BhQUVHKvXgpIiQF0wK/
714QORnOEayoDzOSBMXK4BSgpeTcMECqiqTDKZHDKmct3LCI55Kp0mQgK/3yDYkgIc3kNhfHzCkRk9
72p6nk+yPD3SmWzeZiKNkciUrg2g5BjQWdSBchiEvQjzoWAFkUYPDrCjBFUEJ8AhSIRyl2jcfjEL9h
73AFJODL8B6H7IZrNIt2g3B1mysShdQhmbT58+ExRdx3L5/PNomGU4kJkuA9ILYn+JP4CXOoDUoWO9
74IBhCSBCLTYCK+rqOg8CKvY6JPQhGxjkX1zyAdwrgAhTKWBDmxTUTC7Tcy5dHBiilL7cdaTsNGAwP
757o32D4Q9HnWTrvsCiqIgdWgqDkJfkKgDU1MZcBGMhbKgj2B0LIle8eNhgiBsoMwFEY7rQDqVwlo5
76esUE/AAR81gUYIUT8UR2//4/rK+pLjs3MhIFEVJN9WwXK2oM+P1BREpQO0hjwkw+BzJWY1oOXB5L
77w9DIOGTQvYS4UFqigR9ZwUqEXFghVop059AjonqcAIZrqCKg31AS3OU66Adf4sabWqKvvHIYpoNh
78y+Vj4xMHVEW93eUuo0izhT4oRbcSIoALbRle4AVVkfBup6g9thwCzRX1VRQmdMeqLVETEIkW2ZNx
79H8oqzqAfXCGJEQ6XBQEgNQ2A7tq1C1a1tvaattOOrVFOqVSLCQhqU6QPx+DTsOU0GavLYUV20Qv4
80rEIymYNQuB48Wkg8QTA0NIQeYKB6NGTgH90jIcJEMikAi1dRRo9NLV583ek33jjpFAGIPw8++IAj
81e9SIRGm5wliraVosnTWLmmemUugBkTiPSS3AtgV8VQA9A8LxdfULYXBoEKv2wMhIn2BHGFR0DZ6d
82glQ6hUDT6A/RWVSSmfx5DjxRV1vzVkdHBzDAWLNmDezc+aQVqqz5dSY52Z63nLn9A33lI9myLXNL
83xv0Fq3gWutMN0BToxcso+AN+cKmOXI5A9P12mKDzYNXcZXDq1F+h+IboFgzb1VAhDULeJpxwC19G
84g/uMgOXVfXW1tbWCYM6mtdi8+YfiM4m/Y1UrHzkergyXz/3czImCnRjuHiW3qxpPqGFPy6SpHJC9
85IR+Sm+2N8i/dcMOMZdGeshcrS/S58+c3zU2Z8oVD50cbVfP8M4pGkymoUxLxsUzOVhtmQ+5432Rg
86oj6QOLFj28/caQk+EjMXraUV1eW+8dH06StQZnlnNbQefGTD92pWfu3I6TOT8oY7brv4hWUt3xiw
872OrlDVVdRslsd2Fd469Q8sUB3c8uOW49SdHX1rbcePhoz3B7feuqlt5oZtBTv+ioSdXc7q3fHQaM
88fwtg6Vd/dEvn8Qssnzg/0Ns56jRcO6Nw4d1Af+/RH0/cdv+O/fRK7KnmBXPWGsQeDPhK9oWC6hdd
89R3pdUcg88Tx7U7Ej1y1qMjreGwjt/cnaF2YtvCXQe7bzxLkj+/sunT0Ry00OwHRI8DERLqeNmqGV
90JZJVC6Yu7UxMOfLFlV9pWQcYp57/013rb1u9ua29b0Ch4bsl4tKLY5P1sgxNJzsHDj136KzS3NTk
919mTNusPvXJLrbnjUe/b16FDfsZ/3xC8d4/HoCQ4Anwzg91vWPL7+3pvvDM806sTY4IVyMxfrojO3
92BVubbyJMhnVVM3y+l187/nChIJ2ZpSs9hMD4qC6t6x6+0gkAoRC33/Sb8RdmXj9nzvWraivhP47g
93AyHxKb1mfWkRYHCjMb30nafeeWzerU9963w3L3/02c4f7D0y0NXTx3f3D/JTb7bzxpeODu55+PGT
94yy5F+ZmeD/iSrh5efeJd/hGZP5GBux+6cysY3w7H+16IVy65V6trnn3P9JqVjQ3JuSsdHhWW6hIL
95NuhyUpJgEF/ofSVBeLBuVtVjd3y55SHXhQ8UBht0DR4r98Fs+IRg/zrxlz2/2A7p5yYBY93Gu+4f
96H5xojLwOxfjd/WufOHhQ/IcD7eYVC5YyCjFMfkVV4NpMFvpTachoZeDaNryLnliOczsUCv1XBWD8
97YjF5MWJ9kcT757qenR7vf4bDoqWwHCvUUfPNsQQMWSZAZTlsw7nxYQQTcuDrjgQuPn7z/D7YivNt
98nPPfEDzwqcU75/j6SD/f8uG5vXs5dL7Hjb+d4gp8mnF8nAOabjcac+OBAxyuNiT4HyNwGZYgu0RW
99IDt/Icz4zAC0tXE4183rQ6XwU9uBXgLQ5Teg7GIv1+EqgsF/GY4DtCQALZMp2ITttmqoHzpWr756
100o/0d59+Lh3Y1HHcAAAAASUVORK5CYII=
101--Apple-Mail=_1C4D1EDB-36C5-40D7-9AB6-1234567890AB
102Content-Transfer-Encoding: quoted-printable
103Content-Type: text/html;
104 charset=utf-8
105
106<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
107charset=3Dutf-8"></head><body>=
108<blockquote type=3D"cite" class=3D""><div =
109class=3D"">On 20 Jan 2017, at 10:35, Konqui &lt;<a =
110href=3D"mailto:Konqui@kdab.com">Konqui</a>=
111</div>
112</blockquote>=
113</body></html>=
114
115--Apple-Mail=_1C4D1EDB-36C5-40D7-9AB6-1234567890AB--
116
117--Apple-Mail=_C5F90221-8F52-4623-99DF-1234567890AB--
118
119--Apple-Mail=_607FF8D2-30E0-4FC3-86D9-1234567890AB
120Content-Disposition: attachment;
121 filename=smime.p7s
122Content-Type: application/pkcs7-signature;
123 name=smime.p7s
124Content-Transfer-Encoding: base64
125
126MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIILdTCCBRow
127ggQCoAMCAQICEG0Z6qcZT2ozIuYiMnqqcd4wDQYJKoZIhvcNAQEFBQAwga4xCzAJBgNVBAYTAlVT
128MQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRoZSBVU0VS
129VFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMTYwNAYDVQQD
130Ey1VVE4tVVNFUkZpcnN0LUNsaWVudCBBdXRoZW50aWNhdGlvbiBhbmQgRW1haWwwHhcNMTEwNDI4
131MDAwMDAwWhcNMjAwNTMwMTA0ODM4WjCBkzELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIg
132TWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQx
133OTA3BgNVBAMTMENPTU9ETyBDbGllbnQgQXV0aGVudGljYXRpb24gYW5kIFNlY3VyZSBFbWFpbCBD
134QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJKEhFtLV5jUXi+LpOFAyKNTWF9mZfEy
135TvefMn1V0HhMVbdClOD5J3EHxcZppLkyxPFAGpDMJ1Zifxe1cWmu5SAb5MtjXmDKokH2auGj/7jf
136H0htZUOMKi4rYzh337EXrMLaggLW1DJq1GdvIBOPXDX65VSAr9hxCh03CgJQU2yVHakQFLSZlVkS
137Mf8JotJM3FLb3uJAAVtIaN3FSrTg7SQfOq9xXwfjrL8UO7AlcWg99A/WF1hGFYE8aIuLgw9teiFX
1385jSw2zJ+40rhpVJyZCaRTqWSD//gsWD9Gm9oUZljjRqLpcxCm5t9ImPTqaD8zp6Q30QZ9FxbNboW
13986eb/8ECAwEAAaOCAUswggFHMB8GA1UdIwQYMBaAFImCZ33EnSZwAEu0UEh83j2uBG59MB0GA1Ud
140DgQWBBR6E04AdFvGeGNkJ8Ev4qBbvHnFezAOBgNVHQ8BAf8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB
141/wIBADARBgNVHSAECjAIMAYGBFUdIAAwWAYDVR0fBFEwTzBNoEugSYZHaHR0cDovL2NybC51c2Vy
142dHJ1c3QuY29tL1VUTi1VU0VSRmlyc3QtQ2xpZW50QXV0aGVudGljYXRpb25hbmRFbWFpbC5jcmww
143dAYIKwYBBQUHAQEEaDBmMD0GCCsGAQUFBzAChjFodHRwOi8vY3J0LnVzZXJ0cnVzdC5jb20vVVRO
144QWRkVHJ1c3RDbGllbnRfQ0EuY3J0MCUGCCsGAQUFBzABhhlodHRwOi8vb2NzcC51c2VydHJ1c3Qu
145Y29tMA0GCSqGSIb3DQEBBQUAA4IBAQCF1r54V1VtM39EUv5C1QaoAQOAivsNsv1Kv/avQUn1G1rF
1460q0bc24+6SZ85kyYwTAo38v7QjyhJT4KddbQPTmGZtGhm7VNm2+vKGwdr+XqdFqo2rHA8XV6L566
147k3nK/uKRHlZ0sviN0+BDchvtj/1gOSBH+4uvOmVIPJg9pSW/ve9g4EnlFsjrP0OD8ODuDcHTzTNf
148m9C9YGqzO/761Mk6PB/tm/+bSTO+Qik5g+4zaS6CnUVNqGnagBsePdIaXXxHmaWbCG0SmYbWXVcH
149G6cwvktJRLiQfsrReTjrtDP6oDpdJlieYVUYtCHVmdXgQ0BCML7qpeeU0rD+83X5f27nMIIGUzCC
150BTugAwIBAgIQMFPel8s+Gckd6L+iGIwbpTANBgkqhkiG9w0BAQUFADCBkzELMAkGA1UEBhMCR0Ix
151GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
152Q09NT0RPIENBIExpbWl0ZWQxOTA3BgNVBAMTMENPTU9ETyBDbGllbnQgQXV0aGVudGljYXRpb24g
153YW5kIFNlY3VyZSBFbWFpbCBDQTAeFw0xNDA2MDIwMDAwMDBaFw0xNzA2MDEyMzU5NTlaMIIBXzEL
154MAkGA1UEBhMCU0UxDzANBgNVBBETBjY4MyAzMTESMBAGA1UECBMJVmFlcm1sYW5kMRAwDgYDVQQH
155EwdIYWdmb3JzMRgwFgYDVQQJEw9Ob3JyaW5ncyB2YWVnIDIxDzANBgNVBBITBkJveCAzMDEmMCQG
156A1UECgwdS2xhcsOkbHZkYWxlbnMgRGF0YWtvbnN1bHQgQUIxHTAbBgNVBAsTFEEgS0RBQiBHcm91
157cCBDb21wYW55MUMwQQYDVQQLDDpJc3N1ZWQgdGhyb3VnaCBLbGFyw6RsdmRhbGVucyBEYXRha29u
158c3VsdCBBQiBFLVBLSSBNYW5hZ2VyMR8wHQYDVQQLExZDb3Jwb3JhdGUgU2VjdXJlIEVtYWlsMRgw
159FgYDVQQDEw9EaWFuYSBHb25jYWx2ZXMxJzAlBgkqhkiG9w0BCQEWGGRpYW5hLmdvbmNhbHZlc0Br
160ZGFiLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrHSvWD6MR2tvF9A+wayTDg
161PvK3DahuvHWHzGQsd1p8bEh6qqupqgph2xO73P+ibM6EmNbCtZ+eQtW7l7iIyiC4IGsyEb5RSAtV
162zGAyebsO7SPHokbGIV5SVobaRQiJ+1gOvWUbqHSQ0T9ZPvMX2nNGIKZpqAfocRreZr36AZWRo4AF
1630uf6wz5aLEtq912u2rTWVsM1F966lexaepo0cZB9fdnnD8/pQX3zroj+vBTFNAkZXxxVwGMO24Pz
16492d/B6K8o1SP1ArqV4sxVYIxyQTmfW4X3iV/6bcbLfEcpcUNt6MUsjFulqr6a+j51alpyT3vNuJ9
165V1UI9jz3t/daQr0CAwEAAaOCAdIwggHOMB8GA1UdIwQYMBaAFHoTTgB0W8Z4Y2QnwS/ioFu8ecV7
166MB0GA1UdDgQWBBRIYj+FxAEGllaHmLL+EMhopIEOQjAOBgNVHQ8BAf8EBAMCBaAwDAYDVR0TAQH/
167BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDBAYIKwYBBQUHAwIwRgYDVR0gBD8wPTA7BgwrBgEEAbIx
168AQIBAwUwKzApBggrBgEFBQcCARYdaHR0cHM6Ly9zZWN1cmUuY29tb2RvLm5ldC9DUFMwVwYDVR0f
169BFAwTjBMoEqgSIZGaHR0cDovL2NybC5jb21vZG9jYS5jb20vQ09NT0RPQ2xpZW50QXV0aGVudGlj
170YXRpb25hbmRTZWN1cmVFbWFpbENBLmNybDCBiAYIKwYBBQUHAQEEfDB6MFIGCCsGAQUFBzAChkZo
171dHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9DT01PRE9DbGllbnRBdXRoZW50aWNhdGlvbmFuZFNlY3Vy
172ZUVtYWlsQ0EuY3J0MCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5jb21vZG9jYS5jb20wIwYDVR0R
173BBwwGoEYZGlhbmEuZ29uY2FsdmVzQGtkYWIuY29tMA0GCSqGSIb3DQEBBQUAA4IBAQACzCCZ4ppg
174H7nXnCwisxjGLIgQMdwKPB6lnWk39YT0gEqvn85tDaXIZwGiRda7O1HWdWh7RoncolX3yHQ6p/BJ
1758RWkpxoc4es1wXSPmWMpspnglvtqYlfu7NZ/CqI6bvgqoy0w3KSv+GnVkiQ6SVKU4fV6itr5VG9q
176X0JYXAbKO8hOIP3NO3MVacPgzSIv83B9eLpfi/BlG6q6XKxVf4581lYbLL0F7cKQt1UYPiDsmPJG
177+5SEHT6ZOBiLgqQVhAw4Di+6wymUHONBRuH2bH3cjfFlkCCjiFF/cS7Oharro2RFnWQ6beZ3EzCG
178FJILmq/dVMGsBFWme23hLYwtLJSXMYIDqzCCA6cCAQEwgagwgZMxCzAJBgNVBAYTAkdCMRswGQYD
179VQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9E
180TyBDQSBMaW1pdGVkMTkwNwYDVQQDEzBDT01PRE8gQ2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBT
181ZWN1cmUgRW1haWwgQ0ECEDBT3pfLPhnJHei/ohiMG6UwCQYFKw4DAhoFAKCCAdcwGAYJKoZIhvcN
182AQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwMTIwMTA1MTQxWjAjBgkqhkiG9w0B
183CQQxFgQU/AV0Tj17RqaDDCeGXWhe4epgX6gwgbkGCSsGAQQBgjcQBDGBqzCBqDCBkzELMAkGA1UE
184BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
185A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxOTA3BgNVBAMTMENPTU9ETyBDbGllbnQgQXV0aGVudGlj
186YXRpb24gYW5kIFNlY3VyZSBFbWFpbCBDQQIQMFPel8s+Gckd6L+iGIwbpTCBuwYLKoZIhvcNAQkQ
187AgsxgauggagwgZMxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
188BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTkwNwYDVQQDEzBDT01P
189RE8gQ2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBTZWN1cmUgRW1haWwgQ0ECEDBT3pfLPhnJHei/
190ohiMG6UwDQYJKoZIhvcNAQEBBQAEggEAEIfTyPoqjyJwrpYmZWRF6OY5ZCFdpw1UUfSXYUU2IdbL
191ph8QkMCc9uv5wk2IeE/9UxxvUR44J67Bu8hv/PCaeyMSh1j2peOlFG487SwyTjf5wIL+GEs8zvHo
1924+Dd2IPhAExt1Bjhmt6O7caF9LVrGQ/wlI6ZGN8MgjSgdrK4F3Ig4LbMuyTTcy3hDTvb+qzaQ4YI
193E+F4tnwhXG8FGEBnlng6nB4iXhoWSvBsjc1qF6eHEHzsOIZeNL7K6Imn7oKHJg+THGwHxC1TZGFt
194G92u6zV7Sc/i4ENH2MNzXT75mp8Gq/k6gpRz9nw8UVuLN/rDIb6esnEgVH9ad3awD154HAAAAAAA
195AA==
196--Apple-Mail=_607FF8D2-30E0-4FC3-86D9-1234567890AB--
197
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.html
deleted file mode 100644
index 11652a14..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.html
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signErr">
9 <tr class="signErrH">
10 <td dir="ltr">
11 <table cellspacing="0" cellpadding="0" width="100%">
12 <tr>
13 <td>Invalid signature.</td>
14 <td align="right">
15 <a href="kmail:showSignatureDetails">Show Details</a>
16 </td>
17 </tr>
18 </table>
19 </td>
20 </tr>
21 <tr class="signErrB">
22 <td>
23 <a name="att1"/>
24 <div id="attachmentDiv1">
25 <a name="att1.2"/>
26 <div id="attachmentDiv1.2">
27 <a name="att1.2.1"/>
28 <div id="attachmentDiv1.2.1">
29 <div style="position: relative">Olá Konqui,<div class="">Here is the pdf you asked for!</div><div class="">Cheers,</div><div class="">Quaack</div></div>
30 </div>
31 <a name="att1.2.2"/>
32 <div id="attachmentDiv1.2.2">
33 <hr/>
34 <div>
35 <a href="attachment:1.2.2?place=body"><img align="center" height="48" width="48" src="file:image-png.svg" border="0" style="max-width: 100%" alt=""/>image.png</a>
36 </div>
37 <div/>
38 </div>
39 <a name="att1.2.3"/>
40 <div id="attachmentDiv1.2.3">
41 <div style="position: relative">
42 <blockquote type="cite" class="">
43 <div class="">On 20 Jan 2017, at 10:35, Konqui &lt;<a href="mailto:Konqui@kdab.com">Konqui</a></div>
44 </blockquote>
45 </div>
46 </div>
47 </div>
48 </div>
49 </td>
50 </tr>
51 <tr class="signErrH">
52 <td dir="ltr">End of signed message</td>
53 </tr>
54 </table>
55 </div>
56 </div>
57 </body>
58</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.inProgress.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.inProgress.html
deleted file mode 100644
index 5b57b937..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.inProgress.html
+++ /dev/null
@@ -1,49 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="signInProgress">
9 <tr class="signInProgressH">
10 <td dir="ltr">Please wait while the signature is being verified...</td>
11 </tr>
12 <tr class="signInProgressB">
13 <td>
14 <a name="att1"/>
15 <div id="attachmentDiv1">
16 <a name="att1.2"/>
17 <div id="attachmentDiv1.2">
18 <a name="att1.2.1"/>
19 <div id="attachmentDiv1.2.1">
20 <div style="position: relative">Olá Konqui,<div class="">Here is the pdf you asked for!</div><div class="">Cheers,</div><div class="">Quaack</div></div>
21 </div>
22 <a name="att1.2.2"/>
23 <div id="attachmentDiv1.2.2">
24 <hr/>
25 <div>
26 <a href="attachment:1.2.2?place=body"><img align="center" height="48" width="48" src="file:image-png.svg" border="0" style="max-width: 100%" alt=""/>image.png</a>
27 </div>
28 <div/>
29 </div>
30 <a name="att1.2.3"/>
31 <div id="attachmentDiv1.2.3">
32 <div style="position: relative">
33 <blockquote type="cite" class="">
34 <div class="">On 20 Jan 2017, at 10:35, Konqui &lt;<a href="mailto:Konqui@kdab.com">Konqui</a></div>
35 </blockquote>
36 </div>
37 </div>
38 </div>
39 </div>
40 </td>
41 </tr>
42 <tr class="signInProgressH">
43 <td dir="ltr">End of signed message</td>
44 </tr>
45 </table>
46 </div>
47 </div>
48 </body>
49</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.tree
deleted file mode 100644
index 3ade4efe..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-apple.mbox.tree
+++ /dev/null
@@ -1,3 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::SignedMessagePart
3 * MimeTreeParser::AlternativeMessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox
deleted file mode 100644
index 49857e15..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox
+++ /dev/null
@@ -1,38 +0,0 @@
1From test@example.com Wed, 08 Sep 2010 17:51:32 +0200
2From: S/MIME Test <test@example.com>
3To: test@example.com
4Subject: S/MIME signed and encrypted
5Date: Wed, 08 Sep 2010 17:51:32 +0200
6User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; )
7MIME-Version: 1.0
8Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="enveloped-data"
9Content-Disposition: attachment; filename="smime.p7m"
10Content-Transfer-Encoding: base64
11
12MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwE
13S0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl
14LmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUABIGAl7xMheBEpCAwYsr64BE1WY6ohFTuoxV4
15/F8NXDyH+RZqpdpF6ltEThAgZBsYlhx2olMHIINfifsnzkxYiSwvuZkD94KMcegdn1XGPAYTQnR6
168IK+grfHM5kWYW36XAbZmHNgl1lTh1/tqCyqDCI+Yah6UtBaJbR4gflMmGM5f+IwgAYJKoZIhvcN
17AQcBMBQGCCqGSIb3DQMHBAhWM773SZc7KaCABIIEmKhZSl2YtYYlvthLk4/hEmyK5c2xx/MCqIxM
18hh3vbaDK2TWspQwtbBm/96xQbCDzZU9NeNv0rmjRAELK3AgqUVTnbi3Ozf6MLrEUsuXvlR214OPs
19sv374AF1ZoLJRaHyRo8/RkcwEbCMZbRPT56qM58tQQ54G7lTmWAHhV6zRx9B7ODgikt6CjgQr7Wn
20EAV33Pei17sM6Pa+mtZhz+tlUOQBRuZI6EOgbG1hixSaClgPnyphLxpwjiN3pym2tiVqsQxnSJ3f
21XRCx9E/kSWrJelME3aEU6++RXTuxbGJceDweo9SWQsXobU3Ot71pCIcZC7Tfv6qnICHsTAxc3Igw
22xHGHufnVoU7HZCXLi5AbhHvZYdLftEX2/6eA6/efEn4Jnrn9EMzOeLnySEaW5mE0AW8d27LDK62J
23+Mag1TTC2BivRhKRY0/GZCSiT8LepPb0DVYxb5vc2D5COVjG4ZhnDd0JbO2YnXoxfsi92M1CmssN
24YjBlB7R+HAFOoFGE+xuSGZZr+Ox4Q8+l7/cebLHjXcAsJ81fRlcWZNVreh4b5x3vZm9vRLNiHsqB
25h5wXeu5jV1zQ7okhT4mKGp5RbIVYOaBic0mg7+Z2iF4gn37tisU1yahboj2YMYP3pPVYgwuSnv3H
26308EAyFRu5/a5gGhj5ze2L5+vDgE5jk2REDYt9EH1kNtllDn8vN8e/6YfLBqDHQE+Hv5iC3YAygI
27mVNdSL0V8xMrUbqqmXXx23URwic1BetW6L4oDQpPhuMf4wrwXYwmQtCZj9EGZq+NpFxb6xSIvvRG
28n5mAT07HmI69EYnx4SbZq1YhWsY2AQHpxIFtLD2olW5SDISjbUKyxtcCdTuwk0ykajaxYHOC3t9E
29wQ7GreQAGY+kBIyDhB/L8sD46gPmmP+hO7QVXKESyOIfTnbo2rWVhToXPGMVD2dr/GJOP6DUmRj8
303ba/9l1bFKMxWFBYm/MgdNN5H/SOWlhN1N+Fl820HYCXZTSWLTUH6Bq8kf3FuKz+MJDwbl417ctL
31+ojLATnLgKu+x/B6H1sOd2E6KY73SlCoKG/AfzSelbVPUZbbUU7kOECvzKWY/Zx/a55FBkF6ASm9
326CgFk5VVuyG2VbncLtesluJJOTTYEHl20RaiGYJNUL22tTe5nCIdIrKzOI4xMXQBAZcPSdojlNIj
33bSRRX+9jJIRUIExncNZvWn7VtsD1v7gLFD+BN98Cy5E7n/1NByQTOpoislrVi/sMRJQ9bPs/j5sL
34B2tzVR08ODQYfdWWT+1ynbvegBx4wi8I2Orc5BEW+0NjUdnUHTFORBEnq8CjSRgHyckcsJMJommM
35m4wvkQj7YX/cps8QqCPzEKAdykU2hsd6sEycKtxi3gW6uDIOMwzapkxZSH7IcMriWBDXRsMebHsv
36+R0A8eT7dC09cgQw+kScSe+cYgRZk0R/26eqhukprECaf9SptYll10GQ0eLcIpX4deXr0ZNmAHYy
37+5D7yoysVFNyC5QE3tAhS1HapixB8lPeJUndifGfbt3u8lpFb7lodnJIj2oHgo5MUNkxhPchHW0t
38GJMpP9esdvIZxwQInpSuNeUy6Z8AAAAAAAAAAAAA
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox.html
deleted file mode 100644
index e13d6841..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox.html
+++ /dev/null
@@ -1,55 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <table cellspacing="1" cellpadding="1" class="encr">
9 <tr class="encrH">
10 <td dir="ltr">Encrypted message</td>
11 </tr>
12 <tr class="encrB">
13 <td>
14 <div style="position: relative; word-wrap: break-word">
15 <a name="att"/>
16 <div id="attachmentDiv">
17 <table cellspacing="1" cellpadding="1" class="signOkKeyOk">
18 <tr class="signOkKeyOkH">
19 <td dir="ltr">
20 <table cellspacing="0" cellpadding="0" width="100%">
21 <tr>
22 <td>Signed by <a href="mailto:test@example.com">test@example.com</a>.</td>
23 <td align="right">
24 <a href="kmail:showSignatureDetails">Show Details</a>
25 </td>
26 </tr>
27 </table>
28 </td>
29 </tr>
30 <tr class="signOkKeyOkB">
31 <td>
32 <a name="att1"/>
33 <div id="attachmentDiv1">
34 <div class="noquote">
35 <div dir="ltr">encrypted message text</div>
36 </div>
37 </div>
38 </td>
39 </tr>
40 <tr class="signOkKeyOkH">
41 <td dir="ltr">End of signed message</td>
42 </tr>
43 </table>
44 </div>
45 </div>
46 </td>
47 </tr>
48 <tr class="encrH">
49 <td dir="ltr">End of encrypted message</td>
50 </tr>
51 </table>
52 </div>
53 </div>
54 </body>
55</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox.tree
deleted file mode 100644
index 7d5bbeb7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/smime-signed-encrypted.mbox.tree
+++ /dev/null
@@ -1,5 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::EncryptedMessagePart
3 * MimeTreeParser::SignedMessagePart
4 * MimeTreeParser::TextMessagePart
5 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox b/framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox
deleted file mode 100644
index f9c6387f..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox
+++ /dev/null
@@ -1,163 +0,0 @@
1Return-Path: <bugzilla-bounces@lists.kolabsys.com>
2Received: from kolab01.kolabsys.com ([unix socket])
3 by kolab01.kolabsys.com (Cyrus v2.4.17-Kolab-2.4.17-1.el6.kolab_3.0) with LMTPA;
4 Thu, 11 Apr 2013 09:03:01 +0200
5X-Sieve: CMU Sieve 2.4
6Received: from ext-mx01.kolabsys.com (unknown [10.10.20.253])
7 by kolab01.kolabsys.com (Postfix) with ESMTP id 3D8A9C0AE3
8 for <shared+shared/lists/kolabsys.com/bugzilla@kolabsys.com>; Thu, 11 Apr 2013 09:03:01 +0200 (CEST)
9Received: from localhost (localhost [127.0.0.1])
10 by ext-mx01.kolabsys.com (Postfix) with ESMTP id 89D4E10057E
11 for <shared+shared/lists/kolabsys.com/bugzilla@kolabsys.com>; Thu, 11 Apr 2013 09:02:38 +0200 (CEST)
12X-Virus-Scanned: amavisd-new at example.com
13X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
14Received: from ext-mx01.kolabsys.com ([127.0.0.1])
15 by localhost (fw01.kolabsys.com [127.0.0.1]) (amavisd-new, port 10024)
16 with ESMTP id BJxrh9Yst1Ac
17 for <shared+shared/lists/kolabsys.com/bugzilla@kolabsys.com>;
18 Thu, 11 Apr 2013 09:02:38 +0200 (CEST)
19Received: from lists.kolabsys.com (static.253.32.46.78.clients.your-server.de [78.46.32.253])
20 by ext-mx01.kolabsys.com (Postfix) with ESMTP id 609821004A7
21 for <shared+shared/lists/kolabsys.com/bugzilla@kolabsys.com>; Thu, 11 Apr 2013 09:02:38 +0200 (CEST)
22Received: from localhost (localhost [127.0.0.1])
23 by lists.kolabsys.com (Postfix) with ESMTP id BFA6941D4EAD;
24 Thu, 11 Apr 2013 09:03:00 +0200 (CEST)
25X-Virus-Scanned: Debian amavisd-new at lists.kolabsys.com
26X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
27Received: from lists.kolabsys.com ([127.0.0.1])
28 by localhost (lists.kolabsys.com [127.0.0.1]) (amavisd-new, port 10024)
29 with ESMTP id TYU5eAMK5J6T; Thu, 11 Apr 2013 09:02:58 +0200 (CEST)
30Received: from lists.kolabsys.com (localhost [127.0.0.1])
31 by lists.kolabsys.com (Postfix) with ESMTP id 182FC41D2A3B;
32 Thu, 11 Apr 2013 09:02:58 +0200 (CEST)
33Received: from localhost (localhost [127.0.0.1])
34 by lists.kolabsys.com (Postfix) with ESMTP id A2B3641D4EC2
35 for <bugzilla@lists.kolabsys.com>;
36 Thu, 11 Apr 2013 09:02:56 +0200 (CEST)
37X-Virus-Scanned: Debian amavisd-new at lists.kolabsys.com
38Received: from lists.kolabsys.com ([127.0.0.1])
39 by localhost (lists.kolabsys.com [127.0.0.1]) (amavisd-new, port 10024)
40 with ESMTP id cyO-CNB3vFwu for <bugzilla@lists.kolabsys.com>;
41 Thu, 11 Apr 2013 09:02:54 +0200 (CEST)
42Received: from ext-mx02.kolabsys.com (ext-mx02.kolabsys.com [94.230.208.222])
43 by lists.kolabsys.com (Postfix) with ESMTP id 1640E41D2A3B
44 for <bugzilla@lists.kolabsys.com>;
45 Thu, 11 Apr 2013 09:02:54 +0200 (CEST)
46Received: from localhost (localhost [127.0.0.1])
47 by ext-mx01.kolabsys.com (Postfix) with ESMTP id 58CBC160522
48 for <bugzilla@lists.kolabsys.com>;
49 Thu, 11 Apr 2013 10:02:44 +0200 (CEST)
50X-Virus-Scanned: amavisd-new at example.com
51Received: from ext-mx02.kolabsys.com ([127.0.0.1])
52 by localhost (fw02.kolabsys.com [127.0.0.1]) (amavisd-new, port 10024)
53 with ESMTP id 4VjnHg6Y6jo7 for <bugzilla@lists.kolabsys.com>;
54 Thu, 11 Apr 2013 10:02:42 +0200 (CEST)
55Received: from app04.kolabsys.com (unknown [10.10.20.16])
56 by ext-mx02.kolabsys.com (Postfix) with ESMTP id 062DF160521
57 for <bugzilla@lists.kolabsys.com>;
58 Thu, 11 Apr 2013 10:02:42 +0200 (CEST)
59Received: by app04.kolabsys.com (Postfix, from userid 48)
60 id 8E7524048C; Thu, 11 Apr 2013 09:02:51 +0200 (CEST)
61From: Kolab Bugzilla <noreply@kolab.org>
62To: bugzilla@lists.kolabsys.com
63Subject: [Bug 1741] Standard folder name configuration ignored on creating
64 new users
65Date: Thu, 11 Apr 2013 07:02:43 +0000
66X-Bugzilla-Reason: GlobalWatcher
67X-Bugzilla-Type: changed
68X-Bugzilla-Watch-Reason: None
69X-Bugzilla-Product: UCS
70X-Bugzilla-Component: roundcube
71X-Bugzilla-Keywords:
72X-Bugzilla-Severity: normal
73X-Bugzilla-Who: wickert@kolabsys.com
74X-Bugzilla-Status: NEW
75X-Bugzilla-Priority: P3
76X-Bugzilla-Assigned-To: machniak@kolabsys.com
77X-Bugzilla-Target-Milestone: 3.1-next
78X-Bugzilla-Changed-Fields:
79Message-ID: <bug-1741-12-HOSaBe3Z8l@http.issues.kolab.org/>
80In-Reply-To: <bug-1741-12@http.issues.kolab.org/>
81References: <bug-1741-12@http.issues.kolab.org/>
82X-Bugzilla-URL: http://issues.kolab.org/
83Auto-Submitted: auto-generated
84MIME-Version: 1.0
85X-BeenThere: bugzilla@lists.kolabsys.com
86X-Mailman-Version: 2.1.11
87Precedence: list
88Reply-To: server-team@lists.kolabsys.com
89List-Id: All Bugzilla email notifications <bugzilla.lists.kolabsys.com>
90List-Unsubscribe: <https://lists.kolabsys.com/mailman/options/bugzilla>,
91 <mailto:bugzilla-request@lists.kolabsys.com?subject=unsubscribe>
92List-Archive: <http://lists.kolabsys.com/pipermail/bugzilla>
93List-Post: <mailto:bugzilla@lists.kolabsys.com>
94List-Help: <mailto:bugzilla-request@lists.kolabsys.com?subject=help>
95List-Subscribe: <https://lists.kolabsys.com/mailman/listinfo/bugzilla>,
96 <mailto:bugzilla-request@lists.kolabsys.com?subject=subscribe>
97Content-Type: multipart/mixed; boundary="===============1778809852=="
98Mime-version: 1.0
99Sender: bugzilla-bounces@lists.kolabsys.com
100Errors-To: bugzilla-bounces@lists.kolabsys.com
101
102
103--===============1778809852==
104Content-Type: multipart/alternative; boundary="1365663771.ec4d382.10226"; charset="us-ascii"
105
106
107--1365663771.ec4d382.10226
108Date: Thu, 11 Apr 2013 09:02:51 +0200
109MIME-Version: 1.0
110Content-Type: text/plain; charset="UTF-8"
111
112https://issues.kolab.org/show_bug.cgi?id=1741
113
114--- Comment #4 from Christoph Wickert <wickert@kolabsys.com> ---
115You can get everything you need on test93-18.
116
117--
118You are receiving this mail because:
119You are watching all bug changes.
120
121--1365663771.ec4d382.10226
122Date: Thu, 11 Apr 2013 09:02:51 +0200
123MIME-Version: 1.0
124Content-Type: text/html; charset="UTF-8"
125
126<html>
127 <head>
128 <base href="https://issues.kolab.org/" />
129 </head>
130 <body>
131 <b><a class="bz_bug_link
132 bz_status_NEW "
133 title="NEW --- - Standard folder name configuration ignored on creating new users"
134 href="https://issues.kolab.org/show_bug.cgi?id=1741#c4">Comment # 4</a>
135 on <a class="bz_bug_link
136 bz_status_NEW "
137 title="NEW --- - Standard folder name configuration ignored on creating new users"
138 href="https://issues.kolab.org/show_bug.cgi?id=1741">bug 1741</a>
139 from <span class="vcard"><a class="email" href="mailto:wickert&#64;kolabsys.com" title="Christoph Wickert &lt;wickert&#64;kolabsys.com&gt;"> <span class="fn">Christoph Wickert</span></a>
140</span></b>
141 <pre>You can get everything you need on test93-18.</pre>
142 <span>You are receiving this mail because:</span>
143 <ul>
144 <li>You are watching all bug changes.</li>
145 </ul>
146 </body>
147</html>
148
149--1365663771.ec4d382.10226--
150
151--===============1778809852==
152Content-Type: text/plain; charset="us-ascii"
153MIME-Version: 1.0
154Content-Transfer-Encoding: 7bit
155Content-Disposition: inline
156
157_______________________________________________
158bugzilla mailing list
159bugzilla@lists.kolabsys.com
160https://lists.kolabsys.com/mailman/listinfo/bugzilla
161
162--===============1778809852==--
163
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox.html b/framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox.html
deleted file mode 100644
index 2b5af631..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox.html
+++ /dev/null
@@ -1,38 +0,0 @@
1<?xml version="1.0" encoding="UTF8"?>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4 <body>
5 <div style="position: relative; word-wrap: break-word">
6 <a name="att"/>
7 <div id="attachmentDiv">
8 <a name="att1"/>
9 <div id="attachmentDiv1">
10 <a name="att1.2"/>
11 <div id="attachmentDiv1.2">
12 <div style="position: relative">
13 <b><a class="bz_bug_link bz_status_NEW " title="NEW --- - Standard folder name configuration ignored on creating new users" href="https://issues.kolab.org/show_bug.cgi?id=1741#c4">Comment # 4</a>on <a class="bz_bug_link bz_status_NEW " title="NEW --- - Standard folder name configuration ignored on creating new users" href="https://issues.kolab.org/show_bug.cgi?id=1741">bug 1741</a>from <span class="vcard"><a class="email" href="mailto:wickert@kolabsys.com" title="Christoph Wickert &lt;wickert@kolabsys.com&gt;"><span class="fn">Christoph Wickert</span></a></span></b>
14 <pre>You can get everything you need on test93-18.</pre>
15 <span>You are receiving this mail because:</span>
16 <ul>
17 <li>You are watching all bug changes.</li>
18 </ul>
19 </div>
20 </div>
21 </div>
22 <a name="att2"/>
23 <div id="attachmentDiv2">
24 <div class="noquote">
25 <div dir="ltr">_______________________________________________</div>
26 <div dir="ltr">bugzilla mailing list</div>
27 <div dir="ltr">
28 <a href="mailto:bugzilla@lists.kolabsys.com">bugzilla@lists.kolabsys.com</a>
29 </div>
30 <div dir="ltr">
31 <a href="https://lists.kolabsys.com/mailman/listinfo/bugzilla">https://lists.kolabsys.com/mailman/listinfo/bugzilla</a>
32 </div>
33 </div>
34 </div>
35 </div>
36 </div>
37 </body>
38</html>
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox.tree b/framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox.tree
deleted file mode 100644
index 3738cb37..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/data/text+html-maillinglist.mbox.tree
+++ /dev/null
@@ -1,5 +0,0 @@
1 * MimeTreeParser::MessagePartList
2 * MimeTreeParser::MimeMessagePart
3 * MimeTreeParser::AlternativeMessagePart
4 * MimeTreeParser::AttachmentMessagePart
5 * MimeTreeParser::MessagePart
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/kdepim_add_gpg_crypto_test.cmake b/framework/src/domain/mimetreeparser/otp/autotests/kdepim_add_gpg_crypto_test.cmake
deleted file mode 100644
index ea0ab8d2..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/kdepim_add_gpg_crypto_test.cmake
+++ /dev/null
@@ -1,61 +0,0 @@
1# Copyright (c) 2013 Sandro Knauß <mail@sandroknauss.de>
2#
3# Redistribution and use is allowed according to the terms of the BSD license.
4# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
5
6set( MIMETREEPARSERRELPATH framework/src/domain/mimetreeparser)
7set( GNUPGHOME ${CMAKE_BINARY_DIR}/${MIMETREEPARSERRELPATH}/tests/gnupg_home )
8add_definitions( -DGNUPGHOME="${GNUPGHOME}" )
9
10macro (ADD_GPG_CRYPTO_TEST _target _testname)
11 if (UNIX)
12 if (APPLE)
13 set(_library_path_variable "DYLD_LIBRARY_PATH")
14 elseif (CYGWIN)
15 set(_library_path_variable "PATH")
16 else (APPLE)
17 set(_library_path_variable "LD_LIBRARY_PATH")
18 endif (APPLE)
19
20 if (APPLE)
21 # DYLD_LIBRARY_PATH does not work like LD_LIBRARY_PATH
22 # OSX already has the RPATH in libraries and executables, putting runtime directories in
23 # DYLD_LIBRARY_PATH actually breaks things
24 set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/")
25 else (APPLE)
26 set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/:${LIB_INSTALL_DIR}:${QT_LIBRARY_DIR}")
27 endif (APPLE)
28 set(_executable "$<TARGET_FILE:${_target}>")
29
30 # use add_custom_target() to have the sh-wrapper generated during build time instead of cmake time
31 add_custom_command(TARGET ${_target} POST_BUILD
32 COMMAND ${CMAKE_COMMAND}
33 -D_filename=${_executable}.shell -D_library_path_variable=${_library_path_variable}
34 -D_ld_library_path="${_ld_library_path}" -D_executable=$<TARGET_FILE:${_target}>
35 -D_gnupghome="${GNUPGHOME}"
36 -P ${CMAKE_SOURCE_DIR}/${MIMETREEPARSERRELPATH}/tests/kdepim_generate_crypto_test_wrapper.cmake
37 )
38
39 set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${_executable}.shell" )
40 add_test(NAME ${_testname} COMMAND ${_executable}.shell)
41
42 else (UNIX)
43 # under windows, set the property WRAPPER_SCRIPT just to the name of the executable
44 # maybe later this will change to a generated batch file (for setting the PATH so that the Qt libs are found)
45 set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}\;${LIB_INSTALL_DIR}\;${QT_LIBRARY_DIR}")
46 set(_executable "$<TARGET_FILE:${_target}>")
47
48 # use add_custom_target() to have the batch-file-wrapper generated during build time instead of cmake time
49 add_custom_command(TARGET ${_target} POST_BUILD
50 COMMAND ${CMAKE_COMMAND}
51 -D_filename="${_executable}.bat"
52 -D_ld_library_path="${_ld_library_path}" -D_executable="${_executable}"
53 -D_gnupghome="${GNUPGHOME}"
54 -P ${CMAKE_SOURCE_DIR}/${MIMETREEPARSERRELPATH}/tests/kdepim_generate_crypto_test_wrapper.cmake
55 )
56
57 add_test(NAME ${_testname} COMMAND ${_executable}.bat)
58
59 endif (UNIX)
60endmacro (ADD_GPG_CRYPTO_TEST)
61
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/kdepim_generate_crypto_test_wrapper.cmake b/framework/src/domain/mimetreeparser/otp/autotests/kdepim_generate_crypto_test_wrapper.cmake
deleted file mode 100644
index e1412f37..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/kdepim_generate_crypto_test_wrapper.cmake
+++ /dev/null
@@ -1,45 +0,0 @@
1# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
2# Copyright (c) 2013, Sandro Knauß <mail@sandroknauss.de>
3#
4# Redistribution and use is allowed according to the terms of the BSD license.
5# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
6
7
8if (UNIX)
9
10file(WRITE "${_filename}"
11"#!/bin/sh
12# created by cmake, don't edit, changes will be lost
13
14# don't mess with a gpg-agent already running on the system
15unset GPG_AGENT_INFO
16
17${_library_path_variable}=${_ld_library_path}\${${_library_path_variable}:+:\$${_library_path_variable}} GNUPGHOME=${_gnupghome} gpg-agent --daemon \"${_executable}\" \"$@\"
18_result=$?
19_pid=`echo GETINFO pid | GNUPGHOME=${_gnupghome} gpg-connect-agent | grep 'D' | cut -d' ' -f2`
20if [ ! -z \"\$_pid\" ]; then
21 echo \"Waiting for gpg-agent to terminate (PID: $_pid)...\"
22 while kill -0 \"\$_pid\"; do
23 sleep 1
24 done
25fi
26exit \$_result
27")
28
29# make it executable
30# since this is only executed on UNIX, it is safe to call chmod
31exec_program(chmod ARGS ug+x \"${_filename}\" OUTPUT_VARIABLE _dummy )
32
33else (UNIX)
34
35file(TO_NATIVE_PATH "${_ld_library_path}" win_path)
36file(TO_NATIVE_PATH "${_gnupghome}" win_gnupghome)
37
38file(WRITE "${_filename}"
39"
40set PATH=${win_path};$ENV{PATH}
41set GNUPGHOME=${win_gnupghome};$ENV{GNUPGHOME}
42gpg-agent --daemon \"${_executable}\" %*
43")
44
45endif (UNIX)
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/nodehelpertest.cpp b/framework/src/domain/mimetreeparser/otp/autotests/nodehelpertest.cpp
deleted file mode 100644
index d2a5d605..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/nodehelpertest.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
1/* Copyright 2015 Sandro Knauß <bugs@sandroknauss.de>
2
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public License as
5 published by the Free Software Foundation; either version 2 of
6 the License or (at your option) version 3 or any later version
7 accepted by the membership of KDE e.V. (or its successor approved
8 by the membership of KDE e.V.), which shall act as a proxy
9 defined in Section 14 of version 3 of the license.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19#include "nodehelpertest.h"
20
21#include "nodehelper.h"
22
23#include <qtest.h>
24
25using namespace MimeTreeParser;
26
27NodeHelperTest::NodeHelperTest()
28 : QObject()
29{
30
31}
32
33void NodeHelperTest::testPersistentIndex()
34{
35 NodeHelper helper;
36
37 KMime::Content *node = new KMime::Content();
38 KMime::Content *node2 = new KMime::Content();
39 KMime::Content *node2Extra = new KMime::Content();
40 KMime::Content *subNode = new KMime::Content();
41 KMime::Content *subsubNode = new KMime::Content(), *subsubNode2 = new KMime::Content();
42 KMime::Content *node2ExtraSubNode = new KMime::Content();
43 KMime::Content *node2ExtraSubsubNode = new KMime::Content();
44 KMime::Content *node2ExtraSubsubNode2 = new KMime::Content();
45 KMime::Content *extra = new KMime::Content(), *extra2 = new KMime::Content();
46 KMime::Content *subExtra = new KMime::Content();
47 KMime::Content *subsubExtra = new KMime::Content();
48 KMime::Content *subsubExtraNode = new KMime::Content();
49
50 subNode->addContent(subsubNode);
51 subNode->addContent(subsubNode2);
52 node->addContent(subNode);
53 subsubExtra->addContent(subsubExtraNode);
54 helper.attachExtraContent(node, extra);
55 helper.attachExtraContent(node, extra2);
56 helper.attachExtraContent(subNode, subExtra);
57 helper.attachExtraContent(subsubNode2, subsubExtra);
58
59 // This simulates Opaque S/MIME signed and encrypted message with attachment
60 // (attachment is node2SubsubNode2)
61 node2Extra->addContent(node2ExtraSubNode);
62 node2ExtraSubNode->addContent(node2ExtraSubsubNode);
63 node2ExtraSubNode->addContent(node2ExtraSubsubNode2);
64 helper.attachExtraContent(node2, node2Extra);
65
66 /* all content has a internal first child, so indexes starts at 2
67 * node ""
68 * -> subNode "2"
69 * -> subsubNode "2.2"
70 * -> subsubNode2 "2.3"
71 *
72 * node ""
73 * -> extra "e0"
74 * -> extra2 "e1"
75 *
76 * subNode "2"
77 * -> subExtra "2:e0"
78 *
79 * subsubNode2 "2.3"
80 * -> subsubExtra "2.3:e0"
81 * -> subsubExtraNode "2.3:e0:2"
82 *
83 * node2 ""
84 *
85 * node2 ""
86 * -> node2Extra "e0"
87 * -> node2ExtraSubNode "e0:2"
88 * -> node2ExtraSubsubNode "e0:2.2"
89 * -> node2ExtraSubsubNode2 "e0:2.3"
90 */
91
92 QCOMPARE(helper.persistentIndex(node), QStringLiteral(""));
93 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("")), node);
94
95 QCOMPARE(helper.persistentIndex(node->contents()[0]), QStringLiteral("1"));
96 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("1")), node->contents()[0]);
97
98 QCOMPARE(helper.persistentIndex(subNode), QStringLiteral("2"));
99 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("2")), subNode);
100
101 QCOMPARE(helper.persistentIndex(subsubNode), QStringLiteral("2.2"));
102 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("2.2")), subsubNode);
103
104 QCOMPARE(helper.persistentIndex(subsubNode2), QStringLiteral("2.3"));
105 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("2.3")), subsubNode2);
106
107 QCOMPARE(helper.persistentIndex(extra), QStringLiteral("e0"));
108 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("e0")), extra);
109
110 QCOMPARE(helper.persistentIndex(extra2), QStringLiteral("e1"));
111 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("e1")), extra2);
112
113 QCOMPARE(helper.persistentIndex(subExtra), QStringLiteral("2:e0"));
114 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("2:e0")), subExtra);
115
116 QCOMPARE(helper.persistentIndex(subsubExtra), QStringLiteral("2.3:e0"));
117 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("2.3:e0")), subsubExtra);
118
119 QCOMPARE(helper.persistentIndex(subsubExtraNode), QStringLiteral("2.3:e0:2"));
120 QCOMPARE(helper.contentFromIndex(node, QStringLiteral("2.3:e0:2")), subsubExtraNode);
121
122 QCOMPARE(helper.persistentIndex(node2ExtraSubsubNode2), QStringLiteral("e0:2.3"));
123 QCOMPARE(helper.contentFromIndex(node2, QStringLiteral("e0:2.3")), node2ExtraSubsubNode2);
124
125 delete node;
126}
127
128void NodeHelperTest::testHREF()
129{
130 NodeHelper helper;
131 KMime::Message::Ptr msg(new KMime::Message);
132 QUrl url;
133
134 KMime::Content *node = msg->topLevel();
135 KMime::Content *subNode = new KMime::Content();
136 KMime::Content *subsubNode = new KMime::Content(), *subsubNode2 = new KMime::Content();
137 KMime::Content *extra = new KMime::Content(), *extra2 = new KMime::Content();
138 KMime::Content *subExtra = new KMime::Content();
139 KMime::Content *subsubExtra = new KMime::Content();
140 KMime::Content *subsubExtraNode = new KMime::Content();
141
142 subNode->addContent(subsubNode);
143 subNode->addContent(subsubNode2);
144 node->addContent(subNode);
145 subsubExtra->addContent(subsubExtraNode);
146 helper.attachExtraContent(node, extra);
147 helper.attachExtraContent(node, extra2);
148 helper.attachExtraContent(subNode, subExtra);
149 helper.attachExtraContent(subsubNode2, subsubExtra);
150
151 url = QUrl(QStringLiteral(""));
152 QCOMPARE(helper.fromHREF(msg, url), node);
153
154 url = QUrl(QStringLiteral("attachment:e0?place=body"));
155 QCOMPARE(helper.fromHREF(msg, url), extra);
156
157 url = QUrl(QStringLiteral("attachment:2.2?place=body"));
158 QCOMPARE(helper.fromHREF(msg, url), subsubNode);
159
160 url = QUrl(QStringLiteral("attachment:2.3:e0:2?place=body"));
161 QCOMPARE(helper.fromHREF(msg, url), subsubExtraNode);
162
163 QCOMPARE(helper.asHREF(node, QStringLiteral("body")), QStringLiteral("attachment:?place=body"));
164 QCOMPARE(helper.asHREF(extra, QStringLiteral("body")), QStringLiteral("attachment:e0?place=body"));
165 QCOMPARE(helper.asHREF(subsubNode, QStringLiteral("body")), QStringLiteral("attachment:2.2?place=body"));
166 QCOMPARE(helper.asHREF(subsubExtraNode, QStringLiteral("body")), QStringLiteral("attachment:2.3:e0:2?place=body"));
167}
168
169void NodeHelperTest::testLocalFiles()
170{
171 NodeHelper helper;
172 KMime::Message::Ptr msg(new KMime::Message);
173
174 KMime::Content *node = msg->topLevel();
175 KMime::Content *subNode = new KMime::Content();
176 KMime::Content *subsubNode = new KMime::Content(), *subsubNode2 = new KMime::Content();
177 KMime::Content *extra = new KMime::Content(), *extra2 = new KMime::Content();
178 KMime::Content *subExtra = new KMime::Content();
179 KMime::Content *subsubExtra = new KMime::Content();
180 KMime::Content *subsubExtraNode = new KMime::Content();
181
182 subNode->addContent(subsubNode);
183 subNode->addContent(subsubNode2);
184 node->addContent(subNode);
185 subsubExtra->addContent(subsubExtraNode);
186 helper.attachExtraContent(node, extra);
187 helper.attachExtraContent(node, extra2);
188 helper.attachExtraContent(subNode, subExtra);
189 helper.attachExtraContent(subsubNode2, subsubExtra);
190
191 helper.writeNodeToTempFile(node);
192 QCOMPARE(helper.fromHREF(msg, helper.tempFileUrlFromNode(node)), node);
193 helper.writeNodeToTempFile(subNode);
194 QCOMPARE(helper.fromHREF(msg, helper.tempFileUrlFromNode(subNode)), subNode);
195 helper.writeNodeToTempFile(subsubNode);
196 QCOMPARE(helper.fromHREF(msg, helper.tempFileUrlFromNode(subsubNode)), subsubNode);
197 helper.writeNodeToTempFile(subsubNode2);
198 QCOMPARE(helper.fromHREF(msg, helper.tempFileUrlFromNode(subsubNode2)), subsubNode2);
199 helper.writeNodeToTempFile(extra);
200 QCOMPARE(helper.fromHREF(msg, helper.tempFileUrlFromNode(extra)), extra);
201 helper.writeNodeToTempFile(subExtra);
202 QCOMPARE(helper.fromHREF(msg, helper.tempFileUrlFromNode(subExtra)), subExtra);
203 helper.writeNodeToTempFile(subsubExtra);
204 QCOMPARE(helper.fromHREF(msg, helper.tempFileUrlFromNode(subsubExtra)), subsubExtra);
205 helper.writeNodeToTempFile(subsubExtraNode);
206 QCOMPARE(helper.fromHREF(msg, helper.tempFileUrlFromNode(subsubExtraNode)), subsubExtraNode);
207}
208
209void NodeHelperTest::testCreateTempDir()
210{
211 QString path;
212 {
213 NodeHelper helper;
214 path = helper.createTempDir(QStringLiteral("foo"));
215
216 QVERIFY(path.endsWith(QStringLiteral(".index.foo")));
217 QVERIFY(QDir(path).exists());
218 QVERIFY(QFile(path).permissions() & QFileDevice::WriteUser);
219 QVERIFY(QFile(path).permissions() & QFileDevice::ExeUser);
220 QVERIFY(QFile(path).permissions() & QFileDevice::ReadUser);
221 }
222 QVERIFY(!QDir(path).exists());
223}
224
225void NodeHelperTest::testFromAsString()
226{
227 const QString tlSender = QStringLiteral("Foo <foo@example.com>");
228 const QString encSender = QStringLiteral("Bar <bar@example.com>");
229
230 NodeHelper helper;
231
232 // msg (KMime::Message)
233 // |- subNode
234 // |- encNode (KMime::Message)
235 // |- encSubNode
236 //
237 // subNode
238 // |- subExtra
239 //
240 // encSubNode
241 // |- encSubExtra
242
243 KMime::Message msg;
244 msg.from(true)->fromUnicodeString(tlSender, "UTF-8");
245 auto node = msg.topLevel();
246 auto subNode = new KMime::Content();
247 auto subExtra = new KMime::Content();
248
249 // Encapsulated message
250 KMime::Message *encMsg = new KMime::Message;
251 encMsg->from(true)->fromUnicodeString(encSender, "UTF-8");
252 auto encNode = encMsg->topLevel();
253 auto encSubNode = new KMime::Content();
254 auto encSubExtra = new KMime::Content();
255
256 node->addContent(subNode);
257 node->addContent(encMsg);
258 encNode->addContent(encSubNode);
259
260 helper.attachExtraContent(subNode, subExtra);
261 helper.attachExtraContent(encSubNode, encSubExtra);
262
263 QCOMPARE(helper.fromAsString(node), tlSender);
264 QCOMPARE(helper.fromAsString(subNode), tlSender);
265 QCOMPARE(helper.fromAsString(subExtra), tlSender);
266 QEXPECT_FAIL("", "Returning sender of encapsulated message is not yet implemented", Continue);
267 QCOMPARE(helper.fromAsString(encNode), encSender);
268 QEXPECT_FAIL("", "Returning sender of encapsulated message is not yet implemented", Continue);
269 QCOMPARE(helper.fromAsString(encSubNode), encSender);
270 QEXPECT_FAIL("", "Returning sender of encapsulated message is not yet implemented", Continue);
271 QCOMPARE(helper.fromAsString(encSubExtra), encSender);
272}
273
274QTEST_GUILESS_MAIN(NodeHelperTest)
275
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/nodehelpertest.h b/framework/src/domain/mimetreeparser/otp/autotests/nodehelpertest.h
deleted file mode 100644
index d2ed772a..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/nodehelpertest.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/* Copyright 2015 Sandro Knauß <bugs@sandroknauss.de>
2
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public License as
5 published by the Free Software Foundation; either version 2 of
6 the License or (at your option) version 3 or any later version
7 accepted by the membership of KDE e.V. (or its successor approved
8 by the membership of KDE e.V.), which shall act as a proxy
9 defined in Section 14 of version 3 of the license.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef NODEHELPERTEST_H
20#define NODEHELPERTEST_H
21
22#include <QObject>
23
24#include <KMime/Message>
25
26namespace MimeTreeParser
27{
28
29class NodeHelperTest : public QObject
30{
31 Q_OBJECT
32
33public:
34 NodeHelperTest();
35
36private Q_SLOTS:
37 void testPersistentIndex();
38 void testLocalFiles();
39 void testHREF();
40 void testCreateTempDir();
41 void testFromAsString();
42};
43
44}
45#endif
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/setupenv.cpp b/framework/src/domain/mimetreeparser/otp/autotests/setupenv.cpp
deleted file mode 100644
index be7a8685..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/setupenv.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 Copyright (C) 2010 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
3 Copyright (c) 2010 Leo Franchi <lfranchi@kde.org>
4
5 This library is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Library General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or (at your
8 option) any later version.
9
10 This library is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 02110-1301, USA.
19*/
20
21#include "setupenv.h"
22
23#include <QStandardPaths>
24
25#include <QFile>
26#include <QDir>
27
28void MimeTreeParser::Test::setupEnv()
29{
30 setenv("LC_ALL", "C", 1);
31 setenv("KDEHOME", QFile::encodeName(QDir::homePath() + QString::fromLatin1("/.qttest")).constData(), 1);
32 QStandardPaths::setTestModeEnabled(true);
33}
34
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/setupenv.h b/framework/src/domain/mimetreeparser/otp/autotests/setupenv.h
deleted file mode 100644
index 3582853e..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/setupenv.h
+++ /dev/null
@@ -1,175 +0,0 @@
1/*
2 Copyright (C) 2010 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
3 Copyright (c) 2010 Leo Franchi <lfranchi@kde.org>
4
5 This library is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Library General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or (at your
8 option) any later version.
9
10 This library is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 02110-1301, USA.
19*/
20
21#ifndef MESSAGECORE_TESTS_UTIL_H
22#define MESSAGECORE_TESTS_UTIL_H
23
24#include <gpgme++/key.h>
25#include <attachmentstrategy.h>
26#include <bodypartformatter.h>
27#include <bodypartformatterbasefactory.h>
28#include <messagepartrenderer.h>
29#include <objecttreesource.h>
30
31namespace MimeTreeParser
32{
33
34namespace Test
35{
36
37/**
38* setup a environment variables for tests:
39* * set LC_ALL to C
40* * set KDEHOME
41*/
42void setupEnv();
43
44// We can't use EmptySource, since we need to control some emelnets of the source for tests to also test
45// loadExternal and htmlMail.
46class TestObjectTreeSource : public MimeTreeParser::Interface::ObjectTreeSource
47{
48public:
49 TestObjectTreeSource(MimeTreeParser::HtmlWriter *writer)
50 : mWriter(writer)
51 , mAttachmentStrategy(QStringLiteral("smart"))
52 , mPreferredMode(Util::Html)
53 , mHtmlLoadExternal(false)
54 , mDecryptMessage(false)
55 {
56 }
57
58 MimeTreeParser::HtmlWriter *htmlWriter() Q_DECL_OVERRIDE {
59 return mWriter;
60 }
61
62 bool htmlLoadExternal() const Q_DECL_OVERRIDE
63 {
64 return mHtmlLoadExternal;
65 }
66
67 void setHtmlLoadExternal(bool loadExternal)
68 {
69 mHtmlLoadExternal = loadExternal;
70 }
71
72 void setAttachmentStrategy(QString strategy)
73 {
74 mAttachmentStrategy = strategy;
75 }
76
77 const AttachmentStrategy *attachmentStrategy() Q_DECL_OVERRIDE {
78 return AttachmentStrategy::create(mAttachmentStrategy);
79 }
80
81 bool autoImportKeys() const Q_DECL_OVERRIDE
82 {
83 return true;
84 }
85
86 bool showEmoticons() const Q_DECL_OVERRIDE
87 {
88 return false;
89 }
90
91 bool showExpandQuotesMark() const Q_DECL_OVERRIDE
92 {
93 return false;
94 }
95
96 const BodyPartFormatterBaseFactory *bodyPartFormatterFactory() Q_DECL_OVERRIDE {
97 return &mBodyPartFormatterBaseFactory;
98 }
99
100 bool decryptMessage() const Q_DECL_OVERRIDE
101 {
102 return mDecryptMessage;
103 }
104
105 void setAllowDecryption(bool allowDecryption)
106 {
107 mDecryptMessage = allowDecryption;
108 }
109
110 void setShowSignatureDetails(bool showSignatureDetails)
111 {
112 mShowSignatureDetails = showSignatureDetails;
113 }
114
115 bool showSignatureDetails() const Q_DECL_OVERRIDE
116 {
117 return mShowSignatureDetails;
118 }
119
120 void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes) Q_DECL_OVERRIDE {
121 Q_UNUSED(mode);
122 Q_UNUSED(availableModes);
123 }
124
125 MimeTreeParser::Util::HtmlMode preferredMode() const Q_DECL_OVERRIDE
126 {
127 return mPreferredMode;
128 }
129
130 void setPreferredMode(MimeTreeParser::Util::HtmlMode mode)
131 {
132 mPreferredMode = mode;
133 }
134
135 int levelQuote() const Q_DECL_OVERRIDE
136 {
137 return 1;
138 }
139
140 const QTextCodec *overrideCodec() Q_DECL_OVERRIDE {
141 return nullptr;
142 }
143
144 QString createMessageHeader(KMime::Message *message) Q_DECL_OVERRIDE {
145 Q_UNUSED(message);
146 return QString(); //do nothing
147 }
148
149 QObject *sourceObject() Q_DECL_OVERRIDE {
150 return nullptr;
151 }
152
153 Interface::MessagePartRenderer::Ptr messagePartTheme(Interface::MessagePart::Ptr msgPart) Q_DECL_OVERRIDE {
154 Q_UNUSED(msgPart);
155 return Interface::MessagePartRenderer::Ptr();
156 }
157 bool isPrinting() const Q_DECL_OVERRIDE
158 {
159 return false;
160 }
161private:
162 MimeTreeParser::HtmlWriter *mWriter;
163 QString mAttachmentStrategy;
164 BodyPartFormatterBaseFactory mBodyPartFormatterBaseFactory;
165 MimeTreeParser::Util::HtmlMode mPreferredMode;
166 bool mHtmlLoadExternal;
167 bool mDecryptMessage;
168 bool mShowSignatureDetails;
169};
170
171}
172
173}
174
175#endif
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp b/framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp
deleted file mode 100644
index 0e411e8f..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
1/*
2 testcsshelper.cpp
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2013 Sandro Knauß <bugs@sandroknauss.de>
6
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License, version 2, as
9 published by the Free Software Foundation.
10
11 KMail is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20 In addition, as a special exception, the copyright holders give
21 permission to link the code of this program with any edition of
22 the Qt library by Trolltech AS, Norway (or with modified versions
23 of Qt that use the same license as Qt), and distribute linked
24 combinations including the two. You must obey the GNU General
25 Public License in all respects for all of the code used other than
26 Qt. If you modify this file, you may extend this exception to
27 your version of the file, but you are not obligated to do so. If
28 you do not wish to do so, delete this exception statement from
29 your version.
30*/
31
32#include "testcsshelper.h"
33
34#include <QColor>
35#include <QFont>
36#include <QPalette>
37#include <QApplication>
38
39namespace MimeTreeParser
40{
41
42TestCSSHelper::TestCSSHelper(const QPaintDevice *pd) :
43 CSSHelperBase(pd)
44{
45 mRecycleQuoteColors = false;
46 mBackgroundColor = QColor(0xff, 0xff, 0xff);
47 mForegroundColor = QColor(0x1f, 0x1c, 0x1b);
48 mLinkColor = QColor(0x00, 0x57, 0xae);
49 cPgpEncrH = QColor(0x00, 0x80, 0xff);
50 cPgpOk1H = QColor(0x40, 0xff, 0x40);
51 cPgpOk0H = QColor(0xff, 0xff, 0x40);
52 cPgpWarnH = QColor(0xff, 0xff, 0x40);
53 cPgpErrH = QColor(0xff, 0x00, 0x00);
54
55 cPgpEncrHT = QColor(0xff, 0xff, 0xff);
56 cPgpOk1HT = QColor(0x27, 0xae, 0x60);
57 cPgpOk0HT = QColor(0xf6, 0x74, 0x00);
58 cPgpWarnHT = QColor(0xf6, 0x74, 0x00);
59 cPgpErrHT = QColor(0xda, 0x44, 0x53);
60
61 cHtmlWarning = QColor(0xff, 0x40, 0x40);
62 for (int i = 0; i < 3; ++i) {
63 mQuoteColor[i] = QColor(0x00, 0x80 - i * 0x10, 0x00);
64 }
65
66 QFont defaultFont = QFont(QStringLiteral("Sans Serif"), 9);
67 mBodyFont = defaultFont;
68 mPrintFont = defaultFont;
69 mFixedFont = defaultFont;
70 mFixedPrintFont = defaultFont;
71 defaultFont.setItalic(true);
72 for (int i = 0; i < 3; ++i) {
73 mQuoteFont[i] = defaultFont;
74 }
75
76 mShrinkQuotes = false;
77
78 QPalette pal;
79
80 pal.setColor(QPalette::Background, QColor(0xd6, 0xd2, 0xd0));
81 pal.setColor(QPalette::Foreground, QColor(0x22, 0x1f, 0x1e));
82 pal.setColor(QPalette::Highlight, QColor(0x43, 0xac, 0xe8));
83 pal.setColor(QPalette::HighlightedText, QColor(0xff, 0xff, 0xff));
84 pal.setColor(QPalette::Mid, QColor(0xb3, 0xab, 0xa7));
85
86 QApplication::setPalette(pal);
87
88 recalculatePGPColors();
89}
90
91TestCSSHelper::~TestCSSHelper()
92{
93
94}
95
96QString TestCSSHelper::htmlHead(bool fixed) const
97{
98 Q_UNUSED(fixed);
99 return
100 QStringLiteral("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"
101 "<html>\n"
102 "<body>\n");
103}
104
105}
106
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.h b/framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.h
deleted file mode 100644
index c21935cf..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/* -*- c++ -*-
2 testcsshelper.h
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2013 Sandro Knauß <bugs@sandroknauss.de>
6
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License, version 2, as
9 published by the Free Software Foundation.
10
11 KMail is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20 In addition, as a special exception, the copyright holders give
21 permission to link the code of this program with any edition of
22 the Qt library by Trolltech AS, Norway (or with modified versions
23 of Qt that use the same license as Qt), and distribute linked
24 combinations including the two. You must obey the GNU General
25 Public License in all respects for all of the code used other than
26 Qt. If you modify this file, you may extend this exception to
27 your version of the file, but you are not obligated to do so. If
28 you do not wish to do so, delete this exception statement from
29 your version.
30*/
31
32#ifndef __MIMETREEPARSER_TESTCSSHELPER_H__
33#define __MIMETREEPARSER_TESTCSSHELPER_H__
34
35#include "viewer/csshelperbase.h"
36
37namespace MimeTreeParser
38{
39
40class TestCSSHelper : public CSSHelperBase
41{
42public:
43 explicit TestCSSHelper(const QPaintDevice *pd);
44 virtual ~TestCSSHelper();
45 QString htmlHead(bool fixed) const Q_DECL_OVERRIDE;
46};
47
48}
49
50#endif // __MIMETREEPARSER_TESTCSSHELPER_H__
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/util.cpp b/framework/src/domain/mimetreeparser/otp/autotests/util.cpp
deleted file mode 100644
index 5ea415b7..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/util.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 Copyright (c) 2010 Thomas McGuire <thomas.mcguire@kdab.com>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19#include "util.h"
20
21#include <QFile>
22
23KMime::Message::Ptr readAndParseMail(const QString &mailFile)
24{
25 QFile file(QLatin1String(MAIL_DATA_DIR) + QLatin1Char('/') + mailFile);
26 file.open(QIODevice::ReadOnly);
27 Q_ASSERT(file.isOpen());
28 const QByteArray data = KMime::CRLFtoLF(file.readAll());
29 Q_ASSERT(!data.isEmpty());
30 KMime::Message::Ptr msg(new KMime::Message);
31 msg->setContent(data);
32 msg->parse();
33 return msg;
34}
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/util.h b/framework/src/domain/mimetreeparser/otp/autotests/util.h
deleted file mode 100644
index ac4aa54f..00000000
--- a/framework/src/domain/mimetreeparser/otp/autotests/util.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 Copyright (c) 2010 Thomas McGuire <thomas.mcguire@kdab.com>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19#include "htmlwriter.h"
20
21#include <KMime/Message>
22
23class TestHtmlWriter : public MimeTreeParser::HtmlWriter
24{
25public:
26 explicit TestHtmlWriter() {}
27 virtual ~TestHtmlWriter() {}
28
29 void begin(const QString &) Q_DECL_OVERRIDE {}
30 void write(const QString &) Q_DECL_OVERRIDE {}
31 void end() Q_DECL_OVERRIDE {}
32 void reset() Q_DECL_OVERRIDE {}
33 void queue(const QString &str) Q_DECL_OVERRIDE {
34 html.append(str);
35 }
36 void flush() Q_DECL_OVERRIDE {}
37 void embedPart(const QByteArray &, const QString &) Q_DECL_OVERRIDE {}
38 void extraHead(const QString &) Q_DECL_OVERRIDE {}
39
40 QString html;
41};
42
43KMime::Message::Ptr readAndParseMail(const QString &mailFile);
diff --git a/framework/src/domain/mimetreeparser/otp/bodypart.cpp b/framework/src/domain/mimetreeparser/otp/bodypart.cpp
deleted file mode 100644
index 62e92d0c..00000000
--- a/framework/src/domain/mimetreeparser/otp/bodypart.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 This file is part of KMail's plugin interface.
3 Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
4 Ingo Kloecker <kloecker@kde.org>
5
6 KMail is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 KMail is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20 In addition, as a special exception, the copyright holders give
21 permission to link the code of this program with any edition of
22 the Qt library by Trolltech AS, Norway (or with modified versions
23 of Qt that use the same license as Qt), and distribute linked
24 combinations including the two. You must obey the GNU General
25 Public License in all respects for all of the code used other than
26 Qt. If you modify this file, you may extend this exception to
27 your version of the file, but you are not obligated to do so. If
28 you do not wish to do so, delete this exception statement from
29 your version.
30*/
31
32#include "bodypart.h"
33
34MimeTreeParser::Interface::BodyPartMemento::~BodyPartMemento()
35{
36}
37
38MimeTreeParser::Interface::BodyPart::~BodyPart()
39{
40}
41
diff --git a/framework/src/domain/mimetreeparser/otp/bodypart.h b/framework/src/domain/mimetreeparser/otp/bodypart.h
deleted file mode 100644
index f50c0360..00000000
--- a/framework/src/domain/mimetreeparser/otp/bodypart.h
+++ /dev/null
@@ -1,209 +0,0 @@
1/* -*- mode: C++; c-file-style: "gnu" -*-
2 bodypart.h
3
4 This file is part of KMail's plugin interface.
5 Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
6 Ingo Kloecker <kloecker@kde.org>
7
8 KMail is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#ifndef __MIMETREEPARSER_INTERFACES_BODYPART_H__
35#define __MIMETREEPARSER_INTERFACES_BODYPART_H__
36
37#include <QByteArray>
38#include <QString>
39
40namespace KMime
41{
42class Content;
43}
44
45namespace MimeTreeParser
46{
47class NodeHelper;
48class ObjectTreeParser;
49class ProcessResult;
50
51namespace Interface
52{
53
54class ObjectTreeSource;
55
56/*FIXME(Andras) review, port
57 class Observer;
58 class Observable;
59*/
60/**
61 @short interface of classes that implement status for BodyPartFormatters.
62*/
63class BodyPartMemento
64{
65public:
66 virtual ~BodyPartMemento();
67
68 virtual void detach() = 0;
69#if 0
70//FIXME(Andras) review, port
71 /** If your BodyPartMemento implementation also implements the
72 Observer interface, simply implement these as
73 <code>return this;</code>, else as <code>return
74 0;</code>. This is needed to avoid forcing a dependency of
75 plugins on internal KMail classes.
76 */
77 virtual Observer *asObserver() = 0;
78
79 /** If your BodyPartMemento implementation also implements the
80 Observable interface, simply implement these as
81 <code>return this;</code>, else as <code>return
82 0;</code>. This is needed to avoid forcing a dependency of
83 plugins on internal KMail classes.
84 */
85 virtual Observable *asObservable() = 0;
86#endif
87};
88
89/**
90 @short interface of message body parts.
91*/
92class BodyPart
93{
94public:
95 virtual ~BodyPart();
96
97 /**
98 @return a string respresentation of an URL that can be used
99 to invoke a BodyPartURLHandler for this body part.
100 */
101 virtual QString makeLink(const QString &path) const = 0;
102
103 /**
104 @return the decoded (CTE, canonicalisation, and charset
105 encoding undone) text contained in the body part, or
106 QString(), it the body part is not of type "text".
107 */
108 virtual QString asText() const = 0;
109
110 /**
111 @return the decoded (CTE undone) content of the body part, or
112 a null array if this body part instance is of type text.
113 */
114 virtual QByteArray asBinary() const = 0;
115
116 /**
117 @return the value of the content-type header field parameter
118 with name \a parameter, or QString(), if that that
119 parameter is not present in the body's content-type header
120 field. RFC 2231 encoding is removed first.
121
122 Note that this method will suppress queries to certain
123 standard parameters (most notably "charset") to keep plugins
124 decent.
125
126 Note2 that this method preserves the case of the parameter
127 value returned. So, if the parameter you want to use defines
128 the value to be case-insensitive (such as the smime-type
129 parameter), you need to make sure you do the casemap yourself
130 before comparing to a reference value.
131 */
132 virtual QString contentTypeParameter(const char *parameter) const = 0;
133
134 /**
135 @return the content of the content-description header field,
136 or QString() if that header is not present in this body
137 part. RFC 2047 encoding is decoded first.
138 */
139 virtual QString contentDescription() const = 0;
140
141 //virtual int contentDisposition() const = 0;
142 /**
143 @return the value of the content-disposition header field
144 parameter with name \a parameter, or QString() if that
145 parameter is not present in the body's content-disposition
146 header field. RFC 2231 encoding is removed first.
147
148 The notes made for contentTypeParameter() above apply here as
149 well.
150 */
151 virtual QString contentDispositionParameter(const char *parameter) const = 0;
152
153 /**
154 @return whether this part already has it's complete body
155 fetched e.g. from an IMAP server.
156 */
157 virtual bool hasCompleteBody() const = 0;
158
159 /**
160 @return the BodyPartMemento set for this part, or null, if
161 none is set.
162 */
163 virtual BodyPartMemento *memento() const = 0;
164
165 /**
166 @return register an implementation of the BodyPartMemento
167 interface as a status object with this part.
168 */
169 virtual void setBodyPartMemento(BodyPartMemento *) = 0;
170
171 enum Display { None, AsIcon, Inline };
172 /**
173 @return whether this body part should be displayed iconic or inline
174 */
175 virtual Display defaultDisplay() const = 0;
176
177 /** Returns the KMime::Content node represented here. Makes most of the above obsolete
178 and probably should be used in the interfaces in the first place.
179 */
180 virtual KMime::Content *content() const = 0;
181
182 /**
183 * Returns the top-level content.
184 * Note that this is _not_ necessarily the same as content()->topLevel(), for example the later
185 * will not work for "extra nodes", i.e. nodes in encrypted parts of the mail.
186 * topLevelContent() will return the correct result in this case. Also note that
187 * topLevelContent()
188 */
189 virtual KMime::Content *topLevelContent() const = 0;
190
191 /**
192 * Ok, this is ugly, exposing the node helper here, but there is too much useful stuff in there
193 * for real-world plugins. Still, there should be a nicer way for this.
194 */
195 virtual MimeTreeParser::NodeHelper *nodeHelper() const = 0;
196
197 /**
198 * For making it easier to refactor, add objectTreeParser
199 */
200 virtual MimeTreeParser::ObjectTreeParser *objectTreeParser() const = 0;
201 virtual MimeTreeParser::Interface::ObjectTreeSource *source() const = 0;
202 virtual MimeTreeParser::ProcessResult *processResult() const = 0;
203};
204
205} // namespace Interface
206
207}
208
209#endif // __MIMETREEPARSER_INTERFACES_BODYPART_H__
diff --git a/framework/src/domain/mimetreeparser/otp/bodypartformatter.cpp b/framework/src/domain/mimetreeparser/otp/bodypartformatter.cpp
deleted file mode 100644
index 63d7e92c..00000000
--- a/framework/src/domain/mimetreeparser/otp/bodypartformatter.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
1/* -*- mode: C++; c-file-style: "gnu" -*-
2 bodypartformatter.cpp
3
4 This file is part of KMail's plugin interface.
5 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
6
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 KMail is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
21 In addition, as a special exception, the copyright holders give
22 permission to link the code of this program with any edition of
23 the Qt library by Trolltech AS, Norway (or with modified versions
24 of Qt that use the same license as Qt), and distribute linked
25 combinations including the two. You must obey the GNU General
26 Public License in all respects for all of the code used other than
27 Qt. If you modify this file, you may extend this exception to
28 your version of the file, but you are not obligated to do so. If
29 you do not wish to do so, delete this exception statement from
30 your version.
31*/
32
33#include "bodypartformatter.h"
34
35#include "bodypart.h"
36#include "queuehtmlwriter.h"
37#include "objecttreeparser.h"
38
39using namespace MimeTreeParser::Interface;
40
41namespace MimeTreeParser
42{
43namespace Interface
44{
45
46class MessagePartPrivate
47{
48public:
49 MessagePartPrivate(const BodyPart *part)
50 : mHtmlWriter(nullptr)
51 , mPart(part)
52 , mParentPart(nullptr)
53 , mCreatedWriter(false)
54 {
55 }
56
57 ~MessagePartPrivate()
58 {
59 if (mCreatedWriter) {
60 delete mHtmlWriter;
61 }
62 }
63
64 MimeTreeParser::HtmlWriter *htmlWriter()
65 {
66 if (!mHtmlWriter && mPart) {
67 mHtmlWriter = mPart->objectTreeParser()->htmlWriter();
68 }
69 return mHtmlWriter;
70 }
71
72 MimeTreeParser::HtmlWriter *mHtmlWriter;
73 const BodyPart *mPart;
74 MessagePart *mParentPart;
75 bool mCreatedWriter;
76
77};
78}
79}
80
81MessagePart::MessagePart()
82 : QObject()
83 , d(new MessagePartPrivate(nullptr))
84{
85}
86
87MessagePart::MessagePart(const BodyPart &part)
88 : QObject()
89 , d(new MessagePartPrivate(&part))
90{
91}
92
93MessagePart::~MessagePart()
94{
95 delete d;
96}
97
98void MessagePart::html(bool decorate)
99{
100 Q_UNUSED(decorate);
101 static_cast<QueueHtmlWriter *>(d->mHtmlWriter)->replay();
102}
103
104QString MessagePart::text() const
105{
106 return QString();
107}
108
109MessagePart *MessagePart::parentPart() const
110{
111 return d->mParentPart;
112}
113
114void MessagePart::setParentPart(MessagePart *parentPart)
115{
116 d->mParentPart = parentPart;
117}
118
119QString MessagePart::htmlContent() const
120{
121 return text();
122}
123
124QString MessagePart::plaintextContent() const
125{
126 return text();
127}
128
129MimeTreeParser::HtmlWriter *MessagePart::htmlWriter() const
130{
131 return d->htmlWriter();
132}
133
134void MessagePart::setHtmlWriter(MimeTreeParser::HtmlWriter *htmlWriter) const
135{
136 if (d->mHtmlWriter) {
137 d->mHtmlWriter = htmlWriter;
138 }
139}
140
141MessagePart::Ptr BodyPartFormatter::process(BodyPart &part) const
142{
143 auto mp = MessagePart::Ptr(new MessagePart(part));
144 mp->setHtmlWriter(new QueueHtmlWriter(mp->htmlWriter()));
145 mp->d->mCreatedWriter = true;
146 return mp;
147}
diff --git a/framework/src/domain/mimetreeparser/otp/bodypartformatter.h b/framework/src/domain/mimetreeparser/otp/bodypartformatter.h
deleted file mode 100644
index 0116c2e4..00000000
--- a/framework/src/domain/mimetreeparser/otp/bodypartformatter.h
+++ /dev/null
@@ -1,149 +0,0 @@
1/* -*- mode: C++; c-file-style: "gnu" -*-
2 bodypartformatter.h
3
4 This file is part of KMail's plugin interface.
5 Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
6 Ingo Kloecker <kloecker@kde.org>
7
8 KMail is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#ifndef __MIMETREEPARSER_INTERFACE_BODYPARTFORMATTER_H__
35#define __MIMETREEPARSER_INTERFACE_BODYPARTFORMATTER_H__
36
37#include <QObject>
38#include <QSharedPointer>
39
40#include "objecttreeparser.h"
41
42namespace MimeTreeParser
43{
44class HtmlWriter;
45
46namespace Interface
47{
48
49class BodyPartURLHandler;
50class BodyPart;
51class MessagePartPrivate;
52
53class MessagePart : public QObject
54{
55 Q_OBJECT
56 Q_PROPERTY(QString plaintextContent READ plaintextContent)
57 Q_PROPERTY(QString htmlContent READ htmlContent)
58public:
59 typedef QSharedPointer<MessagePart> Ptr;
60 explicit MessagePart();
61 explicit MessagePart(const BodyPart &part);
62 virtual ~MessagePart();
63
64 virtual void html(bool decorate);
65 virtual QString text() const;
66
67 void setParentPart(MessagePart *parentPart);
68 MessagePart *parentPart() const;
69
70 virtual QString plaintextContent() const;
71 virtual QString htmlContent() const;
72
73 virtual MimeTreeParser::HtmlWriter *htmlWriter() const;
74 virtual void setHtmlWriter(MimeTreeParser::HtmlWriter *htmlWriter) const;
75private:
76 MessagePartPrivate *d;
77
78 friend class BodyPartFormatter;
79};
80
81class BodyPartFormatter
82{
83public:
84 virtual ~BodyPartFormatter() {}
85
86 /**
87 @li Ok returned when format() generated some HTML
88 @li NeedContent returned when format() needs the body of the part
89 @li AsIcon returned when the part should be shown iconified
90 @li Failed returned when formatting failed. Currently equivalent to Ok
91 */
92 enum Result { Ok, NeedContent, AsIcon, Failed };
93
94 /**
95 Format body part \a part by generating some HTML and writing
96 that to \a writer.
97
98 @return the result code (see above)
99 */
100 virtual Result format(BodyPart *part, MimeTreeParser::HtmlWriter *writer) const = 0;
101
102 /**
103 Variant of format that allows implementors to hook notifications up to
104 a listener interested in the result, for async operations.
105
106 @return the result code (see above)
107 */
108 virtual Result format(BodyPart *part, MimeTreeParser::HtmlWriter *writer, QObject *asyncResultObserver) const
109 {
110 Q_UNUSED(asyncResultObserver);
111 return format(part, writer);
112 }
113
114 virtual void adaptProcessResult(ProcessResult &result) const
115 {
116 Q_UNUSED(result);
117 }
118 virtual MessagePart::Ptr process(BodyPart &part) const;
119};
120
121/**
122 @short interface for BodyPartFormatter plugins
123
124 The interface is queried by for types, subtypes, and the
125 corresponding bodypart formatter, and the result inserted into
126 the bodypart formatter factory.
127
128 Subtype alone or both type and subtype may be "*", which is
129 taken as a wildcard, so that e.g. type=text subtype=* matches
130 any text subtype, but with lesser specificity than a concrete
131 mimetype such as text/plain. type=* is only allowed when
132 subtype=*, too.
133*/
134class BodyPartFormatterPlugin
135{
136public:
137 virtual ~BodyPartFormatterPlugin() {}
138
139 virtual const BodyPartFormatter *bodyPartFormatter(int idx) const = 0;
140 virtual const char *type(int idx) const = 0;
141 virtual const char *subtype(int idx) const = 0;
142
143 virtual const BodyPartURLHandler *urlHandler(int idx) const = 0;
144};
145
146} // namespace Interface
147
148}
149#endif // __MIMETREEPARSER_INTERFACE_BODYPARTFORMATTER_H__
diff --git a/framework/src/domain/mimetreeparser/otp/bodypartformatter_impl.cpp b/framework/src/domain/mimetreeparser/otp/bodypartformatter_impl.cpp
deleted file mode 100644
index c8622ba3..00000000
--- a/framework/src/domain/mimetreeparser/otp/bodypartformatter_impl.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
1/* -*- c++ -*-
2 bodypartformatter.cpp
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License, version 2, as
9 published by the Free Software Foundation.
10
11 KMail is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20 In addition, as a special exception, the copyright holders give
21 permission to link the code of this program with any edition of
22 the Qt library by Trolltech AS, Norway (or with modified versions
23 of Qt that use the same license as Qt), and distribute linked
24 combinations including the two. You must obey the GNU General
25 Public License in all respects for all of the code used other than
26 Qt. If you modify this file, you may extend this exception to
27 your version of the file, but you are not obligated to do so. If
28 you do not wish to do so, delete this exception statement from
29 your version.
30*/
31
32#include "mimetreeparser_debug.h"
33
34#include "applicationpgpencrypted.h"
35#include "applicationpkcs7mime.h"
36#include "mailman.h"
37#include "multipartalternative.h"
38#include "multipartmixed.h"
39#include "multipartencrypted.h"
40#include "multipartsigned.h"
41#include "texthtml.h"
42#include "textplain.h"
43
44#include "bodypartformatter.h"
45#include "bodypart.h"
46
47#include "bodypartformatterbasefactory.h"
48#include "bodypartformatterbasefactory_p.h"
49
50#include "attachmentstrategy.h"
51#include "objecttreeparser.h"
52#include "messagepart.h"
53
54#include <KMime/Content>
55
56using namespace MimeTreeParser;
57
58namespace
59{
60class AnyTypeBodyPartFormatter
61 : public MimeTreeParser::Interface::BodyPartFormatter
62{
63 static const AnyTypeBodyPartFormatter *self;
64public:
65 Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE
66 {
67 qCDebug(MIMETREEPARSER_LOG) << "Acting as a Interface::BodyPartFormatter!";
68 return AsIcon;
69 }
70
71 // unhide the overload with three arguments
72 using MimeTreeParser::Interface::BodyPartFormatter::format;
73
74 void adaptProcessResult(ProcessResult &result) const Q_DECL_OVERRIDE
75 {
76 result.setNeverDisplayInline(true);
77 }
78 static const MimeTreeParser::Interface::BodyPartFormatter *create()
79 {
80 if (!self) {
81 self = new AnyTypeBodyPartFormatter();
82 }
83 return self;
84 }
85};
86
87const AnyTypeBodyPartFormatter *AnyTypeBodyPartFormatter::self = nullptr;
88
89class ImageTypeBodyPartFormatter
90 : public MimeTreeParser::Interface::BodyPartFormatter
91{
92 static const ImageTypeBodyPartFormatter *self;
93public:
94 Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE
95 {
96 return AsIcon;
97 }
98
99 // unhide the overload with three arguments
100 using MimeTreeParser::Interface::BodyPartFormatter::format;
101
102 void adaptProcessResult(ProcessResult &result) const Q_DECL_OVERRIDE
103 {
104 result.setNeverDisplayInline(false);
105 result.setIsImage(true);
106 }
107 static const MimeTreeParser::Interface::BodyPartFormatter *create()
108 {
109 if (!self) {
110 self = new ImageTypeBodyPartFormatter();
111 }
112 return self;
113 }
114};
115
116const ImageTypeBodyPartFormatter *ImageTypeBodyPartFormatter::self = nullptr;
117
118class MessageRfc822BodyPartFormatter
119 : public MimeTreeParser::Interface::BodyPartFormatter
120{
121 static const MessageRfc822BodyPartFormatter *self;
122public:
123 Interface::MessagePart::Ptr process(Interface::BodyPart &) const Q_DECL_OVERRIDE;
124 MimeTreeParser::Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
125 using MimeTreeParser::Interface::BodyPartFormatter::format;
126 static const MimeTreeParser::Interface::BodyPartFormatter *create();
127};
128
129const MessageRfc822BodyPartFormatter *MessageRfc822BodyPartFormatter::self;
130
131const MimeTreeParser::Interface::BodyPartFormatter *MessageRfc822BodyPartFormatter::create()
132{
133 if (!self) {
134 self = new MessageRfc822BodyPartFormatter();
135 }
136 return self;
137}
138
139Interface::MessagePart::Ptr MessageRfc822BodyPartFormatter::process(Interface::BodyPart &part) const
140{
141 const KMime::Message::Ptr message = part.content()->bodyAsMessage();
142 return MessagePart::Ptr(new EncapsulatedRfc822MessagePart(part.objectTreeParser(), part.content(), message));
143}
144
145Interface::BodyPartFormatter::Result MessageRfc822BodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
146{
147 Q_UNUSED(writer)
148 const ObjectTreeParser *otp = part->objectTreeParser();
149 const auto p = process(*part);
150 const auto mp = static_cast<MessagePart *>(p.data());
151 if (mp) {
152 if (!otp->attachmentStrategy()->inlineNestedMessages() && !otp->showOnlyOneMimePart()) {
153 return Failed;
154 } else {
155 mp->html(true);
156 return Ok;
157 }
158 } else {
159 return Failed;
160 }
161}
162
163typedef TextPlainBodyPartFormatter ApplicationPgpBodyPartFormatter;
164
165} // anon namespace
166
167void BodyPartFormatterBaseFactoryPrivate::messageviewer_create_builtin_bodypart_formatters()
168{
169 insert("application", "octet-stream", AnyTypeBodyPartFormatter::create());
170 insert("application", "pgp", ApplicationPgpBodyPartFormatter::create());
171 insert("application", "pkcs7-mime", ApplicationPkcs7MimeBodyPartFormatter::create());
172 insert("application", "x-pkcs7-mime", ApplicationPkcs7MimeBodyPartFormatter::create());
173 insert("application", "pgp-encrypted", ApplicationPGPEncryptedBodyPartFormatter::create());
174 insert("application", "*", AnyTypeBodyPartFormatter::create());
175
176 insert("text", "html", TextHtmlBodyPartFormatter::create());
177 insert("text", "rtf", AnyTypeBodyPartFormatter::create());
178 insert("text", "plain", MailmanBodyPartFormatter::create());
179 insert("text", "plain", TextPlainBodyPartFormatter::create());
180 insert("text", "*", MailmanBodyPartFormatter::create());
181 insert("text", "*", TextPlainBodyPartFormatter::create());
182
183 insert("image", "*", ImageTypeBodyPartFormatter::create());
184
185 insert("message", "rfc822", MessageRfc822BodyPartFormatter::create());
186 insert("message", "*", AnyTypeBodyPartFormatter::create());
187
188 insert("multipart", "alternative", MultiPartAlternativeBodyPartFormatter::create());
189 insert("multipart", "encrypted", MultiPartEncryptedBodyPartFormatter::create());
190 insert("multipart", "signed", MultiPartSignedBodyPartFormatter::create());
191 insert("multipart", "*", MultiPartMixedBodyPartFormatter::create());
192 insert("*", "*", AnyTypeBodyPartFormatter::create());
193}
diff --git a/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.cpp b/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.cpp
deleted file mode 100644
index fb02945b..00000000
--- a/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
1/*
2 bodypartformatterfactory.cpp
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
6 Ingo Kloecker <kloecker@kde.org>
7
8 KMail is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#include "bodypartformatterbasefactory.h"
35#include "bodypartformatterbasefactory_p.h"
36#include "mimetreeparser_debug.h"
37
38// Qt
39
40#include <assert.h>
41
42using namespace MimeTreeParser;
43
44BodyPartFormatterBaseFactoryPrivate::BodyPartFormatterBaseFactoryPrivate(BodyPartFormatterBaseFactory *factory)
45 : q(factory)
46 , all(nullptr)
47{
48}
49
50BodyPartFormatterBaseFactoryPrivate::~BodyPartFormatterBaseFactoryPrivate()
51{
52 if (all) {
53 delete all;
54 all = nullptr;
55 }
56}
57
58void BodyPartFormatterBaseFactoryPrivate::setup()
59{
60 if (!all) {
61 all = new TypeRegistry();
62 messageviewer_create_builtin_bodypart_formatters();
63 q->loadPlugins();
64 }
65}
66
67void BodyPartFormatterBaseFactoryPrivate::insert(const char *type, const char *subtype, const Interface::BodyPartFormatter *formatter)
68{
69 if (!type || !*type || !subtype || !*subtype || !formatter || !all) {
70 return;
71 }
72
73 TypeRegistry::iterator type_it = all->find(type);
74 if (type_it == all->end()) {
75 qCDebug(MIMETREEPARSER_LOG) << "BodyPartFormatterBaseFactory: instantiating new Subtype Registry for \""
76 << type << "\"";
77 type_it = all->insert(std::make_pair(type, SubtypeRegistry())).first;
78 assert(type_it != all->end());
79 }
80
81 SubtypeRegistry &subtype_reg = type_it->second;
82
83 subtype_reg.insert(std::make_pair(subtype, formatter));
84}
85
86BodyPartFormatterBaseFactory::BodyPartFormatterBaseFactory()
87 : d(new BodyPartFormatterBaseFactoryPrivate(this))
88{
89}
90
91BodyPartFormatterBaseFactory::~BodyPartFormatterBaseFactory()
92{
93 delete d;
94}
95
96void BodyPartFormatterBaseFactory::insert(const char *type, const char *subtype, const Interface::BodyPartFormatter *formatter)
97{
98 d->insert(type, subtype, formatter);
99}
100
101const SubtypeRegistry &BodyPartFormatterBaseFactory::subtypeRegistry(const char *type) const
102{
103 if (!type || !*type) {
104 type = "*"; //krazy:exclude=doublequote_chars
105 }
106
107 d->setup();
108 assert(d->all);
109
110 static SubtypeRegistry emptyRegistry;
111 if (d->all->empty()) {
112 return emptyRegistry;
113 }
114
115 TypeRegistry::const_iterator type_it = d->all->find(type);
116 if (type_it == d->all->end()) {
117 type_it = d->all->find("*");
118 }
119 if (type_it == d->all->end()) {
120 return emptyRegistry;
121 }
122
123 const SubtypeRegistry &subtype_reg = type_it->second;
124 if (subtype_reg.empty()) {
125 return emptyRegistry;
126 }
127 return subtype_reg;
128}
129
130SubtypeRegistry::const_iterator BodyPartFormatterBaseFactory::createForIterator(const char *type, const char *subtype) const
131{
132 if (!type || !*type) {
133 type = "*"; //krazy:exclude=doublequote_chars
134 }
135 if (!subtype || !*subtype) {
136 subtype = "*"; //krazy:exclude=doublequote_chars
137 }
138
139 d->setup();
140 assert(d->all);
141
142 if (d->all->empty()) {
143 return SubtypeRegistry::const_iterator();
144 }
145
146 TypeRegistry::const_iterator type_it = d->all->find(type);
147 if (type_it == d->all->end()) {
148 type_it = d->all->find("*");
149 }
150 if (type_it == d->all->end()) {
151 return SubtypeRegistry::const_iterator();
152 }
153
154 const SubtypeRegistry &subtype_reg = type_it->second;
155 if (subtype_reg.empty()) {
156 return SubtypeRegistry::const_iterator();
157 }
158
159 SubtypeRegistry::const_iterator subtype_it = subtype_reg.find(subtype);
160 qCWarning(MIMETREEPARSER_LOG) << type << subtype << subtype_reg.size();
161 if (subtype_it == subtype_reg.end()) {
162 subtype_it = subtype_reg.find("*");
163 }
164 if (subtype_it == subtype_reg.end()) {
165 return SubtypeRegistry::const_iterator();
166 }
167
168 if (!(*subtype_it).second) {
169 qCWarning(MIMETREEPARSER_LOG) << "BodyPartFormatterBaseFactory: a null bodypart formatter sneaked in for \""
170 << type << "/" << subtype << "\"!";
171 }
172
173 return subtype_it;
174}
175
176void BodyPartFormatterBaseFactory::loadPlugins()
177{
178 qCDebug(MIMETREEPARSER_LOG) << "plugin loading is not enabled in libmimetreeparser";
179}
diff --git a/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h b/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h
deleted file mode 100644
index 2bba551d..00000000
--- a/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h
+++ /dev/null
@@ -1,85 +0,0 @@
1/*
2 bodypartformatterfactory.h
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
6 Ingo Kloecker <kloecker@kde.org>
7
8 KMail is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#ifndef __MIMETREEPARSER_BODYPARTFORMATTERBASEFACTORY_H__
35#define __MIMETREEPARSER_BODYPARTFORMATTERBASEFACTORY_H__
36
37#include <map>
38#include <QByteArray>
39
40namespace MimeTreeParser
41{
42
43namespace Interface
44{
45class BodyPartFormatter;
46}
47
48struct ltstr {
49 bool operator()(const char *s1, const char *s2) const
50 {
51 return qstricmp(s1, s2) < 0;
52 }
53};
54
55typedef std::multimap<const char *, const Interface::BodyPartFormatter *, ltstr> SubtypeRegistry;
56typedef std::map<const char *, MimeTreeParser::SubtypeRegistry, MimeTreeParser::ltstr> TypeRegistry;
57
58class BodyPartFormatterBaseFactoryPrivate;
59
60class BodyPartFormatterBaseFactory
61{
62public:
63 BodyPartFormatterBaseFactory();
64 virtual ~BodyPartFormatterBaseFactory();
65
66 SubtypeRegistry::const_iterator createForIterator(const char *type, const char *subtype) const;
67 const SubtypeRegistry &subtypeRegistry(const char *type) const;
68
69protected:
70 void insert(const char *type, const char *subtype, const Interface::BodyPartFormatter *formatter);
71 virtual void loadPlugins();
72private:
73 static BodyPartFormatterBaseFactory *mSelf;
74
75 BodyPartFormatterBaseFactoryPrivate *d;
76 friend class BodyPartFormatterBaseFactoryPrivate;
77private:
78 // disabled
79 const BodyPartFormatterBaseFactory &operator=(const BodyPartFormatterBaseFactory &);
80 BodyPartFormatterBaseFactory(const BodyPartFormatterBaseFactory &);
81};
82
83}
84
85#endif // __MIMETREEPARSER_BODYPARTFORMATTERFACTORY_H__
diff --git a/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory_p.h b/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory_p.h
deleted file mode 100644
index 1f71f183..00000000
--- a/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory_p.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/* -*- mode: C++; c-file-style: "gnu" -*-
2 bodypartformatterfactory.h
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
6 Ingo Kloecker <kloecker@kde.org>
7
8 KMail is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#ifndef __MIMETREEPARSER_BODYPARTFORMATTERBASEFACTORY_P_H__
35#define __MIMETREEPARSER_BODYPARTFORMATTERBASEFACTORY_P_H__
36
37namespace MimeTreeParser
38{
39class BodyPartFormatterBaseFactory;
40
41class BodyPartFormatterBaseFactoryPrivate
42{
43public:
44 BodyPartFormatterBaseFactoryPrivate(BodyPartFormatterBaseFactory *factory);
45 ~BodyPartFormatterBaseFactoryPrivate();
46
47 void setup();
48 void messageviewer_create_builtin_bodypart_formatters(); //defined in bodypartformatter.cpp
49 void insert(const char *type, const char *subtype, const Interface::BodyPartFormatter *formatter);
50
51 BodyPartFormatterBaseFactory *q;
52 TypeRegistry *all;
53};
54
55}
56
57#endif // __MIMETREEPARSER_BODYPARTFORMATTERFACTORY_P_H__
diff --git a/framework/src/domain/mimetreeparser/otp/cryptobodypartmemento.cpp b/framework/src/domain/mimetreeparser/otp/cryptobodypartmemento.cpp
deleted file mode 100644
index a884ec36..00000000
--- a/framework/src/domain/mimetreeparser/otp/cryptobodypartmemento.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 Copyright (c) 2014-2017 Montel Laurent <montel@kde.org>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#include "cryptobodypartmemento.h"
19
20using namespace GpgME;
21using namespace MimeTreeParser;
22
23CryptoBodyPartMemento::CryptoBodyPartMemento()
24 : QObject(nullptr),
25 Interface::BodyPartMemento(),
26 m_running(false)
27{
28
29}
30
31CryptoBodyPartMemento::~CryptoBodyPartMemento()
32{
33
34}
35
36bool CryptoBodyPartMemento::isRunning() const
37{
38 return m_running;
39}
40
41void CryptoBodyPartMemento::setAuditLog(const Error &err, const QString &log)
42{
43 m_auditLogError = err;
44 m_auditLog = log;
45}
46
47void CryptoBodyPartMemento::setRunning(bool running)
48{
49 m_running = running;
50}
51
52void CryptoBodyPartMemento::detach()
53{
54 disconnect(this, SIGNAL(update(MimeTreeParser::UpdateMode)), nullptr, nullptr);
55}
56
diff --git a/framework/src/domain/mimetreeparser/otp/cryptobodypartmemento.h b/framework/src/domain/mimetreeparser/otp/cryptobodypartmemento.h
deleted file mode 100644
index 076ed890..00000000
--- a/framework/src/domain/mimetreeparser/otp/cryptobodypartmemento.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 Copyright (c) 2014-2016 Montel Laurent <montel@kde.org>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#ifndef __MIMETREEPARSER_CRYPTOBODYPARTMEMENTO_H__
19#define __MIMETREEPARSER_CRYPTOBODYPARTMEMENTO_H__
20
21#include <gpgme++/error.h>
22
23#include <QObject>
24#include <QString>
25
26#include "bodypart.h"
27#include "enums.h"
28
29namespace MimeTreeParser
30{
31
32class CryptoBodyPartMemento
33 : public QObject,
34 public Interface::BodyPartMemento
35{
36 Q_OBJECT
37public:
38 CryptoBodyPartMemento();
39 ~CryptoBodyPartMemento();
40
41 virtual bool start() = 0;
42 virtual void exec() = 0;
43 bool isRunning() const;
44
45 const QString &auditLogAsHtml() const
46 {
47 return m_auditLog;
48 }
49 GpgME::Error auditLogError() const
50 {
51 return m_auditLogError;
52 }
53
54 void detach() Q_DECL_OVERRIDE;
55
56Q_SIGNALS:
57 void update(MimeTreeParser::UpdateMode);
58
59protected Q_SLOTS:
60 void notify()
61 {
62 Q_EMIT update(MimeTreeParser::Force);
63 }
64
65protected:
66 void setAuditLog(const GpgME::Error &err, const QString &log);
67 void setRunning(bool running);
68
69private:
70 bool m_running;
71 QString m_auditLog;
72 GpgME::Error m_auditLogError;
73};
74}
75#endif // __MIMETREEPARSER_CRYPTOBODYPARTMEMENTO_H__
diff --git a/framework/src/domain/mimetreeparser/otp/cryptohelper.cpp b/framework/src/domain/mimetreeparser/otp/cryptohelper.cpp
deleted file mode 100644
index 8e5df576..00000000
--- a/framework/src/domain/mimetreeparser/otp/cryptohelper.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
1/*
2 Copyright (C) 2015 Sandro Knauß <knauss@kolabsys.com>
3 Copyright (C) 2001,2002 the KPGP authors
4 See file AUTHORS.kpgp for details
5
6 Kmail is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 You should have received a copy of the GNU General Public License
12 along with this program; if not, write to the Free Software Foundation,
13 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
14 */
15
16#include "cryptohelper.h"
17
18using namespace MimeTreeParser;
19
20PGPBlockType Block::determineType() const
21{
22 const QByteArray data = text();
23 if (data.startsWith("-----BEGIN PGP SIGNED")) {
24 return ClearsignedBlock;
25 } else if (data.startsWith("-----BEGIN PGP SIGNATURE")) {
26 return SignatureBlock;
27 } else if (data.startsWith("-----BEGIN PGP PUBLIC")) {
28 return PublicKeyBlock;
29 } else if (data.startsWith("-----BEGIN PGP PRIVATE")
30 || data.startsWith("-----BEGIN PGP SECRET")) {
31 return PrivateKeyBlock;
32 } else if (data.startsWith("-----BEGIN PGP MESSAGE")) {
33 if (data.startsWith("-----BEGIN PGP MESSAGE PART")) {
34 return MultiPgpMessageBlock;
35 } else {
36 return PgpMessageBlock;
37 }
38 } else if (data.startsWith("-----BEGIN PGP ARMORED FILE")) {
39 return PgpMessageBlock;
40 } else if (data.startsWith("-----BEGIN PGP ")) {
41 return UnknownBlock;
42 } else {
43 return NoPgpBlock;
44 }
45}
46
47QList<Block> MimeTreeParser::prepareMessageForDecryption(const QByteArray &msg)
48{
49 PGPBlockType pgpBlock = NoPgpBlock;
50 QList<Block> blocks;
51 int start = -1; // start of the current PGP block
52 int lastEnd = -1; // end of the last PGP block
53 const int length = msg.length();
54
55 if (msg.isEmpty()) {
56 return blocks;
57 }
58
59 if (msg.startsWith("-----BEGIN PGP ")) {
60 start = 0;
61 } else {
62 start = msg.indexOf("\n-----BEGIN PGP ") + 1;
63 if (start == 0) {
64 blocks.append(Block(msg, NoPgpBlock));
65 return blocks;
66 }
67 }
68
69 while (start != -1) {
70 int nextEnd, nextStart;
71
72 // is the PGP block a clearsigned block?
73 if (!strncmp(msg.constData() + start + 15, "SIGNED", 6)) {
74 pgpBlock = ClearsignedBlock;
75 } else {
76 pgpBlock = UnknownBlock;
77 }
78
79 nextEnd = msg.indexOf("\n-----END PGP ", start + 15);
80 nextStart = msg.indexOf("\n-----BEGIN PGP ", start + 15);
81
82 if (nextEnd == -1) { // Missing END PGP line
83 if (lastEnd != -1) {
84 blocks.append(Block(msg.mid(lastEnd + 1), UnknownBlock));
85 } else {
86 blocks.append(Block(msg.mid(start), UnknownBlock));
87 }
88 break;
89 }
90
91 if ((nextStart == -1) || (nextEnd < nextStart) || (pgpBlock == ClearsignedBlock)) {
92 // most likely we found a PGP block (but we don't check if it's valid)
93
94 // store the preceding non-PGP block
95 if (start - lastEnd - 1 > 0) {
96 blocks.append(Block(msg.mid(lastEnd + 1, start - lastEnd - 1), NoPgpBlock));
97 }
98
99 lastEnd = msg.indexOf("\n", nextEnd + 14);
100 if (lastEnd == -1) {
101 if (start < length) {
102 blocks.append(Block(msg.mid(start)));
103 }
104 break;
105 } else {
106 blocks.append(Block(msg.mid(start, lastEnd + 1 - start)));
107 if ((nextStart != -1) && (nextEnd > nextStart)) {
108 nextStart = msg.indexOf("\n-----BEGIN PGP ", lastEnd + 1);
109 }
110 }
111 }
112
113 start = nextStart;
114
115 if (start == -1) {
116 if (lastEnd + 1 < length) {
117 //rest of mail is no PGP Block
118 blocks.append(Block(msg.mid(lastEnd + 1), NoPgpBlock));
119 }
120 break;
121 } else {
122 start++; // move start behind the '\n'
123 }
124 }
125
126 return blocks;
127}
128
129Block::Block(const QByteArray &m)
130 : msg(m)
131{
132 mType = determineType();
133}
134
135Block::Block(const QByteArray &m, PGPBlockType t)
136 : msg(m)
137 , mType(t)
138{
139
140}
141
142QByteArray MimeTreeParser::Block::text() const
143{
144 return msg;
145}
146
147PGPBlockType Block::type() const
148{
149 return mType;
150}
diff --git a/framework/src/domain/mimetreeparser/otp/cryptohelper.h b/framework/src/domain/mimetreeparser/otp/cryptohelper.h
deleted file mode 100644
index f09771c3..00000000
--- a/framework/src/domain/mimetreeparser/otp/cryptohelper.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 cryptohelper.h
3
4 Copyright (C) 2015 Sandro Knauß <knauss@kolabsys.com>
5 Copyright (C) 2001,2002 the KPGP authors
6 See file AUTHORS.kpgp for details
7
8 KMail is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software Foundation,
15 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17
18#ifndef __MIMETREEPARSER_CRYPTOHELPER_H__
19#define __MIMETREEPARSER_CRYPTOHELPER_H__
20
21#include <QByteArray>
22#include <QList>
23
24namespace MimeTreeParser
25{
26
27enum PGPBlockType {
28 UnknownBlock = -1, // BEGIN PGP ???
29 NoPgpBlock = 0,
30 PgpMessageBlock = 1, // BEGIN PGP MESSAGE
31 MultiPgpMessageBlock = 2, // BEGIN PGP MESSAGE, PART X[/Y]
32 SignatureBlock = 3, // BEGIN PGP SIGNATURE
33 ClearsignedBlock = 4, // BEGIN PGP SIGNED MESSAGE
34 PublicKeyBlock = 5, // BEGIN PGP PUBLIC KEY BLOCK
35 PrivateKeyBlock = 6 // BEGIN PGP PRIVATE KEY BLOCK (PGP 2.x: ...SECRET...)
36};
37
38class Block
39{
40public:
41 Block(const QByteArray &m);
42
43 Block(const QByteArray &m, PGPBlockType t);
44
45 QByteArray text() const;
46 PGPBlockType type() const;
47 PGPBlockType determineType() const;
48
49 QByteArray msg;
50 PGPBlockType mType;
51};
52
53/** Parses the given message and splits it into OpenPGP blocks and
54 Non-OpenPGP blocks.
55*/
56QList<Block> prepareMessageForDecryption(const QByteArray &msg);
57
58} // namespace MimeTreeParser
59
60Q_DECLARE_TYPEINFO(MimeTreeParser::Block, Q_MOVABLE_TYPE);
61
62#endif
diff --git a/framework/src/domain/mimetreeparser/otp/decryptverifybodypartmemento.cpp b/framework/src/domain/mimetreeparser/otp/decryptverifybodypartmemento.cpp
deleted file mode 100644
index 9810797a..00000000
--- a/framework/src/domain/mimetreeparser/otp/decryptverifybodypartmemento.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
1/*
2 Copyright (c) 2014-2017 Montel Laurent <montel@kde.org>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#include "decryptverifybodypartmemento.h"
19
20#include <QGpgME/DecryptVerifyJob>
21
22#include <qstringlist.h>
23
24using namespace QGpgME;
25using namespace GpgME;
26using namespace MimeTreeParser;
27
28DecryptVerifyBodyPartMemento::DecryptVerifyBodyPartMemento(DecryptVerifyJob *job, const QByteArray &cipherText)
29 : CryptoBodyPartMemento(),
30 m_cipherText(cipherText),
31 m_job(job)
32{
33 Q_ASSERT(m_job);
34}
35
36DecryptVerifyBodyPartMemento::~DecryptVerifyBodyPartMemento()
37{
38 if (m_job) {
39 m_job->slotCancel();
40 }
41}
42
43bool DecryptVerifyBodyPartMemento::start()
44{
45 Q_ASSERT(m_job);
46 if (const Error err = m_job->start(m_cipherText)) {
47 m_dr = DecryptionResult(err);
48 return false;
49 }
50 connect(m_job.data(), &DecryptVerifyJob::result,
51 this, &DecryptVerifyBodyPartMemento::slotResult);
52 setRunning(true);
53 return true;
54}
55
56void DecryptVerifyBodyPartMemento::exec()
57{
58 Q_ASSERT(m_job);
59 QByteArray plainText;
60 setRunning(true);
61 const std::pair<DecryptionResult, VerificationResult> p = m_job->exec(m_cipherText, plainText);
62 saveResult(p.first, p.second, plainText);
63 m_job->deleteLater(); // exec'ed jobs don't delete themselves
64 m_job = nullptr;
65}
66
67void DecryptVerifyBodyPartMemento::saveResult(const DecryptionResult &dr,
68 const VerificationResult &vr,
69 const QByteArray &plainText)
70{
71 Q_ASSERT(m_job);
72 setRunning(false);
73 m_dr = dr;
74 m_vr = vr;
75 m_plainText = plainText;
76 setAuditLog(m_job->auditLogError(), m_job->auditLogAsHtml());
77}
78
79void DecryptVerifyBodyPartMemento::slotResult(const DecryptionResult &dr,
80 const VerificationResult &vr,
81 const QByteArray &plainText)
82{
83 saveResult(dr, vr, plainText);
84 m_job = nullptr;
85 notify();
86}
diff --git a/framework/src/domain/mimetreeparser/otp/decryptverifybodypartmemento.h b/framework/src/domain/mimetreeparser/otp/decryptverifybodypartmemento.h
deleted file mode 100644
index 4781abe2..00000000
--- a/framework/src/domain/mimetreeparser/otp/decryptverifybodypartmemento.h
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 Copyright (c) 2014-2016 Montel Laurent <montel@kde.org>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#ifndef __MIMETREEPARSER_DECRYPTVERIFYBODYPARTMEMENTO_H__
19#define __MIMETREEPARSER_DECRYPTVERIFYBODYPARTMEMENTO_H__
20
21#include "cryptobodypartmemento.h"
22
23#include <gpgme++/verificationresult.h>
24#include <gpgme++/decryptionresult.h>
25
26#include <QPointer>
27
28#include "bodypart.h"
29
30namespace QGpgME
31{
32class DecryptVerifyJob;
33}
34
35namespace MimeTreeParser
36{
37
38class DecryptVerifyBodyPartMemento
39 : public CryptoBodyPartMemento
40{
41 Q_OBJECT
42public:
43 DecryptVerifyBodyPartMemento(QGpgME::DecryptVerifyJob *job, const QByteArray &cipherText);
44 ~DecryptVerifyBodyPartMemento();
45
46 bool start() Q_DECL_OVERRIDE;
47 void exec() Q_DECL_OVERRIDE;
48
49 const QByteArray &plainText() const
50 {
51 return m_plainText;
52 }
53 const GpgME::DecryptionResult &decryptResult() const
54 {
55 return m_dr;
56 }
57 const GpgME::VerificationResult &verifyResult() const
58 {
59 return m_vr;
60 }
61
62private Q_SLOTS:
63 void slotResult(const GpgME::DecryptionResult &dr,
64 const GpgME::VerificationResult &vr,
65 const QByteArray &plainText);
66
67private:
68 void saveResult(const GpgME::DecryptionResult &,
69 const GpgME::VerificationResult &,
70 const QByteArray &);
71private:
72 // input:
73 const QByteArray m_cipherText;
74 QPointer<QGpgME::DecryptVerifyJob> m_job;
75 // output:
76 GpgME::DecryptionResult m_dr;
77 GpgME::VerificationResult m_vr;
78 QByteArray m_plainText;
79};
80}
81#endif // __MIMETREEPARSER_DECRYPTVERIFYBODYPARTMEMENTO_H__
diff --git a/framework/src/domain/mimetreeparser/otp/enums.h b/framework/src/domain/mimetreeparser/otp/enums.h
deleted file mode 100644
index bec5a028..00000000
--- a/framework/src/domain/mimetreeparser/otp/enums.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#ifndef __MIMETREEPARSER_ENUMS_H__
20#define __MIMETREEPARSER_ENUMS_H__
21
22namespace MimeTreeParser
23{
24
25/**
26 * The display update mode: Force updates the display immediately, Delayed updates
27 * after some time (150ms by default)
28 */
29enum UpdateMode {
30 Force = 0,
31 Delayed
32};
33
34/** Flags for the encryption state. */
35typedef enum {
36 KMMsgEncryptionStateUnknown = ' ',
37 KMMsgNotEncrypted = 'N',
38 KMMsgPartiallyEncrypted = 'P',
39 KMMsgFullyEncrypted = 'F',
40 KMMsgEncryptionProblematic = 'X'
41} KMMsgEncryptionState;
42
43/** Flags for the signature state. */
44typedef enum {
45 KMMsgSignatureStateUnknown = ' ',
46 KMMsgNotSigned = 'N',
47 KMMsgPartiallySigned = 'P',
48 KMMsgFullySigned = 'F',
49 KMMsgSignatureProblematic = 'X'
50} KMMsgSignatureState;
51
52}
53
54#endif
diff --git a/framework/src/domain/mimetreeparser/otp/filehtmlwriter.cpp b/framework/src/domain/mimetreeparser/otp/filehtmlwriter.cpp
deleted file mode 100644
index a143f944..00000000
--- a/framework/src/domain/mimetreeparser/otp/filehtmlwriter.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
1/* -*- c++ -*-
2 filehtmlwriter.cpp
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License, version 2, as
9 published by the Free Software Foundation.
10
11 KMail is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20 In addition, as a special exception, the copyright holders give
21 permission to link the code of this program with any edition of
22 the Qt library by Trolltech AS, Norway (or with modified versions
23 of Qt that use the same license as Qt), and distribute linked
24 combinations including the two. You must obey the GNU General
25 Public License in all respects for all of the code used other than
26 Qt. If you modify this file, you may extend this exception to
27 your version of the file, but you are not obligated to do so. If
28 you do not wish to do so, delete this exception statement from
29 your version.
30*/
31
32#include "filehtmlwriter.h"
33
34#include "mimetreeparser_debug.h"
35
36namespace MimeTreeParser
37{
38
39FileHtmlWriter::FileHtmlWriter(const QString &filename)
40 : HtmlWriter(),
41 mFile(filename.isEmpty() ? QStringLiteral("filehtmlwriter.out") : filename)
42{
43}
44
45FileHtmlWriter::~FileHtmlWriter()
46{
47 if (mFile.isOpen()) {
48 qCWarning(MIMETREEPARSER_LOG) << "FileHtmlWriter: file still open!";
49 mStream.setDevice(nullptr);
50 mFile.close();
51 }
52}
53
54void FileHtmlWriter::begin(const QString &css)
55{
56 openOrWarn();
57 if (!css.isEmpty()) {
58 write(QLatin1String("<!-- CSS Definitions \n") + css + QLatin1String("-->\n"));
59 }
60}
61
62void FileHtmlWriter::end()
63{
64 flush();
65 mStream.setDevice(nullptr);
66 mFile.close();
67}
68
69void FileHtmlWriter::reset()
70{
71 if (mFile.isOpen()) {
72 mStream.setDevice(nullptr);
73 mFile.close();
74 }
75}
76
77void FileHtmlWriter::write(const QString &str)
78{
79 mStream << str;
80 flush();
81}
82
83void FileHtmlWriter::queue(const QString &str)
84{
85 write(str);
86}
87
88void FileHtmlWriter::flush()
89{
90 mStream.flush();
91 mFile.flush();
92}
93
94void FileHtmlWriter::openOrWarn()
95{
96 if (mFile.isOpen()) {
97 qCWarning(MIMETREEPARSER_LOG) << "FileHtmlWriter: file still open!";
98 mStream.setDevice(nullptr);
99 mFile.close();
100 }
101 if (!mFile.open(QIODevice::WriteOnly)) {
102 qCWarning(MIMETREEPARSER_LOG) << "FileHtmlWriter: Cannot open file" << mFile.fileName();
103 } else {
104 mStream.setDevice(&mFile);
105 mStream.setCodec("UTF-8");
106 }
107}
108
109void FileHtmlWriter::embedPart(const QByteArray &contentId, const QString &url)
110{
111 mStream << "<!-- embedPart(contentID=" << contentId << ", url=" << url << ") -->" << endl;
112 flush();
113}
114void FileHtmlWriter::extraHead(const QString &)
115{
116
117}
118
119} //
diff --git a/framework/src/domain/mimetreeparser/otp/filehtmlwriter.h b/framework/src/domain/mimetreeparser/otp/filehtmlwriter.h
deleted file mode 100644
index 5dafb593..00000000
--- a/framework/src/domain/mimetreeparser/otp/filehtmlwriter.h
+++ /dev/null
@@ -1,70 +0,0 @@
1/* -*- c++ -*-
2 filehtmlwriter.h
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License, version 2, as
9 published by the Free Software Foundation.
10
11 KMail is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20 In addition, as a special exception, the copyright holders give
21 permission to link the code of this program with any edition of
22 the Qt library by Trolltech AS, Norway (or with modified versions
23 of Qt that use the same license as Qt), and distribute linked
24 combinations including the two. You must obey the GNU General
25 Public License in all respects for all of the code used other than
26 Qt. If you modify this file, you may extend this exception to
27 your version of the file, but you are not obligated to do so. If
28 you do not wish to do so, delete this exception statement from
29 your version.
30*/
31
32#ifndef __MIMETREEPARSER_FILEHTMLWRITER_H__
33#define __MIMETREEPARSER_FILEHTMLWRITER_H__
34
35#include "mimetreeparser_export.h"
36#include "mimetreeparser/htmlwriter.h"
37
38#include <QFile>
39#include <QTextStream>
40
41class QString;
42
43namespace MimeTreeParser
44{
45
46class MIMETREEPARSER_EXPORT FileHtmlWriter : public HtmlWriter
47{
48public:
49 explicit FileHtmlWriter(const QString &filename);
50 virtual ~FileHtmlWriter();
51
52 void begin(const QString &cssDefs) Q_DECL_OVERRIDE;
53 void end() Q_DECL_OVERRIDE;
54 void reset() Q_DECL_OVERRIDE;
55 void write(const QString &str) Q_DECL_OVERRIDE;
56 void queue(const QString &str) Q_DECL_OVERRIDE;
57 void flush() Q_DECL_OVERRIDE;
58 void embedPart(const QByteArray &contentId, const QString &url) Q_DECL_OVERRIDE;
59 void extraHead(const QString &str) Q_DECL_OVERRIDE;
60private:
61 void openOrWarn();
62
63private:
64 QFile mFile;
65 QTextStream mStream;
66};
67
68} // namespace MimeTreeParser
69
70#endif // __MIMETREEPARSER_FILEHTMLWRITER_H__
diff --git a/framework/src/domain/mimetreeparser/otp/htmlwriter.cpp b/framework/src/domain/mimetreeparser/otp/htmlwriter.cpp
deleted file mode 100644
index 3c98d997..00000000
--- a/framework/src/domain/mimetreeparser/otp/htmlwriter.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 This file is part of KMail's plugin interface.
3 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
4
5 KMail is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 KMail is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
19 In addition, as a special exception, the copyright holders give
20 permission to link the code of this program with any edition of
21 the Qt library by Trolltech AS, Norway (or with modified versions
22 of Qt that use the same license as Qt), and distribute linked
23 combinations including the two. You must obey the GNU General
24 Public License in all respects for all of the code used other than
25 Qt. If you modify this file, you may extend this exception to
26 your version of the file, but you are not obligated to do so. If
27 you do not wish to do so, delete this exception statement from
28 your version.
29*/
30
31#include "htmlwriter.h"
32
33MimeTreeParser::Interface::HtmlWriter::~HtmlWriter()
34{
35}
36
37MimeTreeParser::HtmlWriter::~HtmlWriter()
38{
39}
40
diff --git a/framework/src/domain/mimetreeparser/otp/htmlwriter.h b/framework/src/domain/mimetreeparser/otp/htmlwriter.h
deleted file mode 100644
index 382c80fb..00000000
--- a/framework/src/domain/mimetreeparser/otp/htmlwriter.h
+++ /dev/null
@@ -1,125 +0,0 @@
1/* -*- c++ -*-
2 interfaces/htmlwriter.h
3
4 This file is part of KMail's plugin interface.
5 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 KMail is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
21 In addition, as a special exception, the copyright holders give
22 permission to link the code of this program with any edition of
23 the Qt library by Trolltech AS, Norway (or with modified versions
24 of Qt that use the same license as Qt), and distribute linked
25 combinations including the two. You must obey the GNU General
26 Public License in all respects for all of the code used other than
27 Qt. If you modify this file, you may extend this exception to
28 your version of the file, but you are not obligated to do so. If
29 you do not wish to do so, delete this exception statement from
30 your version.
31*/
32
33#ifndef __MIMETREEPARSER_INTERFACES_HTMLWRITER_H__
34#define __MIMETREEPARSER_INTERFACES_HTMLWRITER_H__
35
36class QByteArray;
37class QString;
38
39namespace MimeTreeParser
40{
41/**
42 * @short An interface for HTML sinks.
43 * @author Marc Mutz <mutz@kde.org>
44 *
45 */
46namespace Interface
47{
48class HtmlWriter
49{
50public:
51 virtual ~HtmlWriter();
52
53 /** Signal the begin of stuff to write, and give the CSS definitions */
54 virtual void begin(const QString &cssDefinitions) = 0;
55 /** Write out a chunk of text. No HTML escaping is performed. */
56 virtual void write(const QString &html) = 0;
57 /** Signal the end of stuff to write. */
58 virtual void end() = 0;
59};
60}
61
62/**
63 * @short An interface to HTML sinks
64 * @author Marc Mutz <mutz@kde.org>
65 *
66 * @deprecated KMail should be ported to Interface::HtmlWriter. This
67 * interface exposes internal working models. The queuing
68 * vs. writing() issues exposed here should be hidden by using two
69 * different implementations of KHTMLPartHtmlWriter: one for
70 * queuing, and one for writing. This should be fixed before the
71 * release, so we an keep the plugin interface stable.
72 *
73 * Operate this interface in one and only one of the following two
74 * modes:
75 *
76 * @section Sync Mode
77 *
78 * In sync mode, use #begin() to initiate a session, then
79 * #write() some chunks of HTML code and finally #end() the session.
80 *
81 * @section Async Mode
82 *
83 * In async mode, use #begin() to initialize a session, then
84 * #queue() some chunks of HTML code and finally end the
85 * session by calling #flush().
86 *
87 * Queued HTML code is fed to the html sink using a timer. For this
88 * to work, control must return to the event loop so timer events
89 * are delivered.
90 *
91 * @section Combined mode
92 *
93 * You may combine the two modes in the following way only. Any
94 * number of #write() calls can precede #queue() calls,
95 * but once a chunk has been queued, you @em must @em not
96 * #write() more data, only #queue() it.
97 *
98 * Naturally, whenever you queued data in a given session, that
99 * session must be ended by calling #flush(), not #end().
100 */
101class HtmlWriter : public Interface::HtmlWriter
102{
103public:
104 virtual ~HtmlWriter();
105
106 /** Stop all possibly pending processing in order to be able to
107 * call #begin() again. */
108 virtual void reset() = 0;
109
110 virtual void queue(const QString &str) = 0;
111 /** (Start) flushing internal buffers, if any. */
112 virtual void flush() = 0;
113
114 /**
115 * Embed a part with Content-ID @p contentId, using url @p url.
116 */
117 virtual void embedPart(const QByteArray &contentId, const QString &url) = 0;
118
119 virtual void extraHead(const QString &str) = 0;
120};
121
122}
123
124#endif // __MIMETREEPARSER_INTERFACES_HTMLWRITER_H__
125
diff --git a/framework/src/domain/mimetreeparser/otp/mailman.cpp b/framework/src/domain/mimetreeparser/otp/mailman.cpp
deleted file mode 100644
index e79ef0fa..00000000
--- a/framework/src/domain/mimetreeparser/otp/mailman.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "mailman.h"
21
22#include "utils.h"
23
24#include "objecttreeparser.h"
25#include "messagepart.h"
26
27#include <KMime/Content>
28
29#include "mimetreeparser_debug.h"
30
31using namespace MimeTreeParser;
32
33const MailmanBodyPartFormatter *MailmanBodyPartFormatter::self;
34
35const Interface::BodyPartFormatter *MailmanBodyPartFormatter::create()
36{
37 if (!self) {
38 self = new MailmanBodyPartFormatter();
39 }
40 return self;
41}
42Interface::BodyPartFormatter::Result MailmanBodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
43{
44 Q_UNUSED(writer)
45 const auto p = process(*part);
46 const auto mp = static_cast<MessagePart *>(p.data());
47 if (mp) {
48 mp->html(false);
49 return Ok;
50 }
51 return Failed;
52}
53
54bool MailmanBodyPartFormatter::isMailmanMessage(KMime::Content *curNode) const
55{
56 if (!curNode || curNode->head().isEmpty()) {
57 return false;
58 }
59 if (curNode->hasHeader("X-Mailman-Version")) {
60 return true;
61 }
62 if (KMime::Headers::Base *header = curNode->headerByType("X-Mailer")) {
63 if (header->asUnicodeString().contains(QStringLiteral("MAILMAN"), Qt::CaseInsensitive)) {
64 return true;
65 }
66 }
67 return false;
68}
69
70Interface::MessagePart::Ptr MailmanBodyPartFormatter::process(Interface::BodyPart &part) const
71{
72 KMime::Content *curNode = part.content();
73
74 if (!isMailmanMessage(curNode)) {
75 return MessagePart::Ptr();
76 }
77
78 const QString str = QString::fromLatin1(curNode->decodedContent());
79
80 //###
81 const QLatin1String delim1("--__--__--\n\nMessage:");
82 const QLatin1String delim2("--__--__--\r\n\r\nMessage:");
83 const QLatin1String delimZ2("--__--__--\n\n_____________");
84 const QLatin1String delimZ1("--__--__--\r\n\r\n_____________");
85 QString partStr, digestHeaderStr;
86 int thisDelim = str.indexOf(delim1, Qt::CaseInsensitive);
87 if (thisDelim == -1) {
88 thisDelim = str.indexOf(delim2, Qt::CaseInsensitive);
89 }
90 if (thisDelim == -1) {
91 return MessagePart::Ptr();
92 }
93
94 int nextDelim = str.indexOf(delim1, thisDelim + 1, Qt::CaseInsensitive);
95 if (-1 == nextDelim) {
96 nextDelim = str.indexOf(delim2, thisDelim + 1, Qt::CaseInsensitive);
97 }
98 if (-1 == nextDelim) {
99 nextDelim = str.indexOf(delimZ1, thisDelim + 1, Qt::CaseInsensitive);
100 }
101 if (-1 == nextDelim) {
102 nextDelim = str.indexOf(delimZ2, thisDelim + 1, Qt::CaseInsensitive);
103 }
104 if (nextDelim < 0) {
105 return MessagePart::Ptr();
106 }
107
108 //if ( curNode->mRoot )
109 // curNode = curNode->mRoot;
110
111 // at least one message found: build a mime tree
112 digestHeaderStr = QStringLiteral("Content-Type: text/plain\nContent-Description: digest header\n\n");
113 digestHeaderStr += str.midRef(0, thisDelim);
114
115 MessagePartList::Ptr mpl(new MessagePartList(part.objectTreeParser()));
116 mpl->appendSubPart(createAndParseTempNode(part, part.topLevelContent(), digestHeaderStr.toLatin1().constData(), "Digest Header"));
117 //mReader->queueHtml("<br><hr><br>");
118 // temporarily change curent node's Content-Type
119 // to get our embedded RfC822 messages properly inserted
120 curNode->contentType()->setMimeType("multipart/digest");
121 while (-1 < nextDelim) {
122 int thisEoL = str.indexOf(QLatin1String("\nMessage:"), thisDelim, Qt::CaseInsensitive);
123 if (-1 < thisEoL) {
124 thisDelim = thisEoL + 1;
125 } else {
126 thisEoL = str.indexOf(QLatin1String("\n_____________"), thisDelim, Qt::CaseInsensitive);
127 if (-1 < thisEoL) {
128 thisDelim = thisEoL + 1;
129 }
130 }
131 thisEoL = str.indexOf(QLatin1Char('\n'), thisDelim);
132 if (-1 < thisEoL) {
133 thisDelim = thisEoL + 1;
134 } else {
135 thisDelim = thisDelim + 1;
136 }
137 //while( thisDelim < cstr.size() && '\n' == cstr[thisDelim] )
138 // ++thisDelim;
139
140 partStr = QStringLiteral("Content-Type: message/rfc822\nContent-Description: embedded message\n\n");
141 partStr += str.midRef(thisDelim, nextDelim - thisDelim);
142 QString subject = QStringLiteral("embedded message");
143 QString subSearch = QStringLiteral("\nSubject:");
144 int subPos = partStr.indexOf(subSearch, 0, Qt::CaseInsensitive);
145 if (-1 < subPos) {
146 subject = partStr.mid(subPos + subSearch.length());
147 thisEoL = subject.indexOf(QLatin1Char('\n'));
148 if (-1 < thisEoL) {
149 subject.truncate(thisEoL);
150 }
151 }
152 qCDebug(MIMETREEPARSER_LOG) << " embedded message found: \"" << subject;
153 mpl->appendSubPart(createAndParseTempNode(part, part.topLevelContent(), partStr.toLatin1().constData(), subject.toLatin1().constData()));
154 //mReader->queueHtml("<br><hr><br>");
155 thisDelim = nextDelim + 1;
156 nextDelim = str.indexOf(delim1, thisDelim, Qt::CaseInsensitive);
157 if (-1 == nextDelim) {
158 nextDelim = str.indexOf(delim2, thisDelim, Qt::CaseInsensitive);
159 }
160 if (-1 == nextDelim) {
161 nextDelim = str.indexOf(delimZ1, thisDelim, Qt::CaseInsensitive);
162 }
163 if (-1 == nextDelim) {
164 nextDelim = str.indexOf(delimZ2, thisDelim, Qt::CaseInsensitive);
165 }
166 }
167 // reset curent node's Content-Type
168 curNode->contentType()->setMimeType("text/plain");
169 int thisEoL = str.indexOf(QLatin1String("_____________"), thisDelim);
170 if (-1 < thisEoL) {
171 thisDelim = thisEoL;
172 thisEoL = str.indexOf(QLatin1Char('\n'), thisDelim);
173 if (-1 < thisEoL) {
174 thisDelim = thisEoL + 1;
175 }
176 } else {
177 thisDelim = thisDelim + 1;
178 }
179 partStr = QStringLiteral("Content-Type: text/plain\nContent-Description: digest footer\n\n");
180 partStr += str.midRef(thisDelim);
181 mpl->appendSubPart(createAndParseTempNode(part, part.topLevelContent(), partStr.toLatin1().constData(), "Digest Footer"));
182 return mpl;
183}
diff --git a/framework/src/domain/mimetreeparser/otp/mailman.h b/framework/src/domain/mimetreeparser/otp/mailman.h
deleted file mode 100644
index 742830b2..00000000
--- a/framework/src/domain/mimetreeparser/otp/mailman.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_MAILMAN_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_MAILMAN_H__
22
23#include "bodypartformatter.h"
24#include "bodypart.h"
25
26namespace MimeTreeParser
27{
28
29class MailmanBodyPartFormatter : public Interface::BodyPartFormatter
30{
31 static const MailmanBodyPartFormatter *self;
32public:
33 Interface::MessagePart::Ptr process(Interface::BodyPart &part) const Q_DECL_OVERRIDE;
34 Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
35 using Interface::BodyPartFormatter::format;
36 static const Interface::BodyPartFormatter *create();
37
38private:
39 bool isMailmanMessage(KMime::Content *curNode) const;
40};
41
42}
43
44#endif
diff --git a/framework/src/domain/mimetreeparser/otp/messagepart.cpp b/framework/src/domain/mimetreeparser/otp/messagepart.cpp
deleted file mode 100644
index 3228a387..00000000
--- a/framework/src/domain/mimetreeparser/otp/messagepart.cpp
+++ /dev/null
@@ -1,1352 +0,0 @@
1/*
2 Copyright (c) 2015 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "messagepart.h"
21#include "mimetreeparser_debug.h"
22#include "attachmentstrategy.h"
23#include "cryptohelper.h"
24#include "objecttreeparser.h"
25#include "htmlwriter.h"
26#include "qgpgmejobexecutor.h"
27
28#include "cryptobodypartmemento.h"
29#include "decryptverifybodypartmemento.h"
30#include "verifydetachedbodypartmemento.h"
31#include "verifyopaquebodypartmemento.h"
32
33#include "utils.h"
34
35#include <KMime/Content>
36
37#include <QGpgME/DN>
38#include <QGpgME/Protocol>
39#include <QGpgME/ImportJob>
40#include <QGpgME/KeyListJob>
41#include <QGpgME/VerifyDetachedJob>
42#include <QGpgME/VerifyOpaqueJob>
43
44#include <gpgme++/key.h>
45#include <gpgme++/keylistresult.h>
46#include <gpgme.h>
47
48#include <KLocalizedString>
49
50#include <QTextCodec>
51
52using namespace MimeTreeParser;
53
54//------MessagePart-----------------------
55MessagePart::MessagePart(ObjectTreeParser *otp,
56 const QString &text)
57 : mText(text)
58 , mOtp(otp)
59 , mAttachmentNode(nullptr)
60 , mRoot(false)
61{
62}
63
64MessagePart::~MessagePart()
65{
66}
67
68PartMetaData *MessagePart::partMetaData()
69{
70 return &mMetaData;
71}
72
73void MessagePart::setAttachmentFlag(KMime::Content *node)
74{
75 mAttachmentNode = node;
76}
77
78bool MessagePart::isAttachment() const
79{
80 return mAttachmentNode;
81}
82
83KMime::Content *MessagePart::attachmentNode() const
84{
85 return mAttachmentNode;
86}
87
88void MessagePart::setIsRoot(bool root)
89{
90 mRoot = root;
91}
92
93bool MessagePart::isRoot() const
94{
95 return mRoot;
96}
97
98QString MessagePart::text() const
99{
100 return mText;
101}
102
103void MessagePart::setText(const QString &text)
104{
105 mText = text;
106}
107
108bool MessagePart::isHtml() const
109{
110 return false;
111}
112
113bool MessagePart::isHidden() const
114{
115 return false;
116}
117
118Interface::ObjectTreeSource *MessagePart::source() const
119{
120 Q_ASSERT(mOtp);
121 return mOtp->mSource;
122}
123
124HtmlWriter *MessagePart::htmlWriter() const
125{
126 Q_ASSERT(mOtp);
127 return mOtp->htmlWriter();
128}
129
130void MessagePart::setHtmlWriter(HtmlWriter *htmlWriter) const
131{
132 mOtp->mHtmlWriter = htmlWriter;
133}
134
135void MessagePart::parseInternal(KMime::Content *node, bool onlyOneMimePart)
136{
137 auto subMessagePart = mOtp->parseObjectTreeInternal(node, onlyOneMimePart);
138 mRoot = subMessagePart->isRoot();
139 foreach (const auto &part, subMessagePart->subParts()) {
140 appendSubPart(part);
141 }
142}
143
144QString MessagePart::renderInternalText() const
145{
146 QString text;
147 foreach (const auto &mp, subParts()) {
148 text += mp->text();
149 }
150 return text;
151}
152
153void MessagePart::copyContentFrom() const
154{
155 foreach (const auto &mp, subParts()) {
156 const auto m = mp.dynamicCast<MessagePart>();
157 if (m) {
158 m->copyContentFrom();
159 }
160 }
161}
162
163void MessagePart::fix() const
164{
165 foreach (const auto &mp, subParts()) {
166 const auto m = mp.dynamicCast<MessagePart>();
167 if (m) {
168 m->fix();
169 }
170 }
171}
172
173void MessagePart::appendSubPart(const Interface::MessagePart::Ptr &messagePart)
174{
175 messagePart->setParentPart(this);
176 mBlocks.append(messagePart);
177}
178
179const QVector<Interface::MessagePart::Ptr> &MessagePart::subParts() const
180{
181 return mBlocks;
182}
183
184bool MessagePart::hasSubParts() const
185{
186 return !mBlocks.isEmpty();
187}
188
189//-----MessagePartList----------------------
190MessagePartList::MessagePartList(ObjectTreeParser *otp)
191 : MessagePart(otp, QString())
192{
193}
194
195MessagePartList::~MessagePartList()
196{
197
198}
199
200QString MessagePartList::text() const
201{
202 return renderInternalText();
203}
204
205QString MessagePartList::plaintextContent() const
206{
207 return QString();
208}
209
210QString MessagePartList::htmlContent() const
211{
212 return QString();
213}
214
215//-----TextMessageBlock----------------------
216
217TextMessagePart::TextMessagePart(ObjectTreeParser *otp, KMime::Content *node, bool drawFrame, bool showLink, bool decryptMessage)
218 : MessagePartList(otp)
219 , mNode(node)
220 , mDrawFrame(drawFrame)
221 , mShowLink(showLink)
222 , mDecryptMessage(decryptMessage)
223 , mIsHidden(false)
224{
225 if (!mNode) {
226 qCWarning(MIMETREEPARSER_LOG) << "not a valid node";
227 return;
228 }
229
230 mIsHidden = mOtp->nodeHelper()->isNodeDisplayedHidden(mNode);
231
232 parseContent();
233}
234
235TextMessagePart::~TextMessagePart()
236{
237
238}
239
240bool TextMessagePart::decryptMessage() const
241{
242 return mDecryptMessage;
243}
244
245void TextMessagePart::parseContent()
246{
247 const auto aCodec = mOtp->codecFor(mNode);
248 const QString &fromAddress = mOtp->nodeHelper()->fromAsString(mNode);
249 mSignatureState = KMMsgNotSigned;
250 mEncryptionState = KMMsgNotEncrypted;
251 const auto blocks = prepareMessageForDecryption(mNode->decodedContent());
252
253 const auto cryptProto = QGpgME::openpgp();
254
255 if (!blocks.isEmpty()) {
256
257 /* The (overall) signature/encrypted status is broken
258 * if one unencrypted part is at the beginning or in the middle
259 * because mailmain adds an unencrypted part at the end this should not break the overall status
260 *
261 * That's why we first set the tmp status and if one crypted/signed block comes afterwards, than
262 * the status is set to unencryped
263 */
264 bool fullySignedOrEncrypted = true;
265 bool fullySignedOrEncryptedTmp = true;
266
267 for (const auto &block : blocks) {
268
269 if (!fullySignedOrEncryptedTmp) {
270 fullySignedOrEncrypted = false;
271 }
272
273 if (block.type() == NoPgpBlock && !block.text().trimmed().isEmpty()) {
274 fullySignedOrEncryptedTmp = false;
275 appendSubPart(MessagePart::Ptr(new MessagePart(mOtp, aCodec->toUnicode(block.text()))));
276 } else if (block.type() == PgpMessageBlock) {
277 EncryptedMessagePart::Ptr mp(new EncryptedMessagePart(mOtp, QString(), cryptProto, fromAddress, nullptr));
278 mp->setDecryptMessage(decryptMessage());
279 mp->setIsEncrypted(true);
280 appendSubPart(mp);
281 if (!decryptMessage()) {
282 continue;
283 }
284 mp->startDecryption(block.text(), aCodec);
285 if (mp->partMetaData()->inProgress) {
286 continue;
287 }
288 } else if (block.type() == ClearsignedBlock) {
289 SignedMessagePart::Ptr mp(new SignedMessagePart(mOtp, QString(), cryptProto, fromAddress, nullptr));
290 appendSubPart(mp);
291 mp->startVerification(block.text(), aCodec);
292 } else {
293 continue;
294 }
295
296 const auto mp = subParts().last().staticCast<MessagePart>();
297 const PartMetaData *messagePart(mp->partMetaData());
298
299 if (!messagePart->isEncrypted && !messagePart->isSigned && !block.text().trimmed().isEmpty()) {
300 mp->setText(aCodec->toUnicode(block.text()));
301 }
302
303 if (messagePart->isEncrypted) {
304 mEncryptionState = KMMsgPartiallyEncrypted;
305 }
306
307 if (messagePart->isSigned) {
308 mSignatureState = KMMsgPartiallySigned;
309 }
310 }
311
312 //Do we have an fully Signed/Encrypted Message?
313 if (fullySignedOrEncrypted) {
314 if (mSignatureState == KMMsgPartiallySigned) {
315 mSignatureState = KMMsgFullySigned;
316 }
317 if (mEncryptionState == KMMsgPartiallyEncrypted) {
318 mEncryptionState = KMMsgFullyEncrypted;
319 }
320 }
321 }
322}
323
324KMMsgEncryptionState TextMessagePart::encryptionState() const
325{
326 return mEncryptionState;
327}
328
329KMMsgSignatureState TextMessagePart::signatureState() const
330{
331 return mSignatureState;
332}
333
334bool TextMessagePart::isHidden() const
335{
336 return mIsHidden;
337}
338
339bool TextMessagePart::showLink() const
340{
341 return mShowLink;
342}
343
344bool TextMessagePart::showTextFrame() const
345{
346 return mDrawFrame;
347}
348
349//-----AttachmentMessageBlock----------------------
350
351AttachmentMessagePart::AttachmentMessagePart(ObjectTreeParser *otp, KMime::Content *node, bool drawFrame, bool showLink, bool decryptMessage)
352 : TextMessagePart(otp, node, drawFrame, showLink, decryptMessage)
353 , mIsImage(false)
354 , mNeverDisplayInline(false)
355{
356
357}
358
359AttachmentMessagePart::~AttachmentMessagePart()
360{
361
362}
363
364bool AttachmentMessagePart::neverDisplayInline() const
365{
366 return mNeverDisplayInline;
367}
368
369void AttachmentMessagePart::setNeverDisplayInline(bool displayInline)
370{
371 mNeverDisplayInline = displayInline;
372}
373
374bool AttachmentMessagePart::isImage() const
375{
376 return mIsImage;
377}
378
379void AttachmentMessagePart::setIsImage(bool image)
380{
381 mIsImage = image;
382}
383
384IconType AttachmentMessagePart::asIcon() const
385{
386 const AttachmentStrategy *const as = mOtp->attachmentStrategy();
387 const bool defaultHidden(as && as->defaultDisplay(mNode) == AttachmentStrategy::None);
388 const bool showOnlyOneMimePart(mOtp->showOnlyOneMimePart());
389 auto preferredMode = source()->preferredMode();
390 bool isHtmlPreferred = (preferredMode == Util::Html) || (preferredMode == Util::MultipartHtml);
391
392 QByteArray mediaType("text");
393 QByteArray subType("plain");
394 if (mNode->contentType(false) && !mNode->contentType()->mediaType().isEmpty() &&
395 !mNode->contentType()->subType().isEmpty()) {
396 mediaType = mNode->contentType()->mediaType();
397 subType = mNode->contentType()->subType();
398 }
399 const bool isTextPart = (mediaType == QByteArrayLiteral("text"));
400
401 bool defaultAsIcon = true;
402 if (!neverDisplayInline()) {
403 if (as) {
404 defaultAsIcon = as->defaultDisplay(mNode) == AttachmentStrategy::AsIcon;
405 }
406 }
407 if (isImage() && showOnlyOneMimePart && !neverDisplayInline()) {
408 defaultAsIcon = false;
409 }
410
411 // neither image nor text -> show as icon
412 if (!isImage() && !isTextPart) {
413 defaultAsIcon = true;
414 }
415
416 if (isTextPart) {
417 if (as && as->defaultDisplay(mNode) != AttachmentStrategy::Inline) {
418 return MimeTreeParser::IconExternal;
419 }
420 return MimeTreeParser::NoIcon;
421 } else {
422 if (isImage() && isHtmlPreferred &&
423 mNode->parent() && mNode->parent()->contentType()->subType() == "related") {
424 return MimeTreeParser::IconInline;
425 }
426
427 if (defaultHidden && !showOnlyOneMimePart && mNode->parent()) {
428 return MimeTreeParser::IconInline;
429 }
430
431 if (defaultAsIcon) {
432 return MimeTreeParser::IconExternal;
433 } else if (isImage()) {
434 return MimeTreeParser::IconInline;
435 } else {
436 return MimeTreeParser::NoIcon;
437 }
438 }
439}
440
441bool AttachmentMessagePart::isHidden() const
442{
443 const AttachmentStrategy *const as = mOtp->attachmentStrategy();
444 const bool defaultHidden(as && as->defaultDisplay(mNode) == AttachmentStrategy::None);
445 const bool showOnlyOneMimePart(mOtp->showOnlyOneMimePart());
446 auto preferredMode = source()->preferredMode();
447 bool isHtmlPreferred = (preferredMode == Util::Html) || (preferredMode == Util::MultipartHtml);
448
449 QByteArray mediaType("text");
450 QByteArray subType("plain");
451 if (mNode->contentType(false) && !mNode->contentType()->mediaType().isEmpty() &&
452 !mNode->contentType()->subType().isEmpty()) {
453 mediaType = mNode->contentType()->mediaType();
454 subType = mNode->contentType()->subType();
455 }
456 const bool isTextPart = (mediaType == QByteArrayLiteral("text"));
457
458 bool defaultAsIcon = true;
459 if (!neverDisplayInline()) {
460 if (as) {
461 defaultAsIcon = as->defaultDisplay(mNode) == AttachmentStrategy::AsIcon;
462 }
463 }
464 if (isImage() && showOnlyOneMimePart && !neverDisplayInline()) {
465 defaultAsIcon = false;
466 }
467
468 // neither image nor text -> show as icon
469 if (!isImage() && !isTextPart) {
470 defaultAsIcon = true;
471 }
472
473 bool hidden(false);
474 if (isTextPart) {
475 hidden = defaultHidden && !showOnlyOneMimePart;
476 } else {
477 if (isImage() && isHtmlPreferred &&
478 mNode->parent() && mNode->parent()->contentType()->subType() == "related") {
479 hidden = true;
480 } else {
481 hidden = defaultHidden && !showOnlyOneMimePart && mNode->parent();
482 hidden |= defaultAsIcon && (defaultHidden || showOnlyOneMimePart);
483 }
484 }
485 mOtp->nodeHelper()->setNodeDisplayedHidden(mNode, hidden);
486 return hidden;
487}
488
489//-----HtmlMessageBlock----------------------
490
491HtmlMessagePart::HtmlMessagePart(ObjectTreeParser *otp, KMime::Content *node, Interface::ObjectTreeSource *source)
492 : MessagePart(otp, QString())
493 , mNode(node)
494 , mSource(source)
495{
496 if (!mNode) {
497 qCWarning(MIMETREEPARSER_LOG) << "not a valid node";
498 return;
499 }
500
501 const QByteArray partBody(mNode->decodedContent());
502 mBodyHTML = mOtp->codecFor(mNode)->toUnicode(partBody);
503 mCharset = NodeHelper::charset(mNode);
504}
505
506HtmlMessagePart::~HtmlMessagePart()
507{
508}
509
510void HtmlMessagePart::fix() const
511{
512 mOtp->mHtmlContent += mBodyHTML;
513 mOtp->mHtmlContentCharset = mCharset;
514}
515
516QString HtmlMessagePart::text() const
517{
518 return mBodyHTML;
519}
520
521bool HtmlMessagePart::isHtml() const
522{
523 return true;
524}
525
526//-----MimeMessageBlock----------------------
527
528MimeMessagePart::MimeMessagePart(ObjectTreeParser *otp, KMime::Content *node, bool onlyOneMimePart)
529 : MessagePart(otp, QString())
530 , mNode(node)
531 , mOnlyOneMimePart(onlyOneMimePart)
532{
533 if (!mNode) {
534 qCWarning(MIMETREEPARSER_LOG) << "not a valid node";
535 return;
536 }
537
538 parseInternal(mNode, mOnlyOneMimePart);
539}
540
541MimeMessagePart::~MimeMessagePart()
542{
543
544}
545
546QString MimeMessagePart::text() const
547{
548 return renderInternalText();
549}
550
551QString MimeMessagePart::plaintextContent() const
552{
553 return QString();
554}
555
556QString MimeMessagePart::htmlContent() const
557{
558 return QString();
559}
560
561//-----AlternativeMessagePart----------------------
562
563AlternativeMessagePart::AlternativeMessagePart(ObjectTreeParser *otp, KMime::Content *node, Util::HtmlMode preferredMode)
564 : MessagePart(otp, QString())
565 , mNode(node)
566 , mPreferredMode(preferredMode)
567{
568 KMime::Content *dataIcal = findTypeInDirectChilds(mNode, "text/calendar");
569 KMime::Content *dataHtml = findTypeInDirectChilds(mNode, "text/html");
570 KMime::Content *dataText = findTypeInDirectChilds(mNode, "text/plain");
571
572 if (!dataHtml) {
573 // If we didn't find the HTML part as the first child of the multipart/alternative, it might
574 // be that this is a HTML message with images, and text/plain and multipart/related are the
575 // immediate children of this multipart/alternative node.
576 // In this case, the HTML node is a child of multipart/related.
577 dataHtml = findTypeInDirectChilds(mNode, "multipart/related");
578
579 // Still not found? Stupid apple mail actually puts the attachments inside of the
580 // multipart/alternative, which is wrong. Therefore we also have to look for multipart/mixed
581 // here.
582 // Do this only when prefering HTML mail, though, since otherwise the attachments are hidden
583 // when displaying plain text.
584 if (!dataHtml) {
585 dataHtml = findTypeInDirectChilds(mNode, "multipart/mixed");
586 }
587 }
588
589 if (dataIcal) {
590 mChildNodes[Util::MultipartIcal] = dataIcal;
591 }
592
593 if (dataText) {
594 mChildNodes[Util::MultipartPlain] = dataText;
595 }
596
597 if (dataHtml) {
598 mChildNodes[Util::MultipartHtml] = dataHtml;
599 }
600
601 if (mChildNodes.isEmpty()) {
602 qCWarning(MIMETREEPARSER_LOG) << "no valid nodes";
603 return;
604 }
605
606 QMapIterator<Util::HtmlMode, KMime::Content *> i(mChildNodes);
607 while (i.hasNext()) {
608 i.next();
609 mChildParts[i.key()] = MimeMessagePart::Ptr(new MimeMessagePart(mOtp, i.value(), true));
610 }
611}
612
613AlternativeMessagePart::~AlternativeMessagePart()
614{
615
616}
617
618Util::HtmlMode AlternativeMessagePart::preferredMode() const
619{
620 return mPreferredMode;
621}
622
623QList<Util::HtmlMode> AlternativeMessagePart::availableModes()
624{
625 return mChildParts.keys();
626}
627
628QString AlternativeMessagePart::text() const
629{
630 if (mChildParts.contains(Util::MultipartPlain)) {
631 return mChildParts[Util::MultipartPlain]->text();
632 }
633 return QString();
634}
635
636void AlternativeMessagePart::fix() const
637{
638 if (mChildParts.contains(Util::MultipartPlain)) {
639 mChildParts[Util::MultipartPlain]->fix();
640 }
641
642 const auto mode = preferredMode();
643 if (mode != Util::MultipartPlain && mChildParts.contains(mode)) {
644 mChildParts[mode]->fix();
645 }
646}
647
648void AlternativeMessagePart::copyContentFrom() const
649{
650 if (mChildParts.contains(Util::MultipartPlain)) {
651 mChildParts[Util::MultipartPlain]->copyContentFrom();
652 }
653
654 const auto mode = preferredMode();
655 if (mode != Util::MultipartPlain && mChildParts.contains(mode)) {
656 mChildParts[mode]->copyContentFrom();
657 }
658}
659
660bool AlternativeMessagePart::isHtml() const
661{
662 return mChildParts.contains(Util::MultipartHtml);
663}
664
665QString AlternativeMessagePart::plaintextContent() const
666{
667 return text();
668}
669
670QString AlternativeMessagePart::htmlContent() const
671{
672 if (mChildParts.contains(Util::MultipartHtml)) {
673 return mChildParts[Util::MultipartHtml]->text();
674 } else {
675 return plaintextContent();
676 }
677}
678
679//-----CertMessageBlock----------------------
680
681CertMessagePart::CertMessagePart(ObjectTreeParser *otp, KMime::Content *node, const QGpgME::Protocol *cryptoProto, bool autoImport)
682 : MessagePart(otp, QString())
683 , mNode(node)
684 , mAutoImport(autoImport)
685 , mCryptoProto(cryptoProto)
686{
687 if (!mNode) {
688 qCWarning(MIMETREEPARSER_LOG) << "not a valid node";
689 return;
690 }
691
692 if (!mAutoImport) {
693 return;
694 }
695
696 const QByteArray certData = node->decodedContent();
697
698 QGpgME::ImportJob *import = mCryptoProto->importJob();
699 QGpgMEJobExecutor executor;
700 mImportResult = executor.exec(import, certData);
701}
702
703CertMessagePart::~CertMessagePart()
704{
705
706}
707
708QString CertMessagePart::text() const
709{
710 return QString();
711}
712
713//-----SignedMessageBlock---------------------
714SignedMessagePart::SignedMessagePart(ObjectTreeParser *otp,
715 const QString &text,
716 const QGpgME::Protocol *cryptoProto,
717 const QString &fromAddress,
718 KMime::Content *node)
719 : MessagePart(otp, text)
720 , mCryptoProto(cryptoProto)
721 , mFromAddress(fromAddress)
722 , mNode(node)
723{
724 mMetaData.technicalProblem = (mCryptoProto == nullptr);
725 mMetaData.isSigned = true;
726 mMetaData.isGoodSignature = false;
727 mMetaData.keyTrust = GpgME::Signature::Unknown;
728 mMetaData.status = i18n("Wrong Crypto Plug-In.");
729 mMetaData.status_code = GPGME_SIG_STAT_NONE;
730}
731
732SignedMessagePart::~SignedMessagePart()
733{
734
735}
736
737void SignedMessagePart::setIsSigned(bool isSigned)
738{
739 mMetaData.isSigned = isSigned;
740}
741
742bool SignedMessagePart::isSigned() const
743{
744 return mMetaData.isSigned;
745}
746
747bool SignedMessagePart::okVerify(const QByteArray &data, const QByteArray &signature, KMime::Content *textNode)
748{
749 NodeHelper *nodeHelper = mOtp->nodeHelper();
750 Interface::ObjectTreeSource *_source = source();
751
752 mMetaData.isSigned = false;
753 mMetaData.technicalProblem = (mCryptoProto == nullptr);
754 mMetaData.keyTrust = GpgME::Signature::Unknown;
755 mMetaData.status = i18n("Wrong Crypto Plug-In.");
756 mMetaData.status_code = GPGME_SIG_STAT_NONE;
757
758 const QByteArray mementoName = "verification";
759
760 CryptoBodyPartMemento *m = dynamic_cast<CryptoBodyPartMemento *>(nodeHelper->bodyPartMemento(mNode, mementoName));
761 Q_ASSERT(!m || mCryptoProto); //No CryptoPlugin and having a bodyPartMemento -> there is something completely wrong
762
763 if (!m && mCryptoProto) {
764 if (!signature.isEmpty()) {
765 QGpgME::VerifyDetachedJob *job = mCryptoProto->verifyDetachedJob();
766 if (job) {
767 m = new VerifyDetachedBodyPartMemento(job, mCryptoProto->keyListJob(), signature, data);
768 }
769 } else {
770 QGpgME::VerifyOpaqueJob *job = mCryptoProto->verifyOpaqueJob();
771 if (job) {
772 m = new VerifyOpaqueBodyPartMemento(job, mCryptoProto->keyListJob(), data);
773 }
774 }
775 if (m) {
776 if (mOtp->allowAsync()) {
777 QObject::connect(m, &CryptoBodyPartMemento::update,
778 nodeHelper, &NodeHelper::update);
779 QObject::connect(m, SIGNAL(update(MimeTreeParser::UpdateMode)),
780 _source->sourceObject(), SLOT(update(MimeTreeParser::UpdateMode)));
781
782 if (m->start()) {
783 mMetaData.inProgress = true;
784 mOtp->mHasPendingAsyncJobs = true;
785 }
786 } else {
787 m->exec();
788 }
789 nodeHelper->setBodyPartMemento(mNode, mementoName, m);
790 }
791 } else if (m->isRunning()) {
792 mMetaData.inProgress = true;
793 mOtp->mHasPendingAsyncJobs = true;
794 } else {
795 mMetaData.inProgress = false;
796 mOtp->mHasPendingAsyncJobs = false;
797 }
798
799 if (m && !mMetaData.inProgress) {
800 if (!signature.isEmpty()) {
801 mVerifiedText = data;
802 }
803 setVerificationResult(m, textNode);
804 }
805
806 if (!m && !mMetaData.inProgress) {
807 QString errorMsg;
808 QString cryptPlugLibName;
809 QString cryptPlugDisplayName;
810 if (mCryptoProto) {
811 cryptPlugLibName = mCryptoProto->name();
812 cryptPlugDisplayName = mCryptoProto->displayName();
813 }
814
815 if (!mCryptoProto) {
816 if (cryptPlugDisplayName.isEmpty()) {
817 errorMsg = i18n("No appropriate crypto plug-in was found.");
818 } else {
819 errorMsg = i18nc("%1 is either 'OpenPGP' or 'S/MIME'",
820 "No %1 plug-in was found.",
821 cryptPlugDisplayName);
822 }
823 } else {
824 errorMsg = i18n("Crypto plug-in \"%1\" cannot verify signatures.",
825 cryptPlugLibName);
826 }
827 mMetaData.errorText = i18n("The message is signed, but the "
828 "validity of the signature cannot be "
829 "verified.<br />"
830 "Reason: %1",
831 errorMsg);
832 }
833
834 return mMetaData.isSigned;
835}
836
837static int signatureToStatus(const GpgME::Signature &sig)
838{
839 switch (sig.status().code()) {
840 case GPG_ERR_NO_ERROR:
841 return GPGME_SIG_STAT_GOOD;
842 case GPG_ERR_BAD_SIGNATURE:
843 return GPGME_SIG_STAT_BAD;
844 case GPG_ERR_NO_PUBKEY:
845 return GPGME_SIG_STAT_NOKEY;
846 case GPG_ERR_NO_DATA:
847 return GPGME_SIG_STAT_NOSIG;
848 case GPG_ERR_SIG_EXPIRED:
849 return GPGME_SIG_STAT_GOOD_EXP;
850 case GPG_ERR_KEY_EXPIRED:
851 return GPGME_SIG_STAT_GOOD_EXPKEY;
852 default:
853 return GPGME_SIG_STAT_ERROR;
854 }
855}
856
857QString prettifyDN(const char *uid)
858{
859 return QGpgME::DN(uid).prettyDN();
860}
861
862void SignedMessagePart::sigStatusToMetaData()
863{
864 GpgME::Key key;
865 if (mMetaData.isSigned) {
866 GpgME::Signature signature = mSignatures.front();
867 mMetaData.status_code = signatureToStatus(signature);
868 mMetaData.isGoodSignature = mMetaData.status_code & GPGME_SIG_STAT_GOOD;
869 // save extended signature status flags
870 mMetaData.sigSummary = signature.summary();
871
872 if (mMetaData.isGoodSignature && !key.keyID()) {
873 // Search for the key by its fingerprint so that we can check for
874 // trust etc.
875 QGpgME::KeyListJob *job = mCryptoProto->keyListJob(false); // local, no sigs
876 if (!job) {
877 qCDebug(MIMETREEPARSER_LOG) << "The Crypto backend does not support listing keys. ";
878 } else {
879 std::vector<GpgME::Key> found_keys;
880 // As we are local it is ok to make this synchronous
881 GpgME::KeyListResult res = job->exec(QStringList(QLatin1String(signature.fingerprint())), false, found_keys);
882 if (res.error()) {
883 qCDebug(MIMETREEPARSER_LOG) << "Error while searching key for Fingerprint: " << signature.fingerprint();
884 }
885 if (found_keys.size() > 1) {
886 // Should not Happen
887 qCDebug(MIMETREEPARSER_LOG) << "Oops: Found more then one Key for Fingerprint: " << signature.fingerprint();
888 }
889 if (found_keys.size() != 1) {
890 // Should not Happen at this point
891 qCDebug(MIMETREEPARSER_LOG) << "Oops: Found no Key for Fingerprint: " << signature.fingerprint();
892 } else {
893 key = found_keys[0];
894 }
895 delete job;
896 }
897 }
898
899 if (key.keyID()) {
900 mMetaData.keyId = key.keyID();
901 }
902 if (mMetaData.keyId.isEmpty()) {
903 mMetaData.keyId = signature.fingerprint();
904 }
905 mMetaData.keyTrust = signature.validity();
906 if (key.numUserIDs() > 0 && key.userID(0).id()) {
907 mMetaData.signer = prettifyDN(key.userID(0).id());
908 }
909 for (uint iMail = 0; iMail < key.numUserIDs(); ++iMail) {
910 // The following if /should/ always result in TRUE but we
911 // won't trust implicitely the plugin that gave us these data.
912 if (key.userID(iMail).email()) {
913 QString email = QString::fromUtf8(key.userID(iMail).email());
914 // ### work around gpgme 0.3.QString text() const Q_DECL_OVERRIDE;x / cryptplug bug where the
915 // ### email addresses are specified as angle-addr, not addr-spec:
916 if (email.startsWith(QLatin1Char('<')) && email.endsWith(QLatin1Char('>'))) {
917 email = email.mid(1, email.length() - 2);
918 }
919 if (!email.isEmpty()) {
920 mMetaData.signerMailAddresses.append(email);
921 }
922 }
923 }
924
925 if (signature.creationTime()) {
926 mMetaData.creationTime.setTime_t(signature.creationTime());
927 } else {
928 mMetaData.creationTime = QDateTime();
929 }
930 if (mMetaData.signer.isEmpty()) {
931 if (key.numUserIDs() > 0 && key.userID(0).name()) {
932 mMetaData.signer = prettifyDN(key.userID(0).name());
933 }
934 if (!mMetaData.signerMailAddresses.empty()) {
935 if (mMetaData.signer.isEmpty()) {
936 mMetaData.signer = mMetaData.signerMailAddresses.front();
937 } else {
938 mMetaData.signer += QLatin1String(" <") + mMetaData.signerMailAddresses.front() + QLatin1Char('>');
939 }
940 }
941 }
942 }
943}
944
945void SignedMessagePart::startVerification(const QByteArray &text, const QTextCodec *aCodec)
946{
947 startVerificationDetached(text, nullptr, QByteArray());
948
949 if (!mNode && mMetaData.isSigned) {
950 setText(aCodec->toUnicode(mVerifiedText));
951 }
952}
953
954void SignedMessagePart::startVerificationDetached(const QByteArray &text, KMime::Content *textNode, const QByteArray &signature)
955{
956 mMetaData.isEncrypted = false;
957 mMetaData.isDecryptable = false;
958
959 if (textNode) {
960 parseInternal(textNode, false);
961 }
962
963 okVerify(text, signature, textNode);
964
965 if (!mMetaData.isSigned) {
966 mMetaData.creationTime = QDateTime();
967 }
968}
969
970void SignedMessagePart::setVerificationResult(const CryptoBodyPartMemento *m, KMime::Content *textNode)
971{
972 {
973 const auto vm = dynamic_cast<const VerifyDetachedBodyPartMemento *>(m);
974 if (vm) {
975 mSignatures = vm->verifyResult().signatures();
976 }
977 }
978 {
979 const auto vm = dynamic_cast<const VerifyOpaqueBodyPartMemento *>(m);
980 if (vm) {
981 mVerifiedText = vm->plainText();
982 mSignatures = vm->verifyResult().signatures();
983 }
984 }
985 {
986 const auto vm = dynamic_cast<const DecryptVerifyBodyPartMemento *>(m);
987 if (vm) {
988 mVerifiedText = vm->plainText();
989 mSignatures = vm->verifyResult().signatures();
990 }
991 }
992 mMetaData.auditLogError = m->auditLogError();
993 mMetaData.auditLog = m->auditLogAsHtml();
994 mMetaData.isSigned = !mSignatures.empty();
995
996 if (mMetaData.isSigned) {
997 sigStatusToMetaData();
998 if (mNode) {
999 mOtp->nodeHelper()->setSignatureState(mNode, KMMsgFullySigned);
1000 if (!textNode) {
1001 mOtp->mNodeHelper->setPartMetaData(mNode, mMetaData);
1002
1003 if (!mVerifiedText.isEmpty()) {
1004 auto tempNode = new KMime::Content();
1005 tempNode->setContent(KMime::CRLFtoLF(mVerifiedText.constData()));
1006 tempNode->parse();
1007
1008 if (!tempNode->head().isEmpty()) {
1009 tempNode->contentDescription()->from7BitString("signed data");
1010 }
1011 mOtp->mNodeHelper->attachExtraContent(mNode, tempNode);
1012
1013 parseInternal(tempNode, false);
1014 }
1015 }
1016 }
1017 }
1018}
1019
1020QString SignedMessagePart::plaintextContent() const
1021{
1022 if (!mNode) {
1023 return MessagePart::text();
1024 } else {
1025 return QString();
1026 }
1027}
1028
1029QString SignedMessagePart::htmlContent() const
1030{
1031 if (!mNode) {
1032 return MessagePart::text();
1033 } else {
1034 return QString();
1035 }
1036}
1037
1038//-----CryptMessageBlock---------------------
1039EncryptedMessagePart::EncryptedMessagePart(ObjectTreeParser *otp,
1040 const QString &text,
1041 const QGpgME::Protocol *cryptoProto,
1042 const QString &fromAddress,
1043 KMime::Content *node)
1044 : MessagePart(otp, text)
1045 , mPassphraseError(false)
1046 , mNoSecKey(false)
1047 , mCryptoProto(cryptoProto)
1048 , mFromAddress(fromAddress)
1049 , mNode(node)
1050 , mDecryptMessage(false)
1051{
1052 mMetaData.technicalProblem = (mCryptoProto == nullptr);
1053 mMetaData.isSigned = false;
1054 mMetaData.isGoodSignature = false;
1055 mMetaData.isEncrypted = false;
1056 mMetaData.isDecryptable = false;
1057 mMetaData.keyTrust = GpgME::Signature::Unknown;
1058 mMetaData.status = i18n("Wrong Crypto Plug-In.");
1059 mMetaData.status_code = GPGME_SIG_STAT_NONE;
1060}
1061
1062EncryptedMessagePart::~EncryptedMessagePart()
1063{
1064
1065}
1066
1067void EncryptedMessagePart::setDecryptMessage(bool decrypt)
1068{
1069 mDecryptMessage = decrypt;
1070}
1071
1072bool EncryptedMessagePart::decryptMessage() const
1073{
1074 return mDecryptMessage;
1075}
1076
1077void EncryptedMessagePart::setIsEncrypted(bool encrypted)
1078{
1079 mMetaData.isEncrypted = encrypted;
1080}
1081
1082bool EncryptedMessagePart::isEncrypted() const
1083{
1084 return mMetaData.isEncrypted;
1085}
1086
1087bool EncryptedMessagePart::isDecryptable() const
1088{
1089 return mMetaData.isDecryptable;
1090}
1091
1092bool EncryptedMessagePart::passphraseError() const
1093{
1094 return mPassphraseError;
1095}
1096
1097void EncryptedMessagePart::startDecryption(const QByteArray &text, const QTextCodec *aCodec)
1098{
1099 KMime::Content *content = new KMime::Content;
1100 content->setBody(text);
1101 content->parse();
1102
1103 startDecryption(content);
1104
1105 if (!mMetaData.inProgress && mMetaData.isDecryptable) {
1106 if (hasSubParts()) {
1107 auto _mp = (subParts()[0]).dynamicCast<SignedMessagePart>();
1108 if (_mp) {
1109 _mp->setText(aCodec->toUnicode(mDecryptedData));
1110 } else {
1111 setText(aCodec->toUnicode(mDecryptedData));
1112 }
1113 } else {
1114 setText(aCodec->toUnicode(mDecryptedData));
1115 }
1116 }
1117}
1118
1119bool EncryptedMessagePart::okDecryptMIME(KMime::Content &data)
1120{
1121 mPassphraseError = false;
1122 mMetaData.inProgress = false;
1123 mMetaData.errorText.clear();
1124 mMetaData.auditLogError = GpgME::Error();
1125 mMetaData.auditLog.clear();
1126 bool bDecryptionOk = false;
1127 bool cannotDecrypt = false;
1128 Interface::ObjectTreeSource *_source = source();
1129 NodeHelper *nodeHelper = mOtp->nodeHelper();
1130
1131 Q_ASSERT(decryptMessage());
1132
1133 // Check whether the memento contains a result from last time:
1134 const DecryptVerifyBodyPartMemento *m
1135 = dynamic_cast<DecryptVerifyBodyPartMemento *>(nodeHelper->bodyPartMemento(&data, "decryptverify"));
1136
1137 Q_ASSERT(!m || mCryptoProto); //No CryptoPlugin and having a bodyPartMemento -> there is something completely wrong
1138
1139 if (!m && mCryptoProto) {
1140 QGpgME::DecryptVerifyJob *job = mCryptoProto->decryptVerifyJob();
1141 if (!job) {
1142 cannotDecrypt = true;
1143 } else {
1144 const QByteArray ciphertext = data.decodedContent();
1145 DecryptVerifyBodyPartMemento *newM
1146 = new DecryptVerifyBodyPartMemento(job, ciphertext);
1147 if (mOtp->allowAsync()) {
1148 QObject::connect(newM, &CryptoBodyPartMemento::update,
1149 nodeHelper, &NodeHelper::update);
1150 QObject::connect(newM, SIGNAL(update(MimeTreeParser::UpdateMode)), _source->sourceObject(),
1151 SLOT(update(MimeTreeParser::UpdateMode)));
1152 if (newM->start()) {
1153 mMetaData.inProgress = true;
1154 mOtp->mHasPendingAsyncJobs = true;
1155 } else {
1156 m = newM;
1157 }
1158 } else {
1159 newM->exec();
1160 m = newM;
1161 }
1162 nodeHelper->setBodyPartMemento(&data, "decryptverify", newM);
1163 }
1164 } else if (m->isRunning()) {
1165 mMetaData.inProgress = true;
1166 mOtp->mHasPendingAsyncJobs = true;
1167 m = nullptr;
1168 }
1169
1170 if (m) {
1171 const QByteArray &plainText = m->plainText();
1172 const GpgME::DecryptionResult &decryptResult = m->decryptResult();
1173 const GpgME::VerificationResult &verifyResult = m->verifyResult();
1174 mMetaData.isSigned = verifyResult.signatures().size() > 0;
1175
1176 if (verifyResult.signatures().size() > 0) {
1177 auto subPart = SignedMessagePart::Ptr(new SignedMessagePart(mOtp, MessagePart::text(), mCryptoProto, mFromAddress, mNode));
1178 subPart->setVerificationResult(m, nullptr);
1179 appendSubPart(subPart);
1180 }
1181
1182 mDecryptRecipients = decryptResult.recipients();
1183 bDecryptionOk = !decryptResult.error();
1184// std::stringstream ss;
1185// ss << decryptResult << '\n' << verifyResult;
1186// qCDebug(MIMETREEPARSER_LOG) << ss.str().c_str();
1187
1188 if (!bDecryptionOk && mMetaData.isSigned) {
1189 //Only a signed part
1190 mMetaData.isEncrypted = false;
1191 bDecryptionOk = true;
1192 mDecryptedData = plainText;
1193 } else {
1194 mPassphraseError = decryptResult.error().isCanceled() || decryptResult.error().code() == GPG_ERR_NO_SECKEY;
1195 mMetaData.isEncrypted = decryptResult.error().code() != GPG_ERR_NO_DATA;
1196 mMetaData.errorText = QString::fromLocal8Bit(decryptResult.error().asString());
1197 if (mMetaData.isEncrypted && decryptResult.numRecipients() > 0) {
1198 mMetaData.keyId = decryptResult.recipient(0).keyID();
1199 }
1200
1201 if (bDecryptionOk) {
1202 mDecryptedData = plainText;
1203 } else {
1204 mNoSecKey = true;
1205 foreach (const GpgME::DecryptionResult::Recipient &recipient, decryptResult.recipients()) {
1206 mNoSecKey &= (recipient.status().code() == GPG_ERR_NO_SECKEY);
1207 }
1208 if (!mPassphraseError && !mNoSecKey) { // GpgME do not detect passphrase error correctly
1209 mPassphraseError = true;
1210 }
1211 }
1212 }
1213 }
1214
1215 if (!bDecryptionOk) {
1216 QString cryptPlugLibName;
1217 if (mCryptoProto) {
1218 cryptPlugLibName = mCryptoProto->name();
1219 }
1220
1221 if (!mCryptoProto) {
1222 mMetaData.errorText = i18n("No appropriate crypto plug-in was found.");
1223 } else if (cannotDecrypt) {
1224 mMetaData.errorText = i18n("Crypto plug-in \"%1\" cannot decrypt messages.",
1225 cryptPlugLibName);
1226 } else if (!passphraseError()) {
1227 mMetaData.errorText = i18n("Crypto plug-in \"%1\" could not decrypt the data.", cryptPlugLibName)
1228 + QLatin1String("<br />")
1229 + i18n("Error: %1", mMetaData.errorText);
1230 }
1231 }
1232 return bDecryptionOk;
1233}
1234
1235void EncryptedMessagePart::startDecryption(KMime::Content *data)
1236{
1237 if (!mNode && !data) {
1238 return;
1239 }
1240
1241 if (!data) {
1242 data = mNode;
1243 }
1244
1245 mMetaData.isEncrypted = true;
1246
1247 bool bOkDecrypt = okDecryptMIME(*data);
1248
1249 if (mMetaData.inProgress) {
1250 return;
1251 }
1252 mMetaData.isDecryptable = bOkDecrypt;
1253
1254 if (!mMetaData.isDecryptable) {
1255 setText(QString::fromUtf8(mDecryptedData.constData()));
1256 }
1257
1258 if (mMetaData.isEncrypted && !decryptMessage()) {
1259 mMetaData.isDecryptable = true;
1260 }
1261
1262 if (mNode && !mMetaData.isSigned) {
1263 mOtp->mNodeHelper->setPartMetaData(mNode, mMetaData);
1264
1265 if (decryptMessage()) {
1266 auto tempNode = new KMime::Content();
1267 tempNode->setContent(KMime::CRLFtoLF(mDecryptedData.constData()));
1268 tempNode->parse();
1269
1270 if (!tempNode->head().isEmpty()) {
1271 tempNode->contentDescription()->from7BitString("encrypted data");
1272 }
1273 mOtp->mNodeHelper->attachExtraContent(mNode, tempNode);
1274
1275 parseInternal(tempNode, false);
1276 }
1277 }
1278}
1279
1280QString EncryptedMessagePart::plaintextContent() const
1281{
1282 if (!mNode) {
1283 return MessagePart::text();
1284 } else {
1285 return QString();
1286 }
1287}
1288
1289QString EncryptedMessagePart::htmlContent() const
1290{
1291 if (!mNode) {
1292 return MessagePart::text();
1293 } else {
1294 return QString();
1295 }
1296}
1297
1298QString EncryptedMessagePart::text() const
1299{
1300 if (hasSubParts()) {
1301 auto _mp = (subParts()[0]).dynamicCast<SignedMessagePart>();
1302 if (_mp) {
1303 return _mp->text();
1304 } else {
1305 return MessagePart::text();
1306 }
1307 } else {
1308 return MessagePart::text();
1309 }
1310}
1311
1312EncapsulatedRfc822MessagePart::EncapsulatedRfc822MessagePart(ObjectTreeParser *otp, KMime::Content *node, const KMime::Message::Ptr &message)
1313 : MessagePart(otp, QString())
1314 , mMessage(message)
1315 , mNode(node)
1316{
1317 mMetaData.isEncrypted = false;
1318 mMetaData.isSigned = false;
1319 mMetaData.isEncapsulatedRfc822Message = true;
1320
1321 mOtp->nodeHelper()->setNodeDisplayedEmbedded(mNode, true);
1322 mOtp->nodeHelper()->setPartMetaData(mNode, mMetaData);
1323
1324 if (!mMessage) {
1325 qCWarning(MIMETREEPARSER_LOG) << "Node is of type message/rfc822 but doesn't have a message!";
1326 return;
1327 }
1328
1329 // The link to "Encapsulated message" is clickable, therefore the temp file needs to exists,
1330 // since the user can click the link and expect to have normal attachment operations there.
1331 mOtp->nodeHelper()->writeNodeToTempFile(message.data());
1332
1333 parseInternal(message.data(), false);
1334}
1335
1336EncapsulatedRfc822MessagePart::~EncapsulatedRfc822MessagePart()
1337{
1338
1339}
1340
1341QString EncapsulatedRfc822MessagePart::text() const
1342{
1343 return renderInternalText();
1344}
1345
1346void EncapsulatedRfc822MessagePart::copyContentFrom() const
1347{
1348}
1349
1350void EncapsulatedRfc822MessagePart::fix() const
1351{
1352}
diff --git a/framework/src/domain/mimetreeparser/otp/messagepart.h b/framework/src/domain/mimetreeparser/otp/messagepart.h
deleted file mode 100644
index 433f3f6b..00000000
--- a/framework/src/domain/mimetreeparser/otp/messagepart.h
+++ /dev/null
@@ -1,422 +0,0 @@
1/*
2 Copyright (c) 2015 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_MESSAGEPART_H__
21#define __MIMETREEPARSER_MESSAGEPART_H__
22
23#include "bodypartformatter.h"
24#include "util.h"
25
26#include <KMime/Message>
27
28#include <gpgme++/verificationresult.h>
29#include <gpgme++/decryptionresult.h>
30#include <gpgme++/importresult.h>
31
32#include <QString>
33#include <QSharedPointer>
34
35class QTextCodec;
36class PartPrivate;
37
38namespace GpgME
39{
40class ImportResult;
41}
42
43namespace QGpgME
44{
45class Protocol;
46}
47
48namespace KMime
49{
50class Content;
51}
52
53namespace MimeTreeParser
54{
55class ObjectTreeParser;
56class HtmlWriter;
57class HTMLBlock;
58typedef QSharedPointer<HTMLBlock> HTMLBlockPtr;
59class CryptoBodyPartMemento;
60class MultiPartAlternativeBodyPartFormatter;
61namespace Interface
62{
63class ObjectTreeSource;
64}
65
66class MessagePart : public Interface::MessagePart
67{
68 Q_OBJECT
69 Q_PROPERTY(bool attachment READ isAttachment)
70 Q_PROPERTY(bool root READ isRoot)
71 Q_PROPERTY(bool isHtml READ isHtml)
72 Q_PROPERTY(bool isHidden READ isHidden)
73public:
74 typedef QSharedPointer<MessagePart> Ptr;
75 MessagePart(ObjectTreeParser *otp,
76 const QString &text);
77
78 virtual ~MessagePart();
79
80 virtual QString text() const Q_DECL_OVERRIDE;
81 void setText(const QString &text);
82 void setAttachmentFlag(KMime::Content *node);
83 bool isAttachment() const;
84
85 void setIsRoot(bool root);
86 bool isRoot() const;
87
88 virtual bool isHtml() const;
89 virtual bool isHidden() const;
90
91 PartMetaData *partMetaData();
92
93 /* only a function that should be removed if the refactoring is over */
94 virtual void fix() const;
95 virtual void copyContentFrom() const;
96
97 void appendSubPart(const Interface::MessagePart::Ptr &messagePart);
98 const QVector<Interface::MessagePart::Ptr> &subParts() const;
99 bool hasSubParts() const;
100
101 HtmlWriter *htmlWriter() const Q_DECL_OVERRIDE;
102 void setHtmlWriter(HtmlWriter *htmlWriter) const Q_DECL_OVERRIDE;
103
104 Interface::ObjectTreeSource *source() const;
105 KMime::Content *attachmentNode() const;
106
107protected:
108 void parseInternal(KMime::Content *node, bool onlyOneMimePart);
109 QString renderInternalText() const;
110
111 QString mText;
112 ObjectTreeParser *mOtp;
113 PartMetaData mMetaData;
114
115private:
116 QVector<Interface::MessagePart::Ptr> mBlocks;
117
118 KMime::Content *mAttachmentNode;
119 bool mRoot;
120};
121
122class MimeMessagePart : public MessagePart
123{
124 Q_OBJECT
125public:
126 typedef QSharedPointer<MimeMessagePart> Ptr;
127 MimeMessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, bool onlyOneMimePart);
128 virtual ~MimeMessagePart();
129
130 QString text() const Q_DECL_OVERRIDE;
131
132 QString plaintextContent() const Q_DECL_OVERRIDE;
133 QString htmlContent() const Q_DECL_OVERRIDE;
134private:
135 KMime::Content *mNode;
136 bool mOnlyOneMimePart;
137
138 friend class AlternativeMessagePart;
139 friend class ::PartPrivate;
140};
141
142class MessagePartList : public MessagePart
143{
144 Q_OBJECT
145public:
146 typedef QSharedPointer<MessagePartList> Ptr;
147 MessagePartList(MimeTreeParser::ObjectTreeParser *otp);
148 virtual ~MessagePartList();
149
150 QString text() const Q_DECL_OVERRIDE;
151
152 QString plaintextContent() const Q_DECL_OVERRIDE;
153 QString htmlContent() const Q_DECL_OVERRIDE;
154private:
155};
156
157enum IconType {
158 NoIcon = 0,
159 IconExternal,
160 IconInline
161};
162
163class TextMessagePart : public MessagePartList
164{
165 Q_OBJECT
166public:
167 typedef QSharedPointer<TextMessagePart> Ptr;
168 TextMessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, bool drawFrame, bool showLink, bool decryptMessage);
169 virtual ~TextMessagePart();
170
171 KMMsgSignatureState signatureState() const;
172 KMMsgEncryptionState encryptionState() const;
173
174 bool decryptMessage() const;
175
176 bool isHidden() const Q_DECL_OVERRIDE;
177
178 bool showLink() const;
179 bool showTextFrame() const;
180
181protected:
182 KMime::Content *mNode;
183
184private:
185 void parseContent();
186
187 KMMsgSignatureState mSignatureState;
188 KMMsgEncryptionState mEncryptionState;
189 bool mDrawFrame;
190 bool mShowLink;
191 bool mDecryptMessage;
192 bool mIsHidden;
193
194 friend class DefaultRendererPrivate;
195 friend class ObjectTreeParser;
196 friend class ::PartPrivate;
197};
198
199class AttachmentMessagePart : public TextMessagePart
200{
201 Q_OBJECT
202public:
203 typedef QSharedPointer<AttachmentMessagePart> Ptr;
204 AttachmentMessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, bool drawFrame, bool showLink, bool decryptMessage);
205 virtual ~AttachmentMessagePart();
206
207 IconType asIcon() const;
208 bool neverDisplayInline() const;
209 void setNeverDisplayInline(bool displayInline);
210 bool isImage() const;
211 void setIsImage(bool image);
212
213 bool isHidden() const Q_DECL_OVERRIDE;
214
215private:
216 bool mIsImage;
217 bool mNeverDisplayInline;
218};
219
220class HtmlMessagePart : public MessagePart
221{
222 Q_OBJECT
223public:
224 typedef QSharedPointer<HtmlMessagePart> Ptr;
225 HtmlMessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, MimeTreeParser::Interface::ObjectTreeSource *source);
226 virtual ~HtmlMessagePart();
227
228 QString text() const Q_DECL_OVERRIDE;
229
230 void fix() const Q_DECL_OVERRIDE;
231 bool isHtml() const Q_DECL_OVERRIDE;
232
233private:
234 KMime::Content *mNode;
235 Interface::ObjectTreeSource *mSource;
236 QString mBodyHTML;
237 QByteArray mCharset;
238
239 friend class DefaultRendererPrivate;
240 friend class ::PartPrivate;
241};
242
243class AlternativeMessagePart : public MessagePart
244{
245 Q_OBJECT
246public:
247 typedef QSharedPointer<AlternativeMessagePart> Ptr;
248 AlternativeMessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, Util::HtmlMode preferredMode);
249 virtual ~AlternativeMessagePart();
250
251 QString text() const Q_DECL_OVERRIDE;
252
253 Util::HtmlMode preferredMode() const;
254
255 bool isHtml() const Q_DECL_OVERRIDE;
256
257 QString plaintextContent() const Q_DECL_OVERRIDE;
258 QString htmlContent() const Q_DECL_OVERRIDE;
259
260 QList<Util::HtmlMode> availableModes();
261
262 void fix() const Q_DECL_OVERRIDE;
263 void copyContentFrom() const Q_DECL_OVERRIDE;
264private:
265 KMime::Content *mNode;
266
267 Util::HtmlMode mPreferredMode;
268
269 QMap<Util::HtmlMode, KMime::Content *> mChildNodes;
270 QMap<Util::HtmlMode, MimeMessagePart::Ptr> mChildParts;
271
272 friend class DefaultRendererPrivate;
273 friend class ObjectTreeParser;
274 friend class MultiPartAlternativeBodyPartFormatter;
275 friend class ::PartPrivate;
276};
277
278class CertMessagePart : public MessagePart
279{
280 Q_OBJECT
281public:
282 typedef QSharedPointer<CertMessagePart> Ptr;
283 CertMessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, const QGpgME::Protocol *cryptoProto, bool autoImport);
284 virtual ~CertMessagePart();
285
286 QString text() const Q_DECL_OVERRIDE;
287
288private:
289 KMime::Content *mNode;
290 bool mAutoImport;
291 GpgME::ImportResult mImportResult;
292 const QGpgME::Protocol *mCryptoProto;
293 friend class DefaultRendererPrivate;
294};
295
296class EncapsulatedRfc822MessagePart : public MessagePart
297{
298 Q_OBJECT
299public:
300 typedef QSharedPointer<EncapsulatedRfc822MessagePart> Ptr;
301 EncapsulatedRfc822MessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, const KMime::Message::Ptr &message);
302 virtual ~EncapsulatedRfc822MessagePart();
303
304 QString text() const Q_DECL_OVERRIDE;
305
306 void copyContentFrom() const Q_DECL_OVERRIDE;
307 void fix() const Q_DECL_OVERRIDE;
308private:
309 const KMime::Message::Ptr mMessage;
310 KMime::Content *mNode;
311
312 friend class DefaultRendererPrivate;
313};
314
315class EncryptedMessagePart : public MessagePart
316{
317 Q_OBJECT
318 Q_PROPERTY(bool decryptMessage READ decryptMessage WRITE setDecryptMessage)
319 Q_PROPERTY(bool isEncrypted READ isEncrypted)
320 Q_PROPERTY(bool passphraseError READ passphraseError)
321public:
322 typedef QSharedPointer<EncryptedMessagePart> Ptr;
323 EncryptedMessagePart(ObjectTreeParser *otp,
324 const QString &text,
325 const QGpgME::Protocol *cryptoProto,
326 const QString &fromAddress,
327 KMime::Content *node);
328
329 virtual ~EncryptedMessagePart();
330
331 QString text() const Q_DECL_OVERRIDE;
332
333 void setDecryptMessage(bool decrypt);
334 bool decryptMessage() const;
335
336 void setIsEncrypted(bool encrypted);
337 bool isEncrypted() const;
338
339 bool isDecryptable() const;
340
341 bool passphraseError() const;
342
343 void startDecryption(const QByteArray &text, const QTextCodec *aCodec);
344 void startDecryption(KMime::Content *data = nullptr);
345
346 QByteArray mDecryptedData;
347
348 QString plaintextContent() const Q_DECL_OVERRIDE;
349 QString htmlContent() const Q_DECL_OVERRIDE;
350
351private:
352 /** Handles the dectyptioon of a given content
353 * returns true if the decryption was successfull
354 * if used in async mode, check if mMetaData.inProgress is true, it inicates a running decryption process.
355 */
356 bool okDecryptMIME(KMime::Content &data);
357
358protected:
359 bool mPassphraseError;
360 bool mNoSecKey;
361 const QGpgME::Protocol *mCryptoProto;
362 QString mFromAddress;
363 KMime::Content *mNode;
364 bool mDecryptMessage;
365 QByteArray mVerifiedText;
366 std::vector<GpgME::DecryptionResult::Recipient> mDecryptRecipients;
367
368 friend class DefaultRendererPrivate;
369 friend class ::PartPrivate;
370};
371
372class SignedMessagePart : public MessagePart
373{
374 Q_OBJECT
375 Q_PROPERTY(bool isSigned READ isSigned)
376public:
377 typedef QSharedPointer<SignedMessagePart> Ptr;
378 SignedMessagePart(ObjectTreeParser *otp,
379 const QString &text,
380 const QGpgME::Protocol *cryptoProto,
381 const QString &fromAddress,
382 KMime::Content *node);
383
384 virtual ~SignedMessagePart();
385
386 void setIsSigned(bool isSigned);
387 bool isSigned() const;
388
389 void startVerification(const QByteArray &text, const QTextCodec *aCodec);
390 void startVerificationDetached(const QByteArray &text, KMime::Content *textNode, const QByteArray &signature);
391
392 QByteArray mDecryptedData;
393 std::vector<GpgME::Signature> mSignatures;
394
395 QString plaintextContent() const Q_DECL_OVERRIDE;
396 QString htmlContent() const Q_DECL_OVERRIDE;
397
398private:
399 /** Handles the verification of data
400 * If signature is empty it is handled as inline signature otherwise as detached signature mode.
401 * Returns true if the verfication was successfull and the block is signed.
402 * If used in async mode, check if mMetaData.inProgress is true, it inicates a running verification process.
403 */
404 bool okVerify(const QByteArray &data, const QByteArray &signature, KMime::Content *textNode);
405
406 void sigStatusToMetaData();
407
408 void setVerificationResult(const CryptoBodyPartMemento *m, KMime::Content *textNode);
409protected:
410 const QGpgME::Protocol *mCryptoProto;
411 QString mFromAddress;
412 KMime::Content *mNode;
413 QByteArray mVerifiedText;
414
415 friend EncryptedMessagePart;
416 friend class DefaultRendererPrivate;
417 friend class ::PartPrivate;
418};
419
420}
421
422#endif //__MIMETREEPARSER_MESSAGEPART_H__
diff --git a/framework/src/domain/mimetreeparser/otp/messagepartrenderer.cpp b/framework/src/domain/mimetreeparser/otp/messagepartrenderer.cpp
deleted file mode 100644
index 7f622268..00000000
--- a/framework/src/domain/mimetreeparser/otp/messagepartrenderer.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 Copyright (C) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#include "messagepartrenderer.h"
20
21MimeTreeParser::Interface::MessagePartRenderer::~MessagePartRenderer()
22{
23}
diff --git a/framework/src/domain/mimetreeparser/otp/messagepartrenderer.h b/framework/src/domain/mimetreeparser/otp/messagepartrenderer.h
deleted file mode 100644
index a90c17e6..00000000
--- a/framework/src/domain/mimetreeparser/otp/messagepartrenderer.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 Copyright (C) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#ifndef __MIMETREEPARSER_MESSAGEPARTRENDERER_IF_H__
20#define __MIMETREEPARSER_MESSAGEPARTRENDERER_IF_H__
21
22#include <QSharedPointer>
23
24namespace MimeTreeParser
25{
26namespace Interface
27{
28/**
29* Interface for rendering messageparts to html.
30* @author Andras Mantia <sknauss@kde.org>
31*/
32class MessagePartRenderer
33{
34public:
35 typedef QSharedPointer<MessagePartRenderer> Ptr;
36
37 virtual ~MessagePartRenderer();
38
39 virtual QString html() const = 0;
40};
41}
42}
43#endif
diff --git a/framework/src/domain/mimetreeparser/otp/mimetreeparser_debug.cpp b/framework/src/domain/mimetreeparser/otp/mimetreeparser_debug.cpp
deleted file mode 100644
index f8ac36cd..00000000
--- a/framework/src/domain/mimetreeparser/otp/mimetreeparser_debug.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
1#include "mimetreeparser_debug.h"
2
3Q_LOGGING_CATEGORY(MIMETREEPARSER_LOG, "mimetreeparser")
diff --git a/framework/src/domain/mimetreeparser/otp/mimetreeparser_debug.h b/framework/src/domain/mimetreeparser/otp/mimetreeparser_debug.h
deleted file mode 100644
index ddfa6315..00000000
--- a/framework/src/domain/mimetreeparser/otp/mimetreeparser_debug.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#pragma once
2
3#include <QLoggingCategory>
4Q_DECLARE_LOGGING_CATEGORY(MIMETREEPARSER_LOG)
diff --git a/framework/src/domain/mimetreeparser/otp/multipartalternative.cpp b/framework/src/domain/mimetreeparser/otp/multipartalternative.cpp
deleted file mode 100644
index 42c70e28..00000000
--- a/framework/src/domain/mimetreeparser/otp/multipartalternative.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "multipartalternative.h"
21
22#include "utils.h"
23
24#include "objecttreeparser.h"
25#include "messagepart.h"
26
27#include <KMime/Content>
28
29#include "mimetreeparser_debug.h"
30
31using namespace MimeTreeParser;
32
33const MultiPartAlternativeBodyPartFormatter *MultiPartAlternativeBodyPartFormatter::self;
34
35const Interface::BodyPartFormatter *MultiPartAlternativeBodyPartFormatter::create()
36{
37 if (!self) {
38 self = new MultiPartAlternativeBodyPartFormatter();
39 }
40 return self;
41}
42Interface::BodyPartFormatter::Result MultiPartAlternativeBodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
43{
44 Q_UNUSED(writer)
45 const auto p = process(*part);
46 const auto mp = static_cast<MessagePart *>(p.data());
47 if (mp) {
48 mp->html(false);
49 return Ok;
50 }
51 return Failed;
52}
53
54Interface::MessagePart::Ptr MultiPartAlternativeBodyPartFormatter::process(Interface::BodyPart &part) const
55{
56 KMime::Content *node = part.content();
57 if (node->contents().isEmpty()) {
58 return MessagePart::Ptr();
59 }
60
61 auto preferredMode = part.source()->preferredMode();
62 AlternativeMessagePart::Ptr mp(new AlternativeMessagePart(part.objectTreeParser(), node, preferredMode));
63 if (mp->mChildNodes.isEmpty()) {
64 MimeMessagePart::Ptr _mp(new MimeMessagePart(part.objectTreeParser(), node->contents().at(0), false));
65 return _mp;
66 }
67
68 KMime::Content *dataIcal = mp->mChildNodes.contains(Util::MultipartIcal) ? mp->mChildNodes[Util::MultipartIcal] : nullptr;
69 KMime::Content *dataHtml = mp->mChildNodes.contains(Util::MultipartHtml) ? mp->mChildNodes[Util::MultipartHtml] : nullptr;
70 KMime::Content *dataPlain = mp->mChildNodes.contains(Util::MultipartPlain) ? mp->mChildNodes[Util::MultipartPlain] : nullptr;
71
72 // Make sure that in default ical is prefered over html and plain text
73 if (dataIcal && ((preferredMode != Util::MultipartHtml && preferredMode != Util::MultipartPlain))) {
74 if (dataHtml) {
75 part.nodeHelper()->setNodeProcessed(dataHtml, false);
76 }
77 if (dataPlain) {
78 part.nodeHelper()->setNodeProcessed(dataPlain, false);
79 }
80 preferredMode = Util::MultipartIcal;
81 } else if ((dataHtml && (preferredMode == Util::MultipartHtml || preferredMode == Util::Html)) ||
82 (dataHtml && dataPlain && dataPlain->body().isEmpty())) {
83 if (dataPlain) {
84 part.nodeHelper()->setNodeProcessed(dataPlain, false);
85 }
86 preferredMode = Util::MultipartHtml;
87 } else if (!(preferredMode == Util::MultipartHtml) && dataPlain) {
88 part.nodeHelper()->setNodeProcessed(dataHtml, false);
89 preferredMode = Util::MultipartPlain;
90 }
91 part.source()->setHtmlMode(preferredMode, mp->availableModes());
92 mp->mPreferredMode = preferredMode;
93 return mp;
94}
diff --git a/framework/src/domain/mimetreeparser/otp/multipartalternative.h b/framework/src/domain/mimetreeparser/otp/multipartalternative.h
deleted file mode 100644
index 78e5ef38..00000000
--- a/framework/src/domain/mimetreeparser/otp/multipartalternative.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_MULTIPARTALTERNATIVE_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_MULTIPARTALTERNATIVE_H__
22
23#include "bodypartformatter.h"
24#include "bodypart.h"
25
26namespace MimeTreeParser
27{
28
29class MultiPartAlternativeBodyPartFormatter : public Interface::BodyPartFormatter
30{
31 static const MultiPartAlternativeBodyPartFormatter *self;
32public:
33 Interface::MessagePart::Ptr process(Interface::BodyPart &part) const Q_DECL_OVERRIDE;
34 Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
35 using Interface::BodyPartFormatter::format;
36 static const Interface::BodyPartFormatter *create();
37};
38
39}
40
41#endif
diff --git a/framework/src/domain/mimetreeparser/otp/multipartencrypted.cpp b/framework/src/domain/mimetreeparser/otp/multipartencrypted.cpp
deleted file mode 100644
index 7a049318..00000000
--- a/framework/src/domain/mimetreeparser/otp/multipartencrypted.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "multipartencrypted.h"
21
22#include "utils.h"
23
24#include "objecttreeparser.h"
25#include "messagepart.h"
26
27#include <KMime/Content>
28
29#include <QGpgME/Protocol>
30
31#include "mimetreeparser_debug.h"
32
33using namespace MimeTreeParser;
34
35const MultiPartEncryptedBodyPartFormatter *MultiPartEncryptedBodyPartFormatter::self;
36
37const Interface::BodyPartFormatter *MultiPartEncryptedBodyPartFormatter::create()
38{
39 if (!self) {
40 self = new MultiPartEncryptedBodyPartFormatter();
41 }
42 return self;
43}
44Interface::BodyPartFormatter::Result MultiPartEncryptedBodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
45{
46 Q_UNUSED(writer)
47 const auto p = process(*part);
48 const auto mp = static_cast<MessagePart *>(p.data());
49 if (mp) {
50 mp->html(false);
51 return Ok;
52 }
53 return Failed;
54}
55
56Interface::MessagePart::Ptr MultiPartEncryptedBodyPartFormatter::process(Interface::BodyPart &part) const
57{
58 KMime::Content *node = part.content();
59
60 if (node->contents().isEmpty()) {
61 Q_ASSERT(false);
62 return MessagePart::Ptr();
63 }
64
65 const QGpgME::Protocol *useThisCryptProto = nullptr;
66
67 /*
68 ATTENTION: This code is to be replaced by the new 'auto-detect' feature. --------------------------------------
69 */
70 KMime::Content *data = findTypeInDirectChilds(node, "application/octet-stream");
71 if (data) {
72 useThisCryptProto = QGpgME::openpgp();
73 }
74 if (!data) {
75 data = findTypeInDirectChilds(node, "application/pkcs7-mime");
76 if (data) {
77 useThisCryptProto = QGpgME::smime();
78 }
79 }
80 /*
81 ---------------------------------------------------------------------------------------------------------------
82 */
83
84 if (!data) {
85 return MessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), node->contents().at(0), false));
86 }
87
88 part.nodeHelper()->setEncryptionState(node, KMMsgFullyEncrypted);
89
90 EncryptedMessagePart::Ptr mp(new EncryptedMessagePart(part.objectTreeParser(),
91 data->decodedText(), useThisCryptProto,
92 part.nodeHelper()->fromAsString(data), node));
93 mp->setIsEncrypted(true);
94 mp->setDecryptMessage(part.source()->decryptMessage());
95 PartMetaData *messagePart(mp->partMetaData());
96 if (!part.source()->decryptMessage()) {
97 part.nodeHelper()->setNodeProcessed(data, false); // Set the data node to done to prevent it from being processed
98 } else if (KMime::Content *newNode = part.nodeHelper()->decryptedNodeForContent(data)) {
99 // if we already have a decrypted node for part.objectTreeParser() encrypted node, don't do the decryption again
100 return MessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), newNode, true));
101 } else {
102 mp->startDecryption(data);
103
104 qCDebug(MIMETREEPARSER_LOG) << "decrypted, signed?:" << messagePart->isSigned;
105
106 if (!messagePart->inProgress) {
107 part.nodeHelper()->setNodeProcessed(data, false); // Set the data node to done to prevent it from being processed
108 }
109 }
110 return mp;
111}
diff --git a/framework/src/domain/mimetreeparser/otp/multipartencrypted.h b/framework/src/domain/mimetreeparser/otp/multipartencrypted.h
deleted file mode 100644
index 0d2e01a8..00000000
--- a/framework/src/domain/mimetreeparser/otp/multipartencrypted.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_MULTIPARTENCRYPTED_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_MULTIPARTENCRYPTED_H__
22
23#include "bodypartformatter.h"
24#include "bodypart.h"
25
26namespace MimeTreeParser
27{
28
29class MultiPartEncryptedBodyPartFormatter : public Interface::BodyPartFormatter
30{
31 static const MultiPartEncryptedBodyPartFormatter *self;
32public:
33 Interface::MessagePart::Ptr process(Interface::BodyPart &part) const Q_DECL_OVERRIDE;
34 Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
35 using Interface::BodyPartFormatter::format;
36 static const Interface::BodyPartFormatter *create();
37};
38
39}
40
41#endif
diff --git a/framework/src/domain/mimetreeparser/otp/multipartmixed.cpp b/framework/src/domain/mimetreeparser/otp/multipartmixed.cpp
deleted file mode 100644
index 43056e51..00000000
--- a/framework/src/domain/mimetreeparser/otp/multipartmixed.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "multipartmixed.h"
21
22#include "objecttreeparser.h"
23#include "messagepart.h"
24
25#include <KMime/Content>
26
27#include "mimetreeparser_debug.h"
28
29using namespace MimeTreeParser;
30
31const MultiPartMixedBodyPartFormatter *MultiPartMixedBodyPartFormatter::self;
32
33const Interface::BodyPartFormatter *MultiPartMixedBodyPartFormatter::create()
34{
35 if (!self) {
36 self = new MultiPartMixedBodyPartFormatter();
37 }
38 return self;
39}
40Interface::BodyPartFormatter::Result MultiPartMixedBodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
41{
42 Q_UNUSED(writer)
43 const auto p = process(*part);
44 const auto mp = static_cast<MessagePart *>(p.data());
45 if (mp) {
46 mp->html(false);
47 return Ok;
48 }
49 return Failed;
50}
51
52Interface::MessagePart::Ptr MultiPartMixedBodyPartFormatter::process(Interface::BodyPart &part) const
53{
54 if (part.content()->contents().isEmpty()) {
55 return MessagePart::Ptr();
56 }
57
58 // normal treatment of the parts in the mp/mixed container
59 MimeMessagePart::Ptr mp(new MimeMessagePart(part.objectTreeParser(), part.content()->contents().at(0), false));
60 return mp;
61}
diff --git a/framework/src/domain/mimetreeparser/otp/multipartmixed.h b/framework/src/domain/mimetreeparser/otp/multipartmixed.h
deleted file mode 100644
index 0029501b..00000000
--- a/framework/src/domain/mimetreeparser/otp/multipartmixed.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_MULTIPARTMIXED_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_MULTIPARTMIXED_H__
22
23#include "bodypartformatter.h"
24#include "bodypart.h"
25
26namespace MimeTreeParser
27{
28
29class MultiPartMixedBodyPartFormatter : public Interface::BodyPartFormatter
30{
31 static const MultiPartMixedBodyPartFormatter *self;
32public:
33 Interface::MessagePart::Ptr process(Interface::BodyPart &part) const Q_DECL_OVERRIDE;
34 Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
35 using Interface::BodyPartFormatter::format;
36 static const Interface::BodyPartFormatter *create();
37};
38
39}
40
41#endif
diff --git a/framework/src/domain/mimetreeparser/otp/multipartsigned.cpp b/framework/src/domain/mimetreeparser/otp/multipartsigned.cpp
deleted file mode 100644
index cb0def6c..00000000
--- a/framework/src/domain/mimetreeparser/otp/multipartsigned.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "multipartsigned.h"
21
22#include "objecttreeparser.h"
23#include "messagepart.h"
24
25#include <KMime/Content>
26
27#include <QGpgME/Protocol>
28
29#include "mimetreeparser_debug.h"
30
31#include <QTextCodec>
32
33using namespace MimeTreeParser;
34
35const MultiPartSignedBodyPartFormatter *MultiPartSignedBodyPartFormatter::self;
36
37const Interface::BodyPartFormatter *MultiPartSignedBodyPartFormatter::create()
38{
39 if (!self) {
40 self = new MultiPartSignedBodyPartFormatter();
41 }
42 return self;
43}
44Interface::BodyPartFormatter::Result MultiPartSignedBodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
45{
46 Q_UNUSED(writer)
47 const auto p = process(*part);
48 const auto mp = static_cast<MessagePart *>(p.data());
49 if (mp) {
50 mp->html(false);
51 return Ok;
52 }
53 return Failed;
54}
55
56Interface::MessagePart::Ptr MultiPartSignedBodyPartFormatter::process(Interface::BodyPart &part) const
57{
58 KMime::Content *node = part.content();
59 if (node->contents().size() != 2) {
60 qCDebug(MIMETREEPARSER_LOG) << "mulitpart/signed must have exactly two child parts!" << endl
61 << "processing as multipart/mixed";
62 if (!node->contents().isEmpty()) {
63 return MessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), node->contents().at(0), false));
64 } else {
65 return MessagePart::Ptr();
66 }
67 }
68
69 KMime::Content *signedData = node->contents().at(0);
70 KMime::Content *signature = node->contents().at(1);
71 Q_ASSERT(signedData);
72 Q_ASSERT(signature);
73
74 QString protocolContentType = node->contentType()->parameter(QStringLiteral("protocol")).toLower();
75 const QString signatureContentType = QLatin1String(signature->contentType()->mimeType().toLower());
76 if (protocolContentType.isEmpty()) {
77 qCWarning(MIMETREEPARSER_LOG) << "Message doesn't set the protocol for the multipart/signed content-type, "
78 "using content-type of the signature:" << signatureContentType;
79 protocolContentType = signatureContentType;
80 }
81
82 const QGpgME::Protocol *protocol = nullptr;
83 if (protocolContentType == QLatin1String("application/pkcs7-signature") ||
84 protocolContentType == QLatin1String("application/x-pkcs7-signature")) {
85 protocol = QGpgME::smime();
86 } else if (protocolContentType == QLatin1String("application/pgp-signature") ||
87 protocolContentType == QLatin1String("application/x-pgp-signature")) {
88 protocol = QGpgME::openpgp();
89 }
90
91 if (!protocol) {
92 return MessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), signedData, false));
93 }
94
95 part.nodeHelper()->setNodeProcessed(signature, true);
96
97 part.nodeHelper()->setSignatureState(node, KMMsgFullySigned);
98
99 const QByteArray cleartext = KMime::LFtoCRLF(signedData->encodedContent());
100 const QTextCodec *aCodec(part.objectTreeParser()->codecFor(signedData));
101
102 SignedMessagePart::Ptr mp(new SignedMessagePart(part.objectTreeParser(),
103 aCodec->toUnicode(cleartext), protocol,
104 part.nodeHelper()->fromAsString(node), signature));
105 PartMetaData *messagePart(mp->partMetaData());
106
107 if (protocol) {
108 mp->startVerificationDetached(cleartext, signedData, signature->decodedContent());
109 } else {
110 messagePart->auditLogError = GpgME::Error(GPG_ERR_NOT_IMPLEMENTED);
111 }
112
113 return mp;
114}
diff --git a/framework/src/domain/mimetreeparser/otp/multipartsigned.h b/framework/src/domain/mimetreeparser/otp/multipartsigned.h
deleted file mode 100644
index 4b8921ad..00000000
--- a/framework/src/domain/mimetreeparser/otp/multipartsigned.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_MULTIPARTSIGNED_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_MULTIPARTSIGNED_H__
22
23#include "bodypartformatter.h"
24#include "bodypart.h"
25
26namespace MimeTreeParser
27{
28
29class MultiPartSignedBodyPartFormatter : public Interface::BodyPartFormatter
30{
31 static const MultiPartSignedBodyPartFormatter *self;
32public:
33 Interface::MessagePart::Ptr process(Interface::BodyPart &part) const Q_DECL_OVERRIDE;
34 Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
35 using Interface::BodyPartFormatter::format;
36 static const Interface::BodyPartFormatter *create();
37};
38
39}
40
41#endif
diff --git a/framework/src/domain/mimetreeparser/otp/nodehelper.cpp b/framework/src/domain/mimetreeparser/otp/nodehelper.cpp
deleted file mode 100644
index 8e224f1b..00000000
--- a/framework/src/domain/mimetreeparser/otp/nodehelper.cpp
+++ /dev/null
@@ -1,1069 +0,0 @@
1/*
2 Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19
20#include "nodehelper.h"
21#include "mimetreeparser_debug.h"
22#include "partmetadata.h"
23#include "bodypart.h"
24#include "attachmenttemporaryfilesdirs.h"
25
26#include <KMime/Content>
27#include <KMime/Message>
28#include <KMime/Headers>
29
30#include <QTemporaryFile>
31#include <KLocalizedString>
32#include <kcharsets.h>
33
34#include <QUrl>
35#include <QDir>
36#include <QTextCodec>
37
38#include <string>
39#include <sstream>
40#include <algorithm>
41#include <KCharsets>
42#include <QMimeDatabase>
43#include <QMimeType>
44#include <QFileDevice>
45
46namespace MimeTreeParser
47{
48
49QStringList replySubjPrefixes(QStringList() << QStringLiteral("Re\\s*:") << QStringLiteral("Re\\[\\d+\\]:") << QStringLiteral("Re\\d+:"));
50QStringList forwardSubjPrefixes(QStringList() << QStringLiteral("Fwd:") << QStringLiteral("FW:"));
51
52NodeHelper::NodeHelper() :
53 mAttachmentFilesDir(new AttachmentTemporaryFilesDirs())
54{
55 //TODO(Andras) add methods to modify these prefixes
56
57 mLocalCodec = QTextCodec::codecForLocale();
58
59 // In the case of Japan. Japanese locale name is "eucjp" but
60 // The Japanese mail systems normally used "iso-2022-jp" of locale name.
61 // We want to change locale name from eucjp to iso-2022-jp at KMail only.
62
63 // (Introduction to i18n, 6.6 Limit of Locale technology):
64 // EUC-JP is the de-facto standard for UNIX systems, ISO 2022-JP
65 // is the standard for Internet, and Shift-JIS is the encoding
66 // for Windows and Macintosh.
67 if (mLocalCodec) {
68 const QByteArray codecNameLower = mLocalCodec->name().toLower();
69 if (codecNameLower == "eucjp"
70#if defined Q_OS_WIN || defined Q_OS_MACX
71 || codecNameLower == "shift-jis" // OK?
72#endif
73 ) {
74 mLocalCodec = QTextCodec::codecForName("jis7");
75 // QTextCodec *cdc = QTextCodec::codecForName("jis7");
76 // QTextCodec::setCodecForLocale(cdc);
77 // KLocale::global()->setEncoding(cdc->mibEnum());
78 }
79 }
80}
81
82NodeHelper::~NodeHelper()
83{
84 if (mAttachmentFilesDir) {
85 mAttachmentFilesDir->forceCleanTempFiles();
86 delete mAttachmentFilesDir;
87 mAttachmentFilesDir = nullptr;
88 }
89 clear();
90}
91
92void NodeHelper::setNodeProcessed(KMime::Content *node, bool recurse)
93{
94 if (!node) {
95 return;
96 }
97 mProcessedNodes.append(node);
98 qCDebug(MIMETREEPARSER_LOG) << "Node processed: " << node->index().toString() << node->contentType()->as7BitString();
99 //<< " decodedContent" << node->decodedContent();
100 if (recurse) {
101 const auto contents = node->contents();
102 for (KMime::Content *c : contents) {
103 setNodeProcessed(c, true);
104 }
105 }
106}
107
108void NodeHelper::setNodeUnprocessed(KMime::Content *node, bool recurse)
109{
110 if (!node) {
111 return;
112 }
113 mProcessedNodes.removeAll(node);
114
115 //avoid double addition of extra nodes, eg. encrypted attachments
116 const QMap<KMime::Content *, QList<KMime::Content *> >::iterator it = mExtraContents.find(node);
117 if (it != mExtraContents.end()) {
118 Q_FOREACH (KMime::Content *c, it.value()) {
119 KMime::Content *p = c->parent();
120 if (p) {
121 p->removeContent(c);
122 }
123 }
124 qDeleteAll(it.value());
125 qCDebug(MIMETREEPARSER_LOG) << "mExtraContents deleted for" << it.key();
126 mExtraContents.erase(it);
127 }
128
129 qCDebug(MIMETREEPARSER_LOG) << "Node UNprocessed: " << node;
130 if (recurse) {
131 const auto contents = node->contents();
132 for (KMime::Content *c : contents) {
133 setNodeUnprocessed(c, true);
134 }
135 }
136}
137
138bool NodeHelper::nodeProcessed(KMime::Content *node) const
139{
140 if (!node) {
141 return true;
142 }
143 return mProcessedNodes.contains(node);
144}
145
146static void clearBodyPartMemento(QMap<QByteArray, Interface::BodyPartMemento *> &bodyPartMementoMap)
147{
148 for (QMap<QByteArray, Interface::BodyPartMemento *>::iterator
149 it = bodyPartMementoMap.begin(), end = bodyPartMementoMap.end();
150 it != end; ++it) {
151 Interface::BodyPartMemento *memento = it.value();
152 memento->detach();
153 delete memento;
154 }
155 bodyPartMementoMap.clear();
156}
157
158void NodeHelper::clear()
159{
160 mProcessedNodes.clear();
161 mEncryptionState.clear();
162 mSignatureState.clear();
163 mOverrideCodecs.clear();
164 std::for_each(mBodyPartMementoMap.begin(), mBodyPartMementoMap.end(),
165 &clearBodyPartMemento);
166 mBodyPartMementoMap.clear();
167 QMap<KMime::Content *, QList<KMime::Content *> >::ConstIterator end(mExtraContents.constEnd());
168
169 for (QMap<KMime::Content *, QList<KMime::Content *> >::ConstIterator it = mExtraContents.constBegin(); it != end; ++it) {
170 Q_FOREACH (KMime::Content *c, it.value()) {
171 KMime::Content *p = c->parent();
172 if (p) {
173 p->removeContent(c);
174 }
175 }
176 qDeleteAll(it.value());
177 qCDebug(MIMETREEPARSER_LOG) << "mExtraContents deleted for" << it.key();
178 }
179 mExtraContents.clear();
180 mDisplayEmbeddedNodes.clear();
181 mDisplayHiddenNodes.clear();
182}
183
184void NodeHelper::setEncryptionState(const KMime::Content *node, const KMMsgEncryptionState state)
185{
186 mEncryptionState[node] = state;
187}
188
189KMMsgEncryptionState NodeHelper::encryptionState(const KMime::Content *node) const
190{
191 return mEncryptionState.value(node, KMMsgNotEncrypted);
192}
193
194void NodeHelper::setSignatureState(const KMime::Content *node, const KMMsgSignatureState state)
195{
196 mSignatureState[node] = state;
197}
198
199KMMsgSignatureState NodeHelper::signatureState(const KMime::Content *node) const
200{
201 return mSignatureState.value(node, KMMsgNotSigned);
202}
203
204PartMetaData NodeHelper::partMetaData(KMime::Content *node)
205{
206 return mPartMetaDatas.value(node, PartMetaData());
207}
208
209void NodeHelper::setPartMetaData(KMime::Content *node, const PartMetaData &metaData)
210{
211 mPartMetaDatas.insert(node, metaData);
212}
213
214QString NodeHelper::writeNodeToTempFile(KMime::Content *node)
215{
216 // If the message part is already written to a file, no point in doing it again.
217 // This function is called twice actually, once from the rendering of the attachment
218 // in the body and once for the header.
219 QUrl existingFileName = tempFileUrlFromNode(node);
220 if (!existingFileName.isEmpty()) {
221 return existingFileName.toLocalFile();
222 }
223
224 QString fname = createTempDir(persistentIndex(node));
225 if (fname.isEmpty()) {
226 return QString();
227 }
228
229 QString fileName = NodeHelper::fileName(node);
230 // strip off a leading path
231 int slashPos = fileName.lastIndexOf(QLatin1Char('/'));
232 if (-1 != slashPos) {
233 fileName = fileName.mid(slashPos + 1);
234 }
235 if (fileName.isEmpty()) {
236 fileName = QStringLiteral("unnamed");
237 }
238 fname += QLatin1Char('/') + fileName;
239
240 qCDebug(MIMETREEPARSER_LOG) << "Create temp file: " << fname;
241 QByteArray data = node->decodedContent();
242 if (node->contentType()->isText() && !data.isEmpty()) {
243 // convert CRLF to LF before writing text attachments to disk
244 data = KMime::CRLFtoLF(data);
245 }
246 QFile f(fname);
247 if (!f.open(QIODevice::ReadWrite)) {
248 qCWarning(MIMETREEPARSER_LOG) << "Failed to write note to file:" << f.errorString();
249 return QString();
250 }
251 f.write(data);
252 mAttachmentFilesDir->addTempFile(fname);
253 // make file read-only so that nobody gets the impression that he might
254 // edit attached files (cf. bug #52813)
255 f.setPermissions(QFileDevice::ReadUser);
256 f.close();
257
258 return fname;
259}
260
261QUrl NodeHelper::tempFileUrlFromNode(const KMime::Content *node)
262{
263 if (!node) {
264 return QUrl();
265 }
266
267 const QString index = persistentIndex(node);
268
269 foreach (const QString &path, mAttachmentFilesDir->temporaryFiles()) {
270 const int right = path.lastIndexOf(QLatin1Char('/'));
271 int left = path.lastIndexOf(QLatin1String(".index."), right);
272 if (left != -1) {
273 left += 7;
274 }
275
276 QStringRef storedIndex(&path, left, right - left);
277 if (left != -1 && storedIndex == index) {
278 return QUrl::fromLocalFile(path);
279 }
280 }
281 return QUrl();
282}
283
284QString NodeHelper::createTempDir(const QString &param)
285{
286 QTemporaryFile *tempFile = new QTemporaryFile(QDir::tempPath() + QLatin1String("/messageviewer_XXXXXX") + QLatin1String(".index.") + param);
287 tempFile->open();
288 const QString fname = tempFile->fileName();
289 delete tempFile;
290
291 QFile fFile(fname);
292 if (!(fFile.permissions() & QFileDevice::WriteUser)) {
293 // Not there or not writable
294 if (!QDir().mkpath(fname) ||
295 !fFile.setPermissions(QFileDevice::WriteUser | QFileDevice::ReadUser | QFileDevice::ExeUser)) {
296 return QString(); //failed create
297 }
298 }
299
300 Q_ASSERT(!fname.isNull());
301
302 mAttachmentFilesDir->addTempDir(fname);
303 return fname;
304}
305
306void NodeHelper::forceCleanTempFiles()
307{
308 mAttachmentFilesDir->forceCleanTempFiles();
309 delete mAttachmentFilesDir;
310 mAttachmentFilesDir = nullptr;
311}
312
313void NodeHelper::removeTempFiles()
314{
315 //Don't delete it it will delete in class
316 mAttachmentFilesDir->removeTempFiles();
317 mAttachmentFilesDir = new AttachmentTemporaryFilesDirs();
318}
319
320void NodeHelper::addTempFile(const QString &file)
321{
322 mAttachmentFilesDir->addTempFile(file);
323}
324
325bool NodeHelper::isInEncapsulatedMessage(KMime::Content *node)
326{
327 const KMime::Content *const topLevel = node->topLevel();
328 const KMime::Content *cur = node;
329 while (cur && cur != topLevel) {
330 const bool parentIsMessage = cur->parent() && cur->parent()->contentType(false) &&
331 cur->parent()->contentType()->mimeType().toLower() == "message/rfc822";
332 if (parentIsMessage && cur->parent() != topLevel) {
333 return true;
334 }
335 cur = cur->parent();
336 }
337 return false;
338}
339
340QByteArray NodeHelper::charset(KMime::Content *node)
341{
342 if (node->contentType(false)) {
343 return node->contentType(false)->charset();
344 } else {
345 return node->defaultCharset();
346 }
347}
348
349KMMsgEncryptionState NodeHelper::overallEncryptionState(KMime::Content *node) const
350{
351 KMMsgEncryptionState myState = KMMsgEncryptionStateUnknown;
352 if (!node) {
353 return myState;
354 }
355
356 KMime::Content *parent = node->parent();
357 auto contents = parent ? parent->contents() : KMime::Content::List();
358 if (contents.isEmpty()) {
359 contents.append(node);
360 }
361 int i = contents.indexOf(const_cast<KMime::Content *>(node));
362 for (; i < contents.size(); ++i) {
363 auto next = contents.at(i);
364 KMMsgEncryptionState otherState = encryptionState(next);
365
366 // NOTE: children are tested ONLY when parent is not encrypted
367 if (otherState == KMMsgNotEncrypted && !next->contents().isEmpty()) {
368 otherState = overallEncryptionState(next->contents().at(0));
369 }
370
371 if (otherState == KMMsgNotEncrypted && !extraContents(next).isEmpty()) {
372 otherState = overallEncryptionState(extraContents(next).at(0));
373 }
374
375 if (next == node) {
376 myState = otherState;
377 }
378
379 switch (otherState) {
380 case KMMsgEncryptionStateUnknown:
381 break;
382 case KMMsgNotEncrypted:
383 if (myState == KMMsgFullyEncrypted) {
384 myState = KMMsgPartiallyEncrypted;
385 } else if (myState != KMMsgPartiallyEncrypted) {
386 myState = KMMsgNotEncrypted;
387 }
388 break;
389 case KMMsgPartiallyEncrypted:
390 myState = KMMsgPartiallyEncrypted;
391 break;
392 case KMMsgFullyEncrypted:
393 if (myState != KMMsgFullyEncrypted) {
394 myState = KMMsgPartiallyEncrypted;
395 }
396 break;
397 case KMMsgEncryptionProblematic:
398 break;
399 }
400 }
401
402 qCDebug(MIMETREEPARSER_LOG) << "\n\n KMMsgEncryptionState:" << myState;
403
404 return myState;
405}
406
407KMMsgSignatureState NodeHelper::overallSignatureState(KMime::Content *node) const
408{
409 KMMsgSignatureState myState = KMMsgSignatureStateUnknown;
410 if (!node) {
411 return myState;
412 }
413
414 KMime::Content *parent = node->parent();
415 auto contents = parent ? parent->contents() : KMime::Content::List();
416 if (contents.isEmpty()) {
417 contents.append(node);
418 }
419 int i = contents.indexOf(const_cast<KMime::Content *>(node));
420 for (; i < contents.size(); ++i) {
421 auto next = contents.at(i);
422 KMMsgSignatureState otherState = signatureState(next);
423
424 // NOTE: children are tested ONLY when parent is not encrypted
425 if (otherState == KMMsgNotSigned && !next->contents().isEmpty()) {
426 otherState = overallSignatureState(next->contents().at(0));
427 }
428
429 if (otherState == KMMsgNotSigned && !extraContents(next).isEmpty()) {
430 otherState = overallSignatureState(extraContents(next).at(0));
431 }
432
433 if (next == node) {
434 myState = otherState;
435 }
436
437 switch (otherState) {
438 case KMMsgSignatureStateUnknown:
439 break;
440 case KMMsgNotSigned:
441 if (myState == KMMsgFullySigned) {
442 myState = KMMsgPartiallySigned;
443 } else if (myState != KMMsgPartiallySigned) {
444 myState = KMMsgNotSigned;
445 }
446 break;
447 case KMMsgPartiallySigned:
448 myState = KMMsgPartiallySigned;
449 break;
450 case KMMsgFullySigned:
451 if (myState != KMMsgFullySigned) {
452 myState = KMMsgPartiallySigned;
453 }
454 break;
455 case KMMsgSignatureProblematic:
456 break;
457 }
458 }
459
460 qCDebug(MIMETREEPARSER_LOG) << "\n\n KMMsgSignatureState:" << myState;
461
462 return myState;
463}
464
465void NodeHelper::magicSetType(KMime::Content *node, bool aAutoDecode)
466{
467 const QByteArray body = (aAutoDecode) ? node->decodedContent() : node->body();
468 QMimeDatabase db;
469 QMimeType mime = db.mimeTypeForData(body);
470
471 QString mimetype = mime.name();
472 node->contentType()->setMimeType(mimetype.toLatin1());
473}
474
475// static
476QString NodeHelper::replacePrefixes(const QString &str,
477 const QStringList &prefixRegExps,
478 bool replace,
479 const QString &newPrefix)
480{
481 bool recognized = false;
482 // construct a big regexp that
483 // 1. is anchored to the beginning of str (sans whitespace)
484 // 2. matches at least one of the part regexps in prefixRegExps
485 QString bigRegExp = QStringLiteral("^(?:\\s+|(?:%1))+\\s*")
486 .arg(prefixRegExps.join(QStringLiteral(")|(?:")));
487 QRegExp rx(bigRegExp, Qt::CaseInsensitive);
488 if (!rx.isValid()) {
489 qCWarning(MIMETREEPARSER_LOG) << "bigRegExp = \""
490 << bigRegExp << "\"\n"
491 << "prefix regexp is invalid!";
492 // try good ole Re/Fwd:
493 recognized = str.startsWith(newPrefix);
494 } else { // valid rx
495 QString tmp = str;
496 if (rx.indexIn(tmp) == 0) {
497 recognized = true;
498 if (replace) {
499 return tmp.replace(0, rx.matchedLength(), newPrefix + QLatin1Char(' '));
500 }
501 }
502 }
503 if (!recognized) {
504 return newPrefix + QLatin1Char(' ') + str;
505 } else {
506 return str;
507 }
508}
509
510QString NodeHelper::cleanSubject(KMime::Message *message)
511{
512 return cleanSubject(message, replySubjPrefixes + forwardSubjPrefixes,
513 true, QString()).trimmed();
514}
515
516QString NodeHelper::cleanSubject(KMime::Message *message,
517 const QStringList &prefixRegExps,
518 bool replace,
519 const QString &newPrefix)
520{
521 QString cleanStr;
522 if (message) {
523 cleanStr =
524 NodeHelper::replacePrefixes(
525 message->subject()->asUnicodeString(), prefixRegExps, replace, newPrefix);
526 }
527 return cleanStr;
528}
529
530void NodeHelper::setOverrideCodec(KMime::Content *node, const QTextCodec *codec)
531{
532 if (!node) {
533 return;
534 }
535
536 mOverrideCodecs[node] = codec;
537}
538
539const QTextCodec *NodeHelper::codec(KMime::Content *node)
540{
541 if (! node) {
542 return mLocalCodec;
543 }
544
545 const QTextCodec *c = mOverrideCodecs.value(node, nullptr);
546 if (!c) {
547 // no override-codec set for this message, try the CT charset parameter:
548 QByteArray charset = node->contentType()->charset();
549
550 // utf-8 is a superset of us-ascii, so we don't loose anything, if we it insead
551 // utf-8 is nowadays that widely, that it is a good guess to use it to fix issus with broken clients.
552 if (charset.toLower() == "us-ascii") {
553 charset = "utf-8";
554 }
555 c = codecForName(charset);
556 }
557 if (!c) {
558 // no charset means us-ascii (RFC 2045), so using local encoding should
559 // be okay
560 c = mLocalCodec;
561 }
562 return c;
563}
564
565const QTextCodec *NodeHelper::codecForName(const QByteArray &_str)
566{
567 if (_str.isEmpty()) {
568 return nullptr;
569 }
570 QByteArray codec = _str.toLower();
571 return KCharsets::charsets()->codecForName(QLatin1String(codec));
572}
573
574QString NodeHelper::fileName(const KMime::Content *node)
575{
576 QString name = const_cast<KMime::Content *>(node)->contentDisposition()->filename();
577 if (name.isEmpty()) {
578 name = const_cast<KMime::Content *>(node)->contentType()->name();
579 }
580
581 name = name.trimmed();
582 return name;
583}
584
585//FIXME(Andras) review it (by Marc?) to see if I got it right. This is supposed to be the partNode::internalBodyPartMemento replacement
586Interface::BodyPartMemento *NodeHelper::bodyPartMemento(KMime::Content *node,
587 const QByteArray &which) const
588{
589 const QMap< QString, QMap<QByteArray, Interface::BodyPartMemento *> >::const_iterator nit
590 = mBodyPartMementoMap.find(persistentIndex(node));
591 if (nit == mBodyPartMementoMap.end()) {
592 return nullptr;
593 }
594 const QMap<QByteArray, Interface::BodyPartMemento *>::const_iterator it =
595 nit->find(which.toLower());
596 return it != nit->end() ? it.value() : nullptr;
597}
598
599//FIXME(Andras) review it (by Marc?) to see if I got it right. This is supposed to be the partNode::internalSetBodyPartMemento replacement
600void NodeHelper::setBodyPartMemento(KMime::Content *node, const QByteArray &which,
601 Interface::BodyPartMemento *memento)
602{
603 QMap<QByteArray, Interface::BodyPartMemento *> &mementos
604 = mBodyPartMementoMap[persistentIndex(node)];
605
606 const QByteArray whichLower = which.toLower();
607 const QMap<QByteArray, Interface::BodyPartMemento *>::iterator it =
608 mementos.lowerBound(whichLower);
609
610 if (it != mementos.end() && it.key() == whichLower) {
611 delete it.value();
612 if (memento) {
613 it.value() = memento;
614 } else {
615 mementos.erase(it);
616 }
617 } else {
618 mementos.insert(whichLower, memento);
619 }
620}
621
622bool NodeHelper::isNodeDisplayedEmbedded(KMime::Content *node) const
623{
624 qCDebug(MIMETREEPARSER_LOG) << "IS NODE: " << mDisplayEmbeddedNodes.contains(node);
625 return mDisplayEmbeddedNodes.contains(node);
626}
627
628void NodeHelper::setNodeDisplayedEmbedded(KMime::Content *node, bool displayedEmbedded)
629{
630 qCDebug(MIMETREEPARSER_LOG) << "SET NODE: " << node << displayedEmbedded;
631 if (displayedEmbedded) {
632 mDisplayEmbeddedNodes.insert(node);
633 } else {
634 mDisplayEmbeddedNodes.remove(node);
635 }
636}
637
638bool NodeHelper::isNodeDisplayedHidden(KMime::Content *node) const
639{
640 return mDisplayHiddenNodes.contains(node);
641}
642
643void NodeHelper::setNodeDisplayedHidden(KMime::Content *node, bool displayedHidden)
644{
645 if (displayedHidden) {
646 mDisplayHiddenNodes.insert(node);
647 } else {
648 mDisplayEmbeddedNodes.remove(node);
649 }
650}
651
652/*!
653 Creates a persistent index string that bridges the gap between the
654 permanent nodes and the temporary ones.
655
656 Used internally for robust indexing.
657*/
658QString NodeHelper::persistentIndex(const KMime::Content *node) const
659{
660 if (!node) {
661 return QString();
662 }
663
664 QString indexStr = node->index().toString();
665 if (indexStr.isEmpty()) {
666 QMapIterator<KMime::Message::Content *, QList<KMime::Content *> > it(mExtraContents);
667 while (it.hasNext()) {
668 it.next();
669 const auto &extraNodes = it.value();
670 for (int i = 0; i < extraNodes.size(); i++) {
671 if (extraNodes[i] == node) {
672 indexStr = QString::fromLatin1("e%1").arg(i);
673 const QString parentIndex = persistentIndex(it.key());
674 if (!parentIndex.isEmpty()) {
675 indexStr = QString::fromLatin1("%1:%2").arg(parentIndex, indexStr);
676 }
677 return indexStr;
678 }
679 }
680 }
681 } else {
682 const KMime::Content *const topLevel = node->topLevel();
683 //if the node is an extra node, prepend the index of the extra node to the url
684 QMapIterator<KMime::Message::Content *, QList<KMime::Content *> > it(mExtraContents);
685 while (it.hasNext()) {
686 it.next();
687 const QList<KMime::Content *> &extraNodes = extraContents(it.key());
688 for (int i = 0; i < extraNodes.size(); ++i) {
689 KMime::Content *const extraNode = extraNodes[i];
690 if (topLevel == extraNode) {
691 indexStr.prepend(QStringLiteral("e%1:").arg(i));
692 const QString parentIndex = persistentIndex(it.key());
693 if (!parentIndex.isEmpty()) {
694 indexStr = QStringLiteral("%1:%2").arg(parentIndex, indexStr);
695 }
696 return indexStr;
697 }
698 }
699 }
700 }
701
702 return indexStr;
703}
704
705KMime::Content *NodeHelper::contentFromIndex(KMime::Content *node, const QString &persistentIndex) const
706{
707 KMime::Content *c = node->topLevel();
708 if (c) {
709 const QStringList pathParts = persistentIndex.split(QLatin1Char(':'), QString::SkipEmptyParts);
710 const int pathPartsSize(pathParts.size());
711 for (int i = 0; i < pathPartsSize; ++i) {
712 const QString &path = pathParts[i];
713 if (path.startsWith(QLatin1Char('e'))) {
714 const QList<KMime::Content *> &extraParts = mExtraContents.value(c);
715 const int idx = path.midRef(1, -1).toInt();
716 c = (idx < extraParts.size()) ? extraParts[idx] : nullptr;
717 } else {
718 c = c->content(KMime::ContentIndex(path));
719 }
720 if (!c) {
721 break;
722 }
723 }
724 }
725 return c;
726}
727
728QString NodeHelper::asHREF(const KMime::Content *node, const QString &place) const
729{
730 return QStringLiteral("attachment:%1?place=%2").arg(persistentIndex(node), place);
731}
732
733KMime::Content *NodeHelper::fromHREF(const KMime::Message::Ptr &mMessage, const QUrl &url) const
734{
735 if (url.isEmpty()) {
736 return mMessage.data();
737 }
738
739 if (!url.isLocalFile()) {
740 return contentFromIndex(mMessage.data(), url.adjusted(QUrl::StripTrailingSlash).path());
741 } else {
742 const QString path = url.toLocalFile();
743 // extract from /<path>/qttestn28554.index.2.3:0:2/unnamed -> "2.3:0:2"
744 // start of the index is something that is not a number followed by a dot: \D.
745 // index is only made of numbers,"." and ":": ([0-9.:]+)
746 // index is the last part of the folder name: /
747 const QRegExp rIndex(QStringLiteral("\\D\\.([e0-9.:]+)/"));
748
749 //search the occurence at most at the end
750 if (rIndex.lastIndexIn(path) != -1) {
751 return contentFromIndex(mMessage.data(), rIndex.cap(1));
752 }
753 return mMessage.data();
754 }
755}
756
757QString NodeHelper::fixEncoding(const QString &encoding)
758{
759 QString returnEncoding = encoding;
760 // According to http://www.iana.org/assignments/character-sets, uppercase is
761 // preferred in MIME headers
762 const QString returnEncodingToUpper = returnEncoding.toUpper();
763 if (returnEncodingToUpper.contains(QStringLiteral("ISO "))) {
764 returnEncoding = returnEncodingToUpper;
765 returnEncoding.replace(QLatin1String("ISO "), QStringLiteral("ISO-"));
766 }
767 return returnEncoding;
768}
769
770//-----------------------------------------------------------------------------
771QString NodeHelper::encodingForName(const QString &descriptiveName)
772{
773 QString encoding = KCharsets::charsets()->encodingForName(descriptiveName);
774 return NodeHelper::fixEncoding(encoding);
775}
776
777QStringList NodeHelper::supportedEncodings(bool usAscii)
778{
779 QStringList encodingNames = KCharsets::charsets()->availableEncodingNames();
780 QStringList encodings;
781 QMap<QString, bool> mimeNames;
782 QStringList::ConstIterator constEnd(encodingNames.constEnd());
783 for (QStringList::ConstIterator it = encodingNames.constBegin();
784 it != constEnd; ++it) {
785 QTextCodec *codec = KCharsets::charsets()->codecForName(*it);
786 QString mimeName = (codec) ? QString::fromLatin1(codec->name()).toLower() : (*it);
787 if (!mimeNames.contains(mimeName)) {
788 encodings.append(KCharsets::charsets()->descriptionForEncoding(*it));
789 mimeNames.insert(mimeName, true);
790 }
791 }
792 encodings.sort();
793 if (usAscii) {
794 encodings.prepend(KCharsets::charsets()->descriptionForEncoding(QStringLiteral("us-ascii")));
795 }
796 return encodings;
797}
798
799QString NodeHelper::fromAsString(KMime::Content *node) const
800{
801 if (auto topLevel = dynamic_cast<KMime::Message *>(node->topLevel())) {
802 return topLevel->from()->asUnicodeString();
803 } else {
804 auto realNode = std::find_if(mExtraContents.cbegin(), mExtraContents.cend(),
805 [node](const QList<KMime::Content *> &nodes) {
806 return nodes.contains(node);
807 });
808 if (realNode != mExtraContents.cend()) {
809 return fromAsString(realNode.key());
810 }
811 }
812
813 return QString();
814}
815
816void NodeHelper::attachExtraContent(KMime::Content *topLevelNode, KMime::Content *content)
817{
818 qCDebug(MIMETREEPARSER_LOG) << "mExtraContents added for" << topLevelNode << " extra content: " << content;
819 mExtraContents[topLevelNode].append(content);
820}
821
822QList< KMime::Content * > NodeHelper::extraContents(KMime::Content *topLevelnode) const
823{
824 return mExtraContents.value(topLevelnode);
825}
826
827void NodeHelper::mergeExtraNodes(KMime::Content *node)
828{
829 if (!node) {
830 return;
831 }
832
833 const QList<KMime::Content * > extraNodes = extraContents(node);
834 for (KMime::Content *extra : extraNodes) {
835 if (node->bodyIsMessage()) {
836 qCWarning(MIMETREEPARSER_LOG) << "Asked to attach extra content to a kmime::message, this does not make sense. Attaching to:" << node <<
837 node->encodedContent() << "\n====== with =======\n" << extra << extra->encodedContent();
838 continue;
839 }
840 KMime::Content *c = new KMime::Content(node);
841 c->setContent(extra->encodedContent());
842 c->parse();
843 node->addContent(c);
844 }
845
846 Q_FOREACH (KMime::Content *child, node->contents()) {
847 mergeExtraNodes(child);
848 }
849}
850
851void NodeHelper::cleanFromExtraNodes(KMime::Content *node)
852{
853 if (!node) {
854 return;
855 }
856 const QList<KMime::Content * > extraNodes = extraContents(node);
857 for (KMime::Content *extra : extraNodes) {
858 QByteArray s = extra->encodedContent();
859 const auto children = node->contents();
860 for (KMime::Content *c : children) {
861 if (c->encodedContent() == s) {
862 node->removeContent(c);
863 }
864 }
865 }
866 Q_FOREACH (KMime::Content *child, node->contents()) {
867 cleanFromExtraNodes(child);
868 }
869}
870
871KMime::Message *NodeHelper::messageWithExtraContent(KMime::Content *topLevelNode)
872{
873 /*The merge is done in several steps:
874 1) merge the extra nodes into topLevelNode
875 2) copy the modified (merged) node tree into a new node tree
876 3) restore the original node tree in topLevelNode by removing the extra nodes from it
877
878 The reason is that extra nodes are assigned by pointer value to the nodes in the original tree.
879 */
880 if (!topLevelNode) {
881 return nullptr;
882 }
883
884 mergeExtraNodes(topLevelNode);
885
886 KMime::Message *m = new KMime::Message;
887 m->setContent(topLevelNode->encodedContent());
888 m->parse();
889
890 cleanFromExtraNodes(topLevelNode);
891// qCDebug(MIMETREEPARSER_LOG) << "MESSAGE WITH EXTRA: " << m->encodedContent();
892// qCDebug(MIMETREEPARSER_LOG) << "MESSAGE WITHOUT EXTRA: " << topLevelNode->encodedContent();
893
894 return m;
895}
896
897KMime::Content *NodeHelper::decryptedNodeForContent(KMime::Content *content) const
898{
899 const QList<KMime::Content *> xc = extraContents(content);
900 if (!xc.empty()) {
901 if (xc.size() == 1) {
902 return xc.front();
903 } else {
904 qCWarning(MIMETREEPARSER_LOG) << "WTF, encrypted node has multiple extra contents?";
905 }
906 }
907 return nullptr;
908}
909
910bool NodeHelper::unencryptedMessage_helper(KMime::Content *node, QByteArray &resultingData, bool addHeaders,
911 int recursionLevel)
912{
913 bool returnValue = false;
914 if (node) {
915 KMime::Content *curNode = node;
916 KMime::Content *decryptedNode = nullptr;
917 const QByteArray type = node->contentType(false) ? QByteArray(node->contentType()->mediaType()).toLower() : "text";
918 const QByteArray subType = node->contentType(false) ? node->contentType()->subType().toLower() : "plain";
919 const bool isMultipart = node->contentType(false) && node->contentType()->isMultipart();
920 bool isSignature = false;
921
922 qCDebug(MIMETREEPARSER_LOG) << "(" << recursionLevel << ") Looking at" << type << "/" << subType;
923
924 if (isMultipart) {
925 if (subType == "signed") {
926 isSignature = true;
927 } else if (subType == "encrypted") {
928 decryptedNode = decryptedNodeForContent(curNode);
929 }
930 } else if (type == "application") {
931 if (subType == "octet-stream") {
932 decryptedNode = decryptedNodeForContent(curNode);
933 } else if (subType == "pkcs7-signature") {
934 isSignature = true;
935 } else if (subType == "pkcs7-mime") {
936 // note: subtype pkcs7-mime can also be signed
937 // and we do NOT want to remove the signature!
938 if (encryptionState(curNode) != KMMsgNotEncrypted) {
939 decryptedNode = decryptedNodeForContent(curNode);
940 }
941 }
942 }
943
944 if (decryptedNode) {
945 qCDebug(MIMETREEPARSER_LOG) << "Current node has an associated decrypted node, adding a modified header "
946 "and then processing the children.";
947
948 Q_ASSERT(addHeaders);
949 KMime::Content headers;
950 headers.setHead(curNode->head());
951 headers.parse();
952 if (decryptedNode->contentType(false)) {
953 headers.contentType()->from7BitString(decryptedNode->contentType()->as7BitString(false));
954 } else {
955 headers.removeHeader<KMime::Headers::ContentType>();
956 }
957 if (decryptedNode->contentTransferEncoding(false)) {
958 headers.contentTransferEncoding()->from7BitString(decryptedNode->contentTransferEncoding()->as7BitString(false));
959 } else {
960 headers.removeHeader<KMime::Headers::ContentTransferEncoding>();
961 }
962 if (decryptedNode->contentDisposition(false)) {
963 headers.contentDisposition()->from7BitString(decryptedNode->contentDisposition()->as7BitString(false));
964 } else {
965 headers.removeHeader<KMime::Headers::ContentDisposition>();
966 }
967 if (decryptedNode->contentDescription(false)) {
968 headers.contentDescription()->from7BitString(decryptedNode->contentDescription()->as7BitString(false));
969 } else {
970 headers.removeHeader<KMime::Headers::ContentDescription>();
971 }
972 headers.assemble();
973
974 resultingData += headers.head() + '\n';
975 unencryptedMessage_helper(decryptedNode, resultingData, false, recursionLevel + 1);
976
977 returnValue = true;
978 }
979
980 else if (isSignature) {
981 qCDebug(MIMETREEPARSER_LOG) << "Current node is a signature, adding it as-is.";
982 // We can't change the nodes under the signature, as that would invalidate it. Add the signature
983 // and its child as-is
984 if (addHeaders) {
985 resultingData += curNode->head() + '\n';
986 }
987 resultingData += curNode->encodedBody();
988 returnValue = false;
989 }
990
991 else if (isMultipart) {
992 qCDebug(MIMETREEPARSER_LOG) << "Current node is a multipart node, adding its header and then processing all children.";
993 // Normal multipart node, add the header and all of its children
994 bool somethingChanged = false;
995 if (addHeaders) {
996 resultingData += curNode->head() + '\n';
997 }
998 const QByteArray boundary = curNode->contentType()->boundary();
999 foreach (KMime::Content *child, curNode->contents()) {
1000 resultingData += "\n--" + boundary + '\n';
1001 const bool changed = unencryptedMessage_helper(child, resultingData, true, recursionLevel + 1);
1002 if (changed) {
1003 somethingChanged = true;
1004 }
1005 }
1006 resultingData += "\n--" + boundary + "--\n\n";
1007 returnValue = somethingChanged;
1008 }
1009
1010 else if (curNode->bodyIsMessage()) {
1011 qCDebug(MIMETREEPARSER_LOG) << "Current node is a message, adding the header and then processing the child.";
1012 if (addHeaders) {
1013 resultingData += curNode->head() + '\n';
1014 }
1015
1016 returnValue = unencryptedMessage_helper(curNode->bodyAsMessage().data(), resultingData, true, recursionLevel + 1);
1017 }
1018
1019 else {
1020 qCDebug(MIMETREEPARSER_LOG) << "Current node is an ordinary leaf node, adding it as-is.";
1021 if (addHeaders) {
1022 resultingData += curNode->head() + '\n';
1023 }
1024 resultingData += curNode->body();
1025 returnValue = false;
1026 }
1027 }
1028
1029 qCDebug(MIMETREEPARSER_LOG) << "(" << recursionLevel << ") done.";
1030 return returnValue;
1031}
1032
1033KMime::Message::Ptr NodeHelper::unencryptedMessage(const KMime::Message::Ptr &originalMessage)
1034{
1035 QByteArray resultingData;
1036 const bool messageChanged = unencryptedMessage_helper(originalMessage.data(), resultingData, true);
1037 if (messageChanged) {
1038#if 0
1039 qCDebug(MIMETREEPARSER_LOG) << "Resulting data is:" << resultingData;
1040 QFile bla("stripped.mbox");
1041 bla.open(QIODevice::WriteOnly);
1042 bla.write(resultingData);
1043 bla.close();
1044#endif
1045 KMime::Message::Ptr newMessage(new KMime::Message);
1046 newMessage->setContent(resultingData);
1047 newMessage->parse();
1048 return newMessage;
1049 } else {
1050 return KMime::Message::Ptr();
1051 }
1052}
1053
1054QVector<KMime::Content *> NodeHelper::attachmentsOfExtraContents() const
1055{
1056 QVector<KMime::Content *> result;
1057 for (auto it = mExtraContents.begin(); it != mExtraContents.end(); ++it) {
1058 foreach (auto content, it.value()) {
1059 if (KMime::isAttachment(content)) {
1060 result.push_back(content);
1061 } else {
1062 result += content->attachments();
1063 }
1064 }
1065 }
1066 return result;
1067}
1068
1069}
diff --git a/framework/src/domain/mimetreeparser/otp/nodehelper.h b/framework/src/domain/mimetreeparser/otp/nodehelper.h
deleted file mode 100644
index 70253f21..00000000
--- a/framework/src/domain/mimetreeparser/otp/nodehelper.h
+++ /dev/null
@@ -1,290 +0,0 @@
1/*
2 Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_NODEHELPER_H__
21#define __MIMETREEPARSER_NODEHELPER_H__
22
23#include "partmetadata.h"
24#include "enums.h"
25
26#include <KMime/Message>
27
28#include <QList>
29#include <QMap>
30#include <QSet>
31
32class QUrl;
33class QTextCodec;
34
35namespace MimeTreeParser
36{
37class AttachmentTemporaryFilesDirs;
38namespace Interface
39{
40class BodyPartMemento;
41}
42}
43
44namespace MimeTreeParser
45{
46
47/**
48 * @author Andras Mantia <andras@kdab.net>
49 */
50class NodeHelper: public QObject
51{
52 Q_OBJECT
53public:
54 NodeHelper();
55
56 ~NodeHelper();
57
58 void setNodeProcessed(KMime::Content *node, bool recurse);
59 void setNodeUnprocessed(KMime::Content *node, bool recurse);
60 bool nodeProcessed(KMime::Content *node) const;
61 void clear();
62 void forceCleanTempFiles();
63
64 void setEncryptionState(const KMime::Content *node, const KMMsgEncryptionState state);
65 KMMsgEncryptionState encryptionState(const KMime::Content *node) const;
66
67 void setSignatureState(const KMime::Content *node, const KMMsgSignatureState state);
68 KMMsgSignatureState signatureState(const KMime::Content *node) const;
69
70 KMMsgSignatureState overallSignatureState(KMime::Content *node) const;
71 KMMsgEncryptionState overallEncryptionState(KMime::Content *node) const;
72
73 void setPartMetaData(KMime::Content *node, const PartMetaData &metaData);
74 PartMetaData partMetaData(KMime::Content *node);
75
76 /**
77 * Set the 'Content-Type' by mime-magic from the contents of the body.
78 * If autoDecode is true the decoded body will be used for mime type
79 * determination (this does not change the body itself).
80 */
81 void magicSetType(KMime::Content *node, bool autoDecode = true);
82
83 /**
84 * Return this mails subject, with all "forward" and "reply"
85 * prefixes removed
86 */
87 static QString cleanSubject(KMime::Message *message);
88
89 /** Attach an extra node to an existing node */
90 void attachExtraContent(KMime::Content *topLevelNode, KMime::Content *content);
91
92 /** Get the extra nodes attached to the @param topLevelNode and all sub-nodes of @param topLevelNode */
93 QList<KMime::Content *> extraContents(KMime::Content *topLevelNode) const;
94
95 /** Return a modified message (node tree) starting from @param topLevelNode that has the original nodes and the extra nodes.
96 The caller has the responsibility to delete the new message.
97 */
98 KMime::Message *messageWithExtraContent(KMime::Content *topLevelNode);
99
100 /** Get a QTextCodec suitable for this message part */
101 const QTextCodec *codec(KMime::Content *node);
102
103 /** Set the charset the user selected for the message to display */
104 void setOverrideCodec(KMime::Content *node, const QTextCodec *codec);
105
106 Interface::BodyPartMemento *bodyPartMemento(KMime::Content *node, const QByteArray &which) const;
107
108 void setBodyPartMemento(KMime::Content *node, const QByteArray &which,
109 Interface::BodyPartMemento *memento);
110
111 // A flag to remember if the node was embedded. This is useful for attachment nodes, the reader
112 // needs to know if they were displayed inline or not.
113 bool isNodeDisplayedEmbedded(KMime::Content *node) const;
114 void setNodeDisplayedEmbedded(KMime::Content *node, bool displayedEmbedded);
115
116 // Same as above, but this time determines if the node was hidden or not
117 bool isNodeDisplayedHidden(KMime::Content *node) const;
118 void setNodeDisplayedHidden(KMime::Content *node, bool displayedHidden);
119
120 /**
121 * Writes the given message part to a temporary file and returns the
122 * name of this file or QString() if writing failed.
123 */
124 QString writeNodeToTempFile(KMime::Content *node);
125
126 /**
127 * Returns the temporary file path and name where this node was saved, or an empty url
128 * if it wasn't saved yet with writeNodeToTempFile()
129 */
130 QUrl tempFileUrlFromNode(const KMime::Content *node);
131
132 /**
133 * Creates a temporary dir for saving attachments, etc.
134 * Will be automatically deleted when another message is viewed.
135 * @param param Optional part of the directory name.
136 */
137 QString createTempDir(const QString &param = QString());
138
139 /**
140 * Cleanup the attachment temp files
141 */
142 void removeTempFiles();
143
144 /**
145 * Add a file to the list of managed temporary files
146 */
147 void addTempFile(const QString &file);
148
149 // Get a href in the form attachment:<nodeId>?place=<place>, used by ObjectTreeParser and
150 // UrlHandlerManager.
151 QString asHREF(const KMime::Content *node, const QString &place) const;
152 KMime::Content *fromHREF(const KMime::Message::Ptr &mMessage, const QUrl &href) const;
153
154 /**
155 * @return true if this node is a child or an encapsulated message
156 */
157 static bool isInEncapsulatedMessage(KMime::Content *node);
158
159 /**
160 * Returns the charset for the given node. If no charset is specified
161 * for the node, the defaultCharset() is returned.
162 */
163 static QByteArray charset(KMime::Content *node);
164
165 /**
166 * Check for prefixes @p prefixRegExps in @p str. If none
167 * is found, @p newPrefix + ' ' is prepended to @p str and the
168 * resulting string is returned. If @p replace is true, any
169 * sequence of whitespace-delimited prefixes at the beginning of
170 * @p str is replaced by @p newPrefix.
171 */
172 static QString replacePrefixes(const QString &str,
173 const QStringList &prefixRegExps,
174 bool replace,
175 const QString &newPrefix);
176
177 /**
178 * Return a QTextCodec for the specified charset.
179 * This function is a bit more tolerant, than QTextCodec::codecForName
180 */
181 static const QTextCodec *codecForName(const QByteArray &_str);
182
183 /**
184 * Returns a usable filename for a node, that can be the filename from the
185 * content disposition header, or if that one is empty, the name from the
186 * content type header.
187 */
188 static QString fileName(const KMime::Content *node);
189
190 /**
191 * Fixes an encoding received by a KDE function and returns the proper,
192 * MIME-compilant encoding name instead.
193 * @see encodingForName
194 */
195 static QString fixEncoding(const QString &encoding); //TODO(Andras) move to a utility class?
196
197 /**
198 * Drop-in replacement for KCharsets::encodingForName(). The problem with
199 * the KCharsets function is that it returns "human-readable" encoding names
200 * like "ISO 8859-15" instead of valid encoding names like "ISO-8859-15".
201 * This function fixes this by replacing whitespace with a hyphen.
202 */
203 static QString encodingForName(const QString &descriptiveName); //TODO(Andras) move to a utility class?
204
205 /**
206 * Return a list of the supported encodings
207 * @param usAscii if true, US-Ascii encoding will be prepended to the list.
208 */
209 static QStringList supportedEncodings(bool usAscii); //TODO(Andras) move to a utility class?
210
211 QString fromAsString(KMime::Content *node) const;
212
213 KMime::Content *decryptedNodeForContent(KMime::Content *content) const;
214
215 /**
216 * This function returns the unencrypted message that is based on @p originalMessage.
217 * All encrypted MIME parts are removed and replaced by their decrypted plain-text versions.
218 * Encrypted parts that are within signed parts are not replaced, since that would invalidate
219 * the signature.
220 *
221 * This only works if the message was run through ObjectTreeParser::parseObjectTree() with the
222 * currrent NodeHelper before, because parseObjectTree() actually decrypts the message and stores
223 * the decrypted nodes by calling attachExtraContent().
224 *
225 * @return the unencrypted message or an invalid pointer if the original message didn't contain
226 * a part that needed to be modified.
227 */
228 KMime::Message::Ptr unencryptedMessage(const KMime::Message::Ptr &originalMessage);
229
230 /**
231 * Returns a list of attachments of attached extra content nodes.
232 * This is mainly useful is order to get attachments of encrypted messages.
233 * Note that this does not include attachments from the primary node tree.
234 * @see KMime::Content::attachments().
235 */
236 QVector<KMime::Content *> attachmentsOfExtraContents() const;
237
238Q_SIGNALS:
239 void update(MimeTreeParser::UpdateMode);
240
241private:
242 Q_DISABLE_COPY(NodeHelper)
243 bool unencryptedMessage_helper(KMime::Content *node, QByteArray &resultingData, bool addHeaders,
244 int recursionLevel = 1);
245
246 /** Check for prefixes @p prefixRegExps in #subject(). If none
247 is found, @p newPrefix + ' ' is prepended to the subject and the
248 resulting string is returned. If @p replace is true, any
249 sequence of whitespace-delimited prefixes at the beginning of
250 #subject() is replaced by @p newPrefix
251 **/
252 static QString cleanSubject(KMime::Message *message, const QStringList &prefixRegExps,
253 bool replace, const QString &newPrefix);
254
255 void mergeExtraNodes(KMime::Content *node);
256 void cleanFromExtraNodes(KMime::Content *node);
257
258 /** Creates a persistent index string that bridges the gap between the
259 permanent nodes and the temporary ones.
260
261 Used internally for robust indexing.
262 **/
263 QString persistentIndex(const KMime::Content *node) const;
264
265 /** Translates the persistentIndex into a node back
266
267 node: any node of the actually message to what the persistentIndex is interpreded
268 **/
269 KMime::Content *contentFromIndex(KMime::Content *node, const QString &persistentIndex) const;
270
271private:
272 QList<KMime::Content *> mProcessedNodes;
273 QList<KMime::Content *> mNodesUnderProcess;
274 QMap<const KMime::Content *, KMMsgEncryptionState> mEncryptionState;
275 QMap<const KMime::Content *, KMMsgSignatureState> mSignatureState;
276 QSet<KMime::Content *> mDisplayEmbeddedNodes;
277 QSet<KMime::Content *> mDisplayHiddenNodes;
278 QTextCodec *mLocalCodec;
279 QMap<KMime::Content *, const QTextCodec *> mOverrideCodecs;
280 QMap<QString, QMap<QByteArray, Interface::BodyPartMemento *> > mBodyPartMementoMap;
281 QMap<KMime::Content *, PartMetaData> mPartMetaDatas;
282 QMap<KMime::Message::Content *, QList<KMime::Content *> > mExtraContents;
283 AttachmentTemporaryFilesDirs *mAttachmentFilesDir;
284
285 friend class NodeHelperTest;
286};
287
288}
289
290#endif
diff --git a/framework/src/domain/mimetreeparser/otp/objecttreeparser.cpp b/framework/src/domain/mimetreeparser/otp/objecttreeparser.cpp
deleted file mode 100644
index b0d514b6..00000000
--- a/framework/src/domain/mimetreeparser/otp/objecttreeparser.cpp
+++ /dev/null
@@ -1,495 +0,0 @@
1/*
2 objecttreeparser.cpp
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6 Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
7 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
8 Copyright (c) 2015 Sandro Knauß <sknauss@kde.org>
9
10 KMail is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License, version 2, as
12 published by the Free Software Foundation.
13
14 KMail is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
23 In addition, as a special exception, the copyright holders give
24 permission to link the code of this program with any edition of
25 the Qt library by Trolltech AS, Norway (or with modified versions
26 of Qt that use the same license as Qt), and distribute linked
27 combinations including the two. You must obey the GNU General
28 Public License in all respects for all of the code used other than
29 Qt. If you modify this file, you may extend this exception to
30 your version of the file, but you are not obligated to do so. If
31 you do not wish to do so, delete this exception statement from
32 your version.
33*/
34
35// MessageViewer includes
36
37#include "objecttreeparser.h"
38
39#include "attachmentstrategy.h"
40#include "bodypartformatterbasefactory.h"
41#include "nodehelper.h"
42#include "messagepart.h"
43#include "partnodebodypart.h"
44
45#include "mimetreeparser_debug.h"
46
47#include "utils.h"
48#include "bodypartformatter.h"
49#include "htmlwriter.h"
50#include "messagepartrenderer.h"
51#include "util.h"
52
53#include <KMime/Headers>
54#include <KMime/Message>
55
56// KDE includes
57
58// Qt includes
59#include <QByteArray>
60#include <QTextCodec>
61#include <QUrl>
62
63using namespace MimeTreeParser;
64
65ObjectTreeParser::ObjectTreeParser(const ObjectTreeParser *topLevelParser,
66 bool showOnlyOneMimePart,
67 const AttachmentStrategy *strategy)
68 : mSource(topLevelParser->mSource),
69 mNodeHelper(topLevelParser->mNodeHelper),
70 mHtmlWriter(topLevelParser->mHtmlWriter),
71 mTopLevelContent(topLevelParser->mTopLevelContent),
72 mShowOnlyOneMimePart(showOnlyOneMimePart),
73 mHasPendingAsyncJobs(false),
74 mAllowAsync(topLevelParser->mAllowAsync),
75 mAttachmentStrategy(strategy)
76{
77 init();
78}
79
80ObjectTreeParser::ObjectTreeParser(Interface::ObjectTreeSource *source,
81 MimeTreeParser::NodeHelper *nodeHelper,
82 bool showOnlyOneMimePart,
83 const AttachmentStrategy *strategy)
84 : mSource(source),
85 mNodeHelper(nodeHelper),
86 mHtmlWriter(nullptr),
87 mTopLevelContent(nullptr),
88 mShowOnlyOneMimePart(showOnlyOneMimePart),
89 mHasPendingAsyncJobs(false),
90 mAllowAsync(false),
91 mAttachmentStrategy(strategy)
92{
93 init();
94}
95
96void ObjectTreeParser::init()
97{
98 Q_ASSERT(mSource);
99 if (!attachmentStrategy()) {
100 mAttachmentStrategy = mSource->attachmentStrategy();
101 }
102
103 if (!mNodeHelper) {
104 mNodeHelper = new NodeHelper();
105 mDeleteNodeHelper = true;
106 } else {
107 mDeleteNodeHelper = false;
108 }
109}
110
111ObjectTreeParser::ObjectTreeParser(const ObjectTreeParser &other)
112 : mSource(other.mSource),
113 mNodeHelper(other.nodeHelper()), //TODO(Andras) hm, review what happens if mDeleteNodeHelper was true in the source
114 mHtmlWriter(other.mHtmlWriter),
115 mTopLevelContent(other.mTopLevelContent),
116 mShowOnlyOneMimePart(other.showOnlyOneMimePart()),
117 mHasPendingAsyncJobs(other.hasPendingAsyncJobs()),
118 mAllowAsync(other.allowAsync()),
119 mAttachmentStrategy(other.attachmentStrategy()),
120 mDeleteNodeHelper(false)
121{
122
123}
124
125ObjectTreeParser::~ObjectTreeParser()
126{
127 if (mDeleteNodeHelper) {
128 delete mNodeHelper;
129 mNodeHelper = nullptr;
130 }
131}
132
133void ObjectTreeParser::setAllowAsync(bool allow)
134{
135 Q_ASSERT(!mHasPendingAsyncJobs);
136 mAllowAsync = allow;
137}
138
139bool ObjectTreeParser::allowAsync() const
140{
141 return mAllowAsync;
142}
143
144bool ObjectTreeParser::hasPendingAsyncJobs() const
145{
146 return mHasPendingAsyncJobs;
147}
148
149QString ObjectTreeParser::plainTextContent() const
150{
151 return mPlainTextContent;
152}
153
154QString ObjectTreeParser::htmlContent() const
155{
156 return mHtmlContent;
157}
158
159void ObjectTreeParser::copyContentFrom(const ObjectTreeParser *other)
160{
161 mPlainTextContent += other->plainTextContent();
162 mHtmlContent += other->htmlContent();
163 if (!other->plainTextContentCharset().isEmpty()) {
164 mPlainTextContentCharset = other->plainTextContentCharset();
165 }
166 if (!other->htmlContentCharset().isEmpty()) {
167 mHtmlContentCharset = other->htmlContentCharset();
168 }
169}
170
171//-----------------------------------------------------------------------------
172
173void ObjectTreeParser::parseObjectTree(KMime::Content *node)
174{
175 mTopLevelContent = node;
176 mParsedPart = parseObjectTreeInternal(node, showOnlyOneMimePart());
177
178 if (mParsedPart) {
179 mParsedPart->fix();
180 mParsedPart->copyContentFrom();
181 if (auto mp = toplevelTextNode(mParsedPart)) {
182 if (auto _mp = mp.dynamicCast<TextMessagePart>()) {
183 extractNodeInfos(_mp->mNode, true);
184 } else if (auto _mp = mp.dynamicCast<AlternativeMessagePart>()) {
185 if (_mp->mChildNodes.contains(Util::MultipartPlain)) {
186 extractNodeInfos(_mp->mChildNodes[Util::MultipartPlain], true);
187 }
188 }
189 setPlainTextContent(mp->text());
190 }
191
192 if (htmlWriter()) {
193 const auto renderer = mSource->messagePartTheme(mParsedPart);
194 if (renderer) {
195 mHtmlWriter->queue(renderer->html());
196 }
197 }
198 }
199}
200
201MessagePartPtr ObjectTreeParser::parsedPart() const
202{
203 return mParsedPart;
204}
205
206bool ObjectTreeParser::processType(KMime::Content *node, ProcessResult &processResult, const QByteArray &mediaType, const QByteArray &subType, Interface::MessagePartPtr &mpRet, bool onlyOneMimePart)
207{
208 bool bRendered = false;
209 const auto sub = mSource->bodyPartFormatterFactory()->subtypeRegistry(mediaType.constData());
210 auto range = sub.equal_range(subType.constData());
211 for (auto it = range.first; it != range.second; ++it) {
212 const auto formatter = (*it).second;
213 if (!formatter) {
214 continue;
215 }
216 PartNodeBodyPart part(this, &processResult, mTopLevelContent, node, mNodeHelper);
217 // Set the default display strategy for this body part relying on the
218 // identity of Interface::BodyPart::Display and AttachmentStrategy::Display
219 part.setDefaultDisplay((Interface::BodyPart::Display) attachmentStrategy()->defaultDisplay(node));
220
221 mNodeHelper->setNodeDisplayedEmbedded(node, true);
222
223 const Interface::MessagePart::Ptr result = formatter->process(part);
224 if (!result) {
225 continue;
226 }
227
228 if (const auto mp = result.dynamicCast<MessagePart>()) {
229 mp->setAttachmentFlag(node);
230 mpRet = result;
231 bRendered = true;
232 break;
233 } else if (dynamic_cast<MimeTreeParser::Interface::MessagePart *>(result.data())) {
234 QObject *asyncResultObserver = allowAsync() ? mSource->sourceObject() : nullptr;
235 const auto r = formatter->format(&part, result->htmlWriter(), asyncResultObserver);
236 if (r == Interface::BodyPartFormatter::AsIcon) {
237 processResult.setNeverDisplayInline(true);
238 formatter->adaptProcessResult(processResult);
239 mNodeHelper->setNodeDisplayedEmbedded(node, false);
240 const Interface::MessagePart::Ptr mp = defaultHandling(node, processResult, onlyOneMimePart);
241 if (mp) {
242 if (auto _mp = mp.dynamicCast<MessagePart>()) {
243 _mp->setAttachmentFlag(node);
244 }
245 mpRet = mp;
246 }
247 bRendered = true;
248 break;
249 } else if (r == Interface::BodyPartFormatter::Ok) {
250 processResult.setNeverDisplayInline(true);
251 formatter->adaptProcessResult(processResult);
252 mpRet = result;
253 bRendered = true;
254 break;
255 }
256 continue;
257 } else {
258 continue;
259 }
260 }
261 return bRendered;
262}
263
264MessagePart::Ptr ObjectTreeParser::parseObjectTreeInternal(KMime::Content *node, bool onlyOneMimePart)
265{
266 if (!node) {
267 return MessagePart::Ptr();
268 }
269
270 // reset pending async jobs state (we'll rediscover pending jobs as we go)
271 mHasPendingAsyncJobs = false;
272
273 // reset "processed" flags for...
274 if (onlyOneMimePart) {
275 // ... this node and all descendants
276 mNodeHelper->setNodeUnprocessed(node, false);
277 if (!node->contents().isEmpty()) {
278 mNodeHelper->setNodeUnprocessed(node, true);
279 }
280 } else if (!node->parent()) {
281 // ...this node and all it's siblings and descendants
282 mNodeHelper->setNodeUnprocessed(node, true);
283 }
284
285 const bool isRoot = node->isTopLevel();
286 auto parsedPart = MessagePart::Ptr(new MessagePartList(this));
287 parsedPart->setIsRoot(isRoot);
288 KMime::Content *parent = node->parent();
289 auto contents = parent ? parent->contents() : KMime::Content::List();
290 if (contents.isEmpty()) {
291 contents.append(node);
292 }
293 int i = contents.indexOf(const_cast<KMime::Content *>(node));
294 for (; i < contents.size(); ++i) {
295 node = contents.at(i);
296 if (mNodeHelper->nodeProcessed(node)) {
297 continue;
298 }
299
300 ProcessResult processResult(mNodeHelper);
301
302 QByteArray mediaType("text");
303 QByteArray subType("plain");
304 if (node->contentType(false) && !node->contentType()->mediaType().isEmpty() &&
305 !node->contentType()->subType().isEmpty()) {
306 mediaType = node->contentType()->mediaType();
307 subType = node->contentType()->subType();
308 }
309
310 Interface::MessagePartPtr mp;
311 if (processType(node, processResult, mediaType, subType, mp, onlyOneMimePart)) {
312 if (mp) {
313 parsedPart->appendSubPart(mp);
314 }
315 } else if (processType(node, processResult, mediaType, "*", mp, onlyOneMimePart)) {
316 if (mp) {
317 parsedPart->appendSubPart(mp);
318 }
319 } else {
320 qCWarning(MIMETREEPARSER_LOG) << "THIS SHOULD NO LONGER HAPPEN:" << mediaType << '/' << subType;
321 const auto mp = defaultHandling(node, processResult, onlyOneMimePart);
322 if (mp) {
323 if (auto _mp = mp.dynamicCast<MessagePart>()) {
324 _mp->setAttachmentFlag(node);
325 }
326 parsedPart->appendSubPart(mp);
327 }
328 }
329 mNodeHelper->setNodeProcessed(node, false);
330
331 // adjust signed/encrypted flags if inline PGP was found
332 processResult.adjustCryptoStatesOfNode(node);
333
334 if (onlyOneMimePart) {
335 break;
336 }
337 }
338
339 return parsedPart;
340}
341
342Interface::MessagePart::Ptr ObjectTreeParser::defaultHandling(KMime::Content *node, ProcessResult &result, bool onlyOneMimePart)
343{
344 Interface::MessagePart::Ptr mp;
345 ProcessResult processResult(mNodeHelper);
346
347 if (node->contentType()->mimeType() == QByteArrayLiteral("application/octet-stream") &&
348 (node->contentType()->name().endsWith(QLatin1String("p7m")) ||
349 node->contentType()->name().endsWith(QLatin1String("p7s")) ||
350 node->contentType()->name().endsWith(QLatin1String("p7c"))
351 ) &&
352 processType(node, processResult, "application", "pkcs7-mime", mp, onlyOneMimePart)) {
353 return mp;
354 }
355
356 const auto _mp = AttachmentMessagePart::Ptr(new AttachmentMessagePart(this, node, false, true, mSource->decryptMessage()));
357 result.setInlineSignatureState(_mp->signatureState());
358 result.setInlineEncryptionState(_mp->encryptionState());
359 _mp->setNeverDisplayInline(result.neverDisplayInline());
360 _mp->setIsImage(result.isImage());
361 mp = _mp;
362
363 // always show images in multipart/related when showing in html, not with an additional icon
364 auto preferredMode = mSource->preferredMode();
365 bool isHtmlPreferred = (preferredMode == Util::Html) || (preferredMode == Util::MultipartHtml);
366 if (result.isImage() && node->parent() &&
367 node->parent()->contentType()->subType() == "related" && isHtmlPreferred && !onlyOneMimePart) {
368 QString fileName = mNodeHelper->writeNodeToTempFile(node);
369 QString href = QUrl::fromLocalFile(fileName).url();
370 QByteArray cid = node->contentID()->identifier();
371 if (htmlWriter()) {
372 htmlWriter()->embedPart(cid, href);
373 }
374 nodeHelper()->setNodeDisplayedEmbedded(node, true);
375 mNodeHelper->setNodeDisplayedHidden(node, true);
376 return mp;
377 }
378
379 // Show it inline if showOnlyOneMimePart(), which means the user clicked the image
380 // in the message structure viewer manually, and therefore wants to see the full image
381 if (result.isImage() && onlyOneMimePart && !result.neverDisplayInline()) {
382 mNodeHelper->setNodeDisplayedEmbedded(node, true);
383 }
384
385 return mp;
386}
387
388KMMsgSignatureState ProcessResult::inlineSignatureState() const
389{
390 return mInlineSignatureState;
391}
392
393void ProcessResult::setInlineSignatureState(KMMsgSignatureState state)
394{
395 mInlineSignatureState = state;
396}
397
398KMMsgEncryptionState ProcessResult::inlineEncryptionState() const
399{
400 return mInlineEncryptionState;
401}
402
403void ProcessResult::setInlineEncryptionState(KMMsgEncryptionState state)
404{
405 mInlineEncryptionState = state;
406}
407
408bool ProcessResult::neverDisplayInline() const
409{
410 return mNeverDisplayInline;
411}
412
413void ProcessResult::setNeverDisplayInline(bool display)
414{
415 mNeverDisplayInline = display;
416}
417
418bool ProcessResult::isImage() const
419{
420 return mIsImage;
421}
422
423void ProcessResult::setIsImage(bool image)
424{
425 mIsImage = image;
426}
427
428void ProcessResult::adjustCryptoStatesOfNode(const KMime::Content *node) const
429{
430 if ((inlineSignatureState() != KMMsgNotSigned) ||
431 (inlineEncryptionState() != KMMsgNotEncrypted)) {
432 mNodeHelper->setSignatureState(node, inlineSignatureState());
433 mNodeHelper->setEncryptionState(node, inlineEncryptionState());
434 }
435}
436
437void ObjectTreeParser::extractNodeInfos(KMime::Content *curNode, bool isFirstTextPart)
438{
439 if (isFirstTextPart) {
440 mPlainTextContent += curNode->decodedText();
441 mPlainTextContentCharset += NodeHelper::charset(curNode);
442 }
443}
444
445void ObjectTreeParser::setPlainTextContent(const QString &plainTextContent)
446{
447 mPlainTextContent = plainTextContent;
448}
449
450const QTextCodec *ObjectTreeParser::codecFor(KMime::Content *node) const
451{
452 Q_ASSERT(node);
453 if (mSource->overrideCodec()) {
454 return mSource->overrideCodec();
455 }
456 return mNodeHelper->codec(node);
457}
458
459QByteArray ObjectTreeParser::plainTextContentCharset() const
460{
461 return mPlainTextContentCharset;
462}
463
464QByteArray ObjectTreeParser::htmlContentCharset() const
465{
466 return mHtmlContentCharset;
467}
468
469bool ObjectTreeParser::showOnlyOneMimePart() const
470{
471 return mShowOnlyOneMimePart;
472}
473
474void ObjectTreeParser::setShowOnlyOneMimePart(bool show)
475{
476 mShowOnlyOneMimePart = show;
477}
478
479const AttachmentStrategy *ObjectTreeParser::attachmentStrategy() const
480{
481 return mAttachmentStrategy;
482}
483
484HtmlWriter *ObjectTreeParser::htmlWriter() const
485{
486 if (mHtmlWriter) {
487 return mHtmlWriter;
488 }
489 return mSource->htmlWriter();
490}
491
492MimeTreeParser::NodeHelper *ObjectTreeParser::nodeHelper() const
493{
494 return mNodeHelper;
495}
diff --git a/framework/src/domain/mimetreeparser/otp/objecttreeparser.h b/framework/src/domain/mimetreeparser/otp/objecttreeparser.h
deleted file mode 100644
index 3f29a673..00000000
--- a/framework/src/domain/mimetreeparser/otp/objecttreeparser.h
+++ /dev/null
@@ -1,406 +0,0 @@
1/*
2 objecttreeparser.h
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6 Copyright (C) 2002-2003, 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
7 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
8
9 KMail is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License, version 2, as
11 published by the Free Software Foundation.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#ifndef __MIMETREEPARSER_OBJECTTREEPARSER_H__
35#define __MIMETREEPARSER_OBJECTTREEPARSER_H__
36
37#include "nodehelper.h"
38#include "objecttreesource.h"
39
40#include <gpgme++/verificationresult.h>
41
42class QString;
43
44namespace KMime
45{
46class Content;
47}
48
49namespace MimeTreeParser
50{
51
52namespace Interface
53{
54class MessagePart;
55typedef QSharedPointer<MessagePart> MessagePartPtr;
56}
57
58class PartMetaData;
59class ViewerPrivate;
60class HtmlWriter;
61class AttachmentStrategy;
62class NodeHelper;
63class MessagePart;
64class MimeMessagePart;
65
66typedef QSharedPointer<MessagePart> MessagePartPtr;
67typedef QSharedPointer<MimeMessagePart> MimeMessagePartPtr;
68
69class ProcessResult
70{
71public:
72 explicit ProcessResult(NodeHelper *nodeHelper, KMMsgSignatureState inlineSignatureState = KMMsgNotSigned,
73 KMMsgEncryptionState inlineEncryptionState = KMMsgNotEncrypted,
74 bool neverDisplayInline = false,
75 bool isImage = false)
76 : mInlineSignatureState(inlineSignatureState),
77 mInlineEncryptionState(inlineEncryptionState),
78 mNeverDisplayInline(neverDisplayInline),
79 mIsImage(isImage),
80 mNodeHelper(nodeHelper) {}
81
82 KMMsgSignatureState inlineSignatureState() const;
83 void setInlineSignatureState(KMMsgSignatureState state);
84
85 KMMsgEncryptionState inlineEncryptionState() const;
86 void setInlineEncryptionState(KMMsgEncryptionState state);
87
88 bool neverDisplayInline() const;
89 void setNeverDisplayInline(bool display);
90
91 bool isImage() const;
92 void setIsImage(bool image);
93
94 void adjustCryptoStatesOfNode(const KMime::Content *node) const;
95
96private:
97 KMMsgSignatureState mInlineSignatureState;
98 KMMsgEncryptionState mInlineEncryptionState;
99 bool mNeverDisplayInline : 1;
100 bool mIsImage : 1;
101 NodeHelper *mNodeHelper;
102};
103
104/**
105\brief Parses messages and generates HTML display code out of them
106
107\par Introduction
108
109First, have a look at the documentation in Mainpage.dox and at the documentation of ViewerPrivate
110to understand the broader picture.
111
112Just a note on the terminology: 'Node' refers to a MIME part here, which in KMime is a
113KMime::Content.
114
115\par Basics
116
117The ObjectTreeParser basically has two modes: Generating the HTML code for the Viewer, or only
118extracting the plainTextContent() for situations where only the message text is needed, for example
119when inline forwarding a message. The mode depends on the Interface::ObjectTreeSource passed to the
120constructor: If Interface::ObjectTreeSource::htmlWriter() is not 0, then the HTML code generation mode is
121used.
122
123Basically, all the ObjectTreeParser does is going through the tree of MIME parts and operating on
124those nodes. Operating here means creating the HTML code for the node or extracting the textual
125content from it. This process is started with parseObjectTree(), where we loop over the subnodes
126of the current root node. For each of those subnodes, we try to find a BodyPartFormatter that can
127handle the type of the node. This can either be an internal function, such as
128processMultiPartAlternativeSubtype() or processTextHtmlSubtype(), or it can be an external plugin.
129More on external plugins later. When no matching formatter is found, defaultHandling() is called
130for that node.
131
132\par Multipart Nodes
133
134Those nodes that are of type multipart have subnodes. If one of those children needs to be
135processed normally, the processMultipartXXX() functions call stdChildHandling() for the node that
136should be handled normally. stdChildHandling() creates its own ObjectTreeParser, which is a clone
137of the current ObjectTreeParser, and processes the node. stdChildHandling() is not called for all
138children of the multipart node, for example processMultiPartAlternativeSubtype() only calls it on
139one of the children, as the other one doesn't need to be displayed. Similary,
140processMultiPartSignedSubtype() doesn't call stdChildHandling() for the signature node, only for the
141signed node.
142
143\par Processed and Unprocessed Nodes
144
145When a BodyPartFormatter has finished processing a node, it is processed. Nodes are set to being
146not processed at the beginning of parseObjectTree(). The processed state of a node is saved in a
147list in NodeHelper, see NodeHelper::setNodeProcessed(), NodeHelper::nodeProcessed() and the other
148related helper functions.
149
150It is the responsibility of the BodyPartFormatter to correctly call setNodeProcessed() and the
151related functions. This is important so that processing the same node twice can be prevented. The
152check that prevents duplicate processing is in parseObjectTree().
153
154An example where duplicate processing would happen if we didn't check for it is in stdChildHandling(),
155which is for example called from processMultiPartAlternativeSubtype(). Let's say the setting is to
156prefer HTML over plain text. In this case, processMultiPartAlternativeSubtype() would call
157stdChildHandling() on the HTML node, which would create a new ObjectTreeParser and call
158parseObjectTree() on it. parseObjectTree() processes the node and all its siblings, and one of the
159siblings is the plain text node, which shouldn't be processed! Therefore
160processMultiPartAlternativeSubtype() sets the plain text node as been processed already.
161
162\par Plain Text Output
163
164Various nodes have plain text that should be displayed. This plain text is usually processed though
165writeBodyString() first. That method checks if the provided text is an inline PGP text and decrypts
166it if necessary. It also pushes the text through quotedHTML(), which does a number of things like
167coloring quoted lines or detecting links and creating real link tags for them.
168
169\par Modifying the Message
170
171The ObjectTreeParser does not only parse its message, in some circumstances it also modifies it
172before displaying. This is for example the case when displaying a decrypted message: The original
173message only contains a binary blob of crypto data, and processMultiPartEncryptedSubtype() decrypts
174that blob. After decryption, the current node is replaced with the decrypted node, which happens
175in insertAndParseNewChildNode().
176
177\par Crypto Operations
178
179For signature and decryption handling, there are functions which help with generating the HTML code
180for the signature header and footer. These are writeDeferredDecryptionBlock(), writeSigstatFooter()
181and writeSigstatHeader(). As the name writeDeferredDecryptionBlock() suggests, a setting can cause
182the message to not be decrypted unless the user clicks a link. Whether the message should be
183decrypted or not can be controlled by Interface::ObjectTreeSource::decryptMessage(). When the user clicks the
184decryption link, the URLHandler for 'kmail:' URLs sets that variable to true and triggers an update
185of the Viewer, which will cause parseObjectTree() to be called again.
186
187\par Async Crypto Operations
188
189The above case describes decryption the message in place. However, decryption and also verifying of
190the signature can take a long time, so synchronous decryption and verifing would cause the Viewer to
191block. Therefore it is possible to run these operations in async mode, see allowAsync().
192In the first run of the async mode, all the ObjectTreeParser does is starting the decrypt or the
193verify job, and informing the user that the operation is in progress with
194writeDecryptionInProgressBlock() or with writeSigstatHeader(). Then, it creates and associates a
195BodyPartMemento with the current node, for example a VerifyDetachedBodyPartMemento. Each node can
196have multiple mementos associated with it, which are differeniated by name.
197
198NodeHelper::setBodyPartMemento() and NodeHelper::bodyPartMemento() provide means to store and
199retrieve these mementos. A memento is basically a thin wrapper around the crypto job, it stores the
200job pointer, the job input data and the job result. Mementos can be used for any async situation,
201not just for crypto jobs, but I'll describe crypto jobs here.
202
203So in the first run of decrypting or verifying a message, the BodyPartFormatter only starts the
204crypto job, creates the BodyPartMemento and writes the HTML code that tells the user that the
205operation is in progress. parseObjectTree() thus finishes without waiting for anything, and the
206message is displayed.
207
208At some point, the crypto jobs then finish, which will cause slotResult() of the BodyPartMemento
209to be called. slotResult() then saves the result to some member variable and calls
210BodyPartMemento::notify(), which in the end will trigger an update of the Viewer. That update
211will, in ViewerPrivate::parseMsg(), create a new ObjectTreeParser and call parseObjectTree() on it.
212This is where the second run begins.
213
214The functions that deal with decrypting of verifying, like processMultiPartSignedSubtype() or
215processMultiPartEncryptedSubtype() will look if they find a BodyPartMemento that is associated with
216the current node. Now it finds that memento, since it was created in the first run. It checks if the
217memento's job has finished, and if so, the result can be written out (either the decrypted data or
218the verified signature).
219
220When dealing with encrypted nodes, new nodes are created with the decrypted data. It is important to
221note that the original MIME tree is never modified, and remains the same as the original one. The method
222createAndParseTempNode is called with the newly decrypted data, and it generates a new temporary node to
223store the decrypted data. When these nodes are created, it is important to keep track of them as otherwise
224some mementos that are added to the newly created temporary nodes will be constantly regenerated. As the
225regeneration triggers a viewer update when complete, it results in an infinite refresh loop. The function
226NodeHelper::linkAsPermanentDecrypted will create a link between the newly created node and the original parent.
227Conversely, the function NodeHelper::attachExtraContent will create a link in the other direction, from the parent
228node to the newly created temporary node.
229
230When generating some mementos for nodes that may be temporary nodes (for example, contact photo mementos), the
231function NodeHelper::setBodyPartMementoForPermanentParent is used. This will save the given body part memento for
232the closest found permanent parent node, rather than the transient node itself. Then when checking for the existence
233of a certain memento in a node, NodeHelper::findPermanentParentBodyPartMemento will check to see if any parent of the
234given temporary node is a permanent (encrypted) node that has been used to generate the asked-for node.
235
236To conclude: For async operations, parseObjectTree() is called twice: The first call starts the
237crypto operation and creates the BodyPartMemento, the second calls sees that the BodyPartMemento is
238there and can use its result for writing out the HTML.
239
240\par PartMetaData and ProcessResult
241
242For crypto operations, the class PartMetaData is used a lot, mainly to pass around info about the
243crypto state of a node. A PartMetaData can also be associated with a node by using
244NodeHelper::setPartMetaData(). The only user of that however is MessageAnalyzer::processPart() of
245the Nepomuk E-Mail Feeder, which also uses the ObjectTreeParser to analyze the message.
246
247You'll notice that a ProcessResult is passed to each formatter. The formatter is supposed to modify
248the ProcessResult to tell the callers something about the state of the nodes that were processed.
249One example for its use is to tell the caller about the crypto state of the node.
250
251\par BodyPartFormatter Plugins
252
253As mentioned way earlier, BodyPartFormatter can either be plugins or be internal. bodypartformatter.cpp
254contains some trickery so that the processXXX() methods of the ObjectTreeParser are called from
255a BodyPartFormatter associated with them, see the CREATE_BODY_PART_FORMATTER macro.
256
257The BodyPartFormatter code is work in progress, it was supposed to be refactored, but that has not
258yet happened at the time of writing. Therefore the code can seem a bit chaotic.
259
260External plugins are loaded with loadPlugins() in bodypartformatterfactory.cpp. External plugins
261can only use the classes in the interfaces/ directory, they include BodyPart, BodyPartMemento,
262BodyPartFormatterPlugin, BodyPartFormatter, BodyPartURLHandler, HtmlWriter and URLHandler. Therefore
263external plugins have powerful capabilities, which are needed for example in the iCal formatter or
264in the vCard formatter.
265
266\par Special HTML tags
267
268As also mentioned in the documentation of ViewerPrivate, the ObjectTreeParser writes out special
269links that are only understood by the viewer, for example 'kmail:' URLs or 'attachment:' URLs.
270Also, some special HTML tags are created, which the Viewer later uses for post-processing. For
271example a div with the id 'attachmentInjectionPoint', or a div with the id 'attachmentDiv', which
272is used to mark an attachment in the body with a yellow border when the user clicks the attachment
273in the header. Finally, parseObjectTree() creates an anchor with the id 'att%1', which is used in
274the Viewer to scroll to the attachment.
275*/
276class ObjectTreeParser
277{
278 /**
279 * @internal
280 * Copies the context of @p other, but not it's rawDecryptedBody, plainTextContent or htmlContent.
281 */
282 ObjectTreeParser(const ObjectTreeParser &other);
283
284public:
285 explicit ObjectTreeParser(Interface::ObjectTreeSource *source,
286 NodeHelper *nodeHelper = nullptr,
287 bool showOneMimePart = false,
288 const AttachmentStrategy *attachmentStrategy = nullptr);
289
290 explicit ObjectTreeParser(const ObjectTreeParser *topLevelParser,
291 bool showOneMimePart = false,
292 const AttachmentStrategy *attachmentStrategy = nullptr);
293 virtual ~ObjectTreeParser();
294
295 void setAllowAsync(bool allow);
296 bool allowAsync() const;
297
298 bool hasPendingAsyncJobs() const;
299
300 /**
301 * The text of the message, ie. what would appear in the
302 * composer's text editor if this was edited or replied to.
303 * This is usually the content of the first text/plain MIME part.
304 */
305 QString plainTextContent() const;
306
307 /**
308 * Similar to plainTextContent(), but returns the HTML source of the first text/html MIME part.
309 *
310 * Not to be consfused with the HTML code that the message viewer widget displays, that HTML
311 * is written out by htmlWriter() and a totally different pair of shoes.
312 */
313 QString htmlContent() const;
314
315 /**
316 * The original charset of MIME part the plain text was extracted from.
317 *
318 * If there were more than one text/plain MIME parts in the mail, the this is the charset
319 * of the last MIME part processed.
320 */
321 QByteArray plainTextContentCharset() const;
322 QByteArray htmlContentCharset() const;
323
324 bool showOnlyOneMimePart() const;
325 void setShowOnlyOneMimePart(bool show);
326
327 const AttachmentStrategy *attachmentStrategy() const;
328
329 HtmlWriter *htmlWriter() const;
330
331 NodeHelper *nodeHelper() const;
332
333 /** Parse beginning at a given node and recursively parsing
334 the children of that node and it's next sibling. */
335 void parseObjectTree(KMime::Content *node);
336 MessagePartPtr parsedPart() const;
337
338private:
339 void extractNodeInfos(KMime::Content *curNode, bool isFirstTextPart);
340 void setPlainTextContent(const QString &plainTextContent);
341
342 /**
343 * Does the actual work for parseObjectTree. Unlike parseObjectTree(), this does not change the
344 * top-level content.
345 */
346 MessagePartPtr parseObjectTreeInternal(KMime::Content *node, bool mOnlyOneMimePart);
347 bool processType(KMime::Content *node, MimeTreeParser::ProcessResult &processResult, const QByteArray &mediaType, const QByteArray &subType, Interface::MessagePartPtr &mpRet, bool onlyOneMimePart);
348
349 Interface::MessagePartPtr defaultHandling(KMime::Content *node, MimeTreeParser::ProcessResult &result, bool onlyOneMimePart);
350
351private:
352
353 /** ctor helper */
354 void init();
355
356 const QTextCodec *codecFor(KMime::Content *node) const;
357
358 void copyContentFrom(const ObjectTreeParser *other);
359
360private:
361 Interface::ObjectTreeSource *mSource;
362 NodeHelper *mNodeHelper;
363 HtmlWriter *mHtmlWriter;
364 QByteArray mPlainTextContentCharset;
365 QByteArray mHtmlContentCharset;
366 QString mPlainTextContent;
367 QString mHtmlContent;
368 KMime::Content *mTopLevelContent;
369 MessagePartPtr mParsedPart;
370
371 /// Show only one mime part means that the user has selected some node in the message structure
372 /// viewer that is not the root, which means the user wants to only see the selected node and its
373 /// children. If that is the case, this variable is set to true.
374 /// The code needs to behave differently if this is set. For example, it should not process the
375 /// siblings. Also, consider inline images: Normally, those nodes are completely hidden, as the
376 /// HTML node embedds them. However, when showing only the node of the image, one has to show them,
377 /// as their is no HTML node in which they are displayed. There are many more cases where this
378 /// variable needs to be obeyed.
379 /// This variable is set to false again when processing the children in stdChildHandling(), as
380 /// the children can be completely displayed again.
381 bool mShowOnlyOneMimePart;
382
383 bool mHasPendingAsyncJobs;
384 bool mAllowAsync;
385 const AttachmentStrategy *mAttachmentStrategy;
386 // DataUrl Icons cache
387 QString mCollapseIcon;
388 QString mExpandIcon;
389 bool mDeleteNodeHelper;
390
391 friend class PartNodeBodyPart;
392 friend class MessagePart;
393 friend class EncryptedMessagePart;
394 friend class SignedMessagePart;
395 friend class EncapsulatedRfc822MessagePart;
396 friend class TextMessagePart;
397 friend class HtmlMessagePart;
398 friend class TextPlainBodyPartFormatter;
399 friend class MultiPartSignedBodyPartFormatter;
400 friend class ApplicationPkcs7MimeBodyPartFormatter;
401};
402
403}
404
405#endif // __MIMETREEPARSER_OBJECTTREEPARSER_H__
406
diff --git a/framework/src/domain/mimetreeparser/otp/objecttreesource.cpp b/framework/src/domain/mimetreeparser/otp/objecttreesource.cpp
deleted file mode 100644
index 45f96c58..00000000
--- a/framework/src/domain/mimetreeparser/otp/objecttreesource.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19
20#include "objecttreesource.h"
21#include "bodypartformatter.h"
22#include "messagepart.h"
23
24using namespace MimeTreeParser;
25
26Interface::ObjectTreeSource::~ObjectTreeSource()
27{
28}
diff --git a/framework/src/domain/mimetreeparser/otp/objecttreesource.h b/framework/src/domain/mimetreeparser/otp/objecttreesource.h
deleted file mode 100644
index afada4c4..00000000
--- a/framework/src/domain/mimetreeparser/otp/objecttreesource.h
+++ /dev/null
@@ -1,109 +0,0 @@
1/*
2 Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_OBJECTTREESOURCE_IF_H__
21#define __MIMETREEPARSER_OBJECTTREESOURCE_IF_H__
22
23#include "util.h"
24
25#include <KMime/Message>
26
27#include <QSharedPointer>
28class QTextCodec;
29
30namespace MimeTreeParser
31{
32class HtmlWriter;
33class AttachmentStrategy;
34class BodyPartFormatterBaseFactory;
35namespace Interface
36{
37class MessagePart;
38typedef QSharedPointer<MessagePart> MessagePartPtr;
39class MessagePartRenderer;
40typedef QSharedPointer<MessagePartRenderer> MessagePartRendererPtr;
41}
42}
43
44namespace MimeTreeParser
45{
46namespace Interface
47{
48
49/**
50 * Interface for object tree sources.
51 * @author Andras Mantia <amantia@kdab.net>
52 */
53class ObjectTreeSource
54{
55
56public:
57 virtual ~ObjectTreeSource();
58
59 /**
60 * Sets the type of mail that is currently displayed. Applications can display this
61 * information to the user, for example KMail displays a HTML status bar.
62 * Note: This is not called when the mode is "Normal".
63 */
64 virtual void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes) = 0;
65
66 /** Return the mode that is the preferred to display */
67 virtual MimeTreeParser::Util::HtmlMode preferredMode() const = 0;
68
69 /** Return true if an encrypted mail should be decrypted */
70 virtual bool decryptMessage() const = 0;
71
72 /** Return true if external sources should be loaded in a html mail */
73 virtual bool htmlLoadExternal() const = 0;
74
75 /** Return true to include the signature details in the generated html */
76 virtual bool showSignatureDetails() const = 0;
77
78 virtual int levelQuote() const = 0;
79
80 /** The override codec that should be used for the mail */
81 virtual const QTextCodec *overrideCodec() = 0;
82
83 virtual QString createMessageHeader(KMime::Message *message) = 0;
84
85 /** Return the wanted attachment startegy */
86 virtual const AttachmentStrategy *attachmentStrategy() = 0;
87
88 /** Return the html write object */
89 virtual HtmlWriter *htmlWriter() = 0;
90
91 /** The source object behind the interface. */
92 virtual QObject *sourceObject() = 0;
93
94 /** should keys be imported automatically **/
95 virtual bool autoImportKeys() const = 0;
96
97 virtual bool showEmoticons() const = 0;
98
99 virtual bool showExpandQuotesMark() const = 0;
100
101 virtual const BodyPartFormatterBaseFactory *bodyPartFormatterFactory() = 0;
102
103 virtual MessagePartRendererPtr messagePartTheme(MessagePartPtr msgPart) = 0;
104
105 virtual bool isPrinting() const = 0;
106};
107}
108}
109#endif
diff --git a/framework/src/domain/mimetreeparser/otp/partmetadata.h b/framework/src/domain/mimetreeparser/otp/partmetadata.h
deleted file mode 100644
index 41399837..00000000
--- a/framework/src/domain/mimetreeparser/otp/partmetadata.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/* -*- c++ -*-
2 partmetadata.h
3
4 KMail, the KDE mail client.
5 Copyright (c) 2002-2003 Karl-Heinz Zimmer <khz@kde.org>
6 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License,
10 version 2.0, as published by the Free Software Foundation.
11 You should have received a copy of the GNU General Public License
12 along with this program; if not, write to the Free Software Foundation,
13 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
14*/
15
16#ifndef __MIMETREEPARSER_PARTMETADATA_H__
17#define __MIMETREEPARSER_PARTMETADATA_H__
18
19#include <gpgme++/verificationresult.h>
20#include <gpgme++/context.h>
21
22#include <QStringList>
23#include <QDateTime>
24
25namespace MimeTreeParser
26{
27
28class PartMetaData
29{
30public:
31 PartMetaData()
32 : sigSummary(GpgME::Signature::None),
33 isSigned(false),
34 isGoodSignature(false),
35 isEncrypted(false),
36 isDecryptable(false),
37 inProgress(false),
38 technicalProblem(false),
39 isEncapsulatedRfc822Message(false)
40 {
41 }
42 GpgME::Signature::Summary sigSummary;
43 QString signClass;
44 QString signer;
45 QStringList signerMailAddresses;
46 QByteArray keyId;
47 GpgME::Signature::Validity keyTrust;
48 QString status; // to be used for unknown plug-ins
49 int status_code; // to be used for i18n of OpenPGP and S/MIME CryptPlugs
50 QString errorText;
51 QDateTime creationTime;
52 QString decryptionError;
53 QString auditLog;
54 GpgME::Error auditLogError;
55 bool isSigned : 1;
56 bool isGoodSignature : 1;
57 bool isEncrypted : 1;
58 bool isDecryptable : 1;
59 bool inProgress : 1;
60 bool technicalProblem : 1;
61 bool isEncapsulatedRfc822Message : 1;
62};
63
64}
65
66#endif // __MIMETREEPARSER_PARTMETADATA_H__
67
diff --git a/framework/src/domain/mimetreeparser/otp/partnodebodypart.cpp b/framework/src/domain/mimetreeparser/otp/partnodebodypart.cpp
deleted file mode 100644
index ec509787..00000000
--- a/framework/src/domain/mimetreeparser/otp/partnodebodypart.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
1/*
2 partnodebodypart.cpp
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
6 Ingo Kloecker <kloecker@kde.org>
7
8 KMail is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#include "partnodebodypart.h"
35#include "nodehelper.h"
36#include "objecttreeparser.h"
37#include "mimetreeparser_debug.h"
38#include <KMime/Content>
39
40#include <QTextCodec>
41#include <QUrl>
42
43using namespace MimeTreeParser;
44
45static int serial = 0;
46
47PartNodeBodyPart::PartNodeBodyPart(ObjectTreeParser *otp, ProcessResult *result, KMime::Content *topLevelContent, KMime::Content *content,
48 NodeHelper *nodeHelper)
49 : Interface::BodyPart(), mTopLevelContent(topLevelContent), mContent(content),
50 mDefaultDisplay(Interface::BodyPart::None), mNodeHelper(nodeHelper)
51 , mObjectTreeParser(otp)
52 , mProcessResult(result)
53{}
54
55QString PartNodeBodyPart::makeLink(const QString &path) const
56{
57 // FIXME: use a PRNG for the first arg, instead of a serial number
58 return QStringLiteral("x-kmail:/bodypart/%1/%2/%3")
59 .arg(serial++).arg(mContent->index().toString())
60 .arg(QString::fromLatin1(QUrl::toPercentEncoding(path, "/")));
61}
62
63QString PartNodeBodyPart::asText() const
64{
65 if (!mContent->contentType()->isText()) {
66 return QString();
67 }
68 return mContent->decodedText();
69}
70
71QByteArray PartNodeBodyPart::asBinary() const
72{
73 return mContent->decodedContent();
74}
75
76QString PartNodeBodyPart::contentTypeParameter(const char *param) const
77{
78 return mContent->contentType()->parameter(QString::fromLatin1(param));
79}
80
81QString PartNodeBodyPart::contentDescription() const
82{
83 return mContent->contentDescription()->asUnicodeString();
84}
85
86QString PartNodeBodyPart::contentDispositionParameter(const char *param) const
87{
88 return mContent->contentDisposition()->parameter(QString::fromLatin1(param));
89}
90
91bool PartNodeBodyPart::hasCompleteBody() const
92{
93 qCWarning(MIMETREEPARSER_LOG) << "Sorry, not yet implemented.";
94 return true;
95}
96
97Interface::BodyPartMemento *PartNodeBodyPart::memento() const
98{
99 /*TODO(Andras) Volker suggests to use a ContentIndex->Mememnto mapping
100 Also review if the reader's bodyPartMemento should be returned or the NodeHelper's one
101 */
102 return mNodeHelper->bodyPartMemento(mContent, "__plugin__");
103}
104
105void PartNodeBodyPart::setBodyPartMemento(Interface::BodyPartMemento *memento)
106{
107 /*TODO(Andras) Volker suggests to use a ContentIndex->Memento mapping
108 Also review if the reader's bodyPartMemento should be set or the NodeHelper's one */
109 mNodeHelper->setBodyPartMemento(mContent, "__plugin__", memento);
110}
111
112Interface::BodyPart::Display PartNodeBodyPart::defaultDisplay() const
113{
114 return mDefaultDisplay;
115}
116
117void PartNodeBodyPart::setDefaultDisplay(Interface::BodyPart::Display d)
118{
119 mDefaultDisplay = d;
120}
121
122Interface::ObjectTreeSource *PartNodeBodyPart::source() const
123{
124 return mObjectTreeParser->mSource;
125}
diff --git a/framework/src/domain/mimetreeparser/otp/partnodebodypart.h b/framework/src/domain/mimetreeparser/otp/partnodebodypart.h
deleted file mode 100644
index ded0ee2c..00000000
--- a/framework/src/domain/mimetreeparser/otp/partnodebodypart.h
+++ /dev/null
@@ -1,108 +0,0 @@
1/*
2 partnodebodypart.h
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
6 Ingo Kloecker <kloecker@kde.org>
7
8 KMail is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the Qt library by Trolltech AS, Norway (or with modified versions
25 of Qt that use the same license as Qt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 Qt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#ifndef __MIMETREEPARSER_PARTNODEBODYPART_H__
35#define __MIMETREEPARSER_PARTNODEBODYPART_H__
36
37#include "bodypart.h"
38
39namespace KMime
40{
41class Content;
42}
43
44namespace MimeTreeParser
45{
46class NodeHelper;
47}
48
49namespace MimeTreeParser
50{
51
52/**
53 @short an implementation of the BodyPart interface using KMime::Content's
54*/
55class PartNodeBodyPart : public Interface::BodyPart
56{
57public:
58 explicit PartNodeBodyPart(ObjectTreeParser *otp, ProcessResult *result, KMime::Content *topLevelContent, KMime::Content *content,
59 NodeHelper *nodeHelper);
60
61 QString makeLink(const QString &path) const Q_DECL_OVERRIDE;
62 QString asText() const Q_DECL_OVERRIDE;
63 QByteArray asBinary() const Q_DECL_OVERRIDE;
64 QString contentTypeParameter(const char *param) const Q_DECL_OVERRIDE;
65 QString contentDescription() const Q_DECL_OVERRIDE;
66 QString contentDispositionParameter(const char *param) const Q_DECL_OVERRIDE;
67 bool hasCompleteBody() const Q_DECL_OVERRIDE;
68
69 Interface::BodyPartMemento *memento() const Q_DECL_OVERRIDE;
70 void setBodyPartMemento(Interface::BodyPartMemento *memento) Q_DECL_OVERRIDE;
71 BodyPart::Display defaultDisplay() const Q_DECL_OVERRIDE;
72 void setDefaultDisplay(BodyPart::Display);
73 KMime::Content *content() const Q_DECL_OVERRIDE
74 {
75 return mContent;
76 }
77 KMime::Content *topLevelContent() const Q_DECL_OVERRIDE
78 {
79 return mTopLevelContent;
80 }
81 NodeHelper *nodeHelper() const Q_DECL_OVERRIDE
82 {
83 return mNodeHelper;
84 }
85
86 ObjectTreeParser *objectTreeParser() const Q_DECL_OVERRIDE
87 {
88 return mObjectTreeParser;
89 }
90
91 ProcessResult *processResult() const Q_DECL_OVERRIDE
92 {
93 return mProcessResult;
94 }
95
96 Interface::ObjectTreeSource *source() const Q_DECL_OVERRIDE;
97private:
98 KMime::Content *mTopLevelContent;
99 KMime::Content *mContent;
100 BodyPart::Display mDefaultDisplay;
101 NodeHelper *mNodeHelper;
102 ObjectTreeParser *mObjectTreeParser;
103 ProcessResult *mProcessResult;
104};
105
106}
107
108#endif // __MIMETREEPARSER_PARTNODEBODYPART_H__
diff --git a/framework/src/domain/mimetreeparser/otp/qgpgmejobexecutor.cpp b/framework/src/domain/mimetreeparser/otp/qgpgmejobexecutor.cpp
deleted file mode 100644
index 1f453342..00000000
--- a/framework/src/domain/mimetreeparser/otp/qgpgmejobexecutor.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
1/*
2 Copyright (c) 2008 Volker Krause <vkrause@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#include "qgpgmejobexecutor.h"
20#include "mimetreeparser_debug.h"
21
22#include <QGpgME/DecryptVerifyJob>
23#include <QGpgME/ImportJob>
24#include <QGpgME/VerifyDetachedJob>
25#include <QGpgME/VerifyOpaqueJob>
26
27#include <QEventLoop>
28
29#include <cassert>
30
31using namespace GpgME;
32using namespace MimeTreeParser;
33
34QGpgMEJobExecutor::QGpgMEJobExecutor(QObject *parent) : QObject(parent)
35{
36 setObjectName(QStringLiteral("KleoJobExecutor"));
37 mEventLoop = new QEventLoop(this);
38}
39
40GpgME::VerificationResult QGpgMEJobExecutor::exec(
41 QGpgME::VerifyDetachedJob *job,
42 const QByteArray &signature,
43 const QByteArray &signedData)
44{
45 qCDebug(MIMETREEPARSER_LOG) << "Starting detached verification job";
46 connect(job, SIGNAL(result(GpgME::VerificationResult)), SLOT(verificationResult(GpgME::VerificationResult)));
47 GpgME::Error err = job->start(signature, signedData);
48 if (err) {
49 return VerificationResult(err);
50 }
51 mEventLoop->exec(QEventLoop::ExcludeUserInputEvents);
52 return mVerificationResult;
53}
54
55GpgME::VerificationResult QGpgMEJobExecutor::exec(
56 QGpgME::VerifyOpaqueJob *job,
57 const QByteArray &signedData,
58 QByteArray &plainText)
59{
60 qCDebug(MIMETREEPARSER_LOG) << "Starting opaque verification job";
61 connect(job, SIGNAL(result(GpgME::VerificationResult,QByteArray)), SLOT(verificationResult(GpgME::VerificationResult,QByteArray)));
62 GpgME::Error err = job->start(signedData);
63 if (err) {
64 plainText.clear();
65 return VerificationResult(err);
66 }
67 mEventLoop->exec(QEventLoop::ExcludeUserInputEvents);
68 plainText = mData;
69 return mVerificationResult;
70}
71
72std::pair< GpgME::DecryptionResult, GpgME::VerificationResult > QGpgMEJobExecutor::exec(
73 QGpgME::DecryptVerifyJob *job,
74 const QByteArray &cipherText,
75 QByteArray &plainText)
76{
77 qCDebug(MIMETREEPARSER_LOG) << "Starting decryption job";
78 connect(job, &QGpgME::DecryptVerifyJob::result, this, &QGpgMEJobExecutor::decryptResult);
79 GpgME::Error err = job->start(cipherText);
80 if (err) {
81 plainText.clear();
82 return std::make_pair(DecryptionResult(err), VerificationResult(err));
83 }
84 mEventLoop->exec(QEventLoop::ExcludeUserInputEvents);
85 plainText = mData;
86 return std::make_pair(mDecryptResult, mVerificationResult);
87}
88
89GpgME::ImportResult QGpgMEJobExecutor::exec(QGpgME::ImportJob *job, const QByteArray &certData)
90{
91 connect(job, SIGNAL(result(GpgME::ImportResult)), SLOT(importResult(GpgME::ImportResult)));
92 GpgME::Error err = job->start(certData);
93 if (err) {
94 return ImportResult(err);
95 }
96 mEventLoop->exec(QEventLoop::ExcludeUserInputEvents);
97 return mImportResult;
98}
99
100Error QGpgMEJobExecutor::auditLogError() const
101{
102 return mAuditLogError;
103}
104
105void QGpgMEJobExecutor::verificationResult(const GpgME::VerificationResult &result)
106{
107 qCDebug(MIMETREEPARSER_LOG) << "Detached verification job finished";
108 QGpgME::Job *job = qobject_cast<QGpgME::Job *>(sender());
109 assert(job);
110 mVerificationResult = result;
111 mAuditLogError = job->auditLogError();
112 mAuditLog = job->auditLogAsHtml();
113 mEventLoop->quit();
114}
115
116void QGpgMEJobExecutor::verificationResult(const GpgME::VerificationResult &result, const QByteArray &plainText)
117{
118 qCDebug(MIMETREEPARSER_LOG) << "Opaque verification job finished";
119 QGpgME::Job *job = qobject_cast<QGpgME::Job *>(sender());
120 assert(job);
121 mVerificationResult = result;
122 mData = plainText;
123 mAuditLogError = job->auditLogError();
124 mAuditLog = job->auditLogAsHtml();
125 mEventLoop->quit();
126}
127
128void QGpgMEJobExecutor::decryptResult(
129 const GpgME::DecryptionResult &decryptionresult,
130 const GpgME::VerificationResult &verificationresult,
131 const QByteArray &plainText)
132{
133 qCDebug(MIMETREEPARSER_LOG) << "Decryption job finished";
134 QGpgME::Job *job = qobject_cast<QGpgME::Job *>(sender());
135 assert(job);
136 mVerificationResult = verificationresult;
137 mDecryptResult = decryptionresult;
138 mData = plainText;
139 mAuditLogError = job->auditLogError();
140 mAuditLog = job->auditLogAsHtml();
141 mEventLoop->quit();
142}
143
144void QGpgMEJobExecutor::importResult(const GpgME::ImportResult &result)
145{
146 QGpgME::Job *job = qobject_cast<QGpgME::Job *>(sender());
147 assert(job);
148 mImportResult = result;
149 mAuditLogError = job->auditLogError();
150 mAuditLog = job->auditLogAsHtml();
151 mEventLoop->quit();
152}
153
154QString QGpgMEJobExecutor::auditLogAsHtml() const
155{
156 return mAuditLog;
157}
158
diff --git a/framework/src/domain/mimetreeparser/otp/qgpgmejobexecutor.h b/framework/src/domain/mimetreeparser/otp/qgpgmejobexecutor.h
deleted file mode 100644
index 8a81b078..00000000
--- a/framework/src/domain/mimetreeparser/otp/qgpgmejobexecutor.h
+++ /dev/null
@@ -1,86 +0,0 @@
1/*
2 Copyright (c) 2008 Volker Krause <vkrause@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#ifndef __MIMETREEPARSER_KLEOJOBEXECUTOR_H__
20#define __MIMETREEPARSER_KLEOJOBEXECUTOR_H__
21
22#include <gpgme++/decryptionresult.h>
23#include <gpgme++/importresult.h>
24#include <gpgme++/verificationresult.h>
25
26#include <QObject>
27
28#include <utility>
29
30class QEventLoop;
31
32namespace QGpgME
33{
34class DecryptVerifyJob;
35class ImportJob;
36class VerifyDetachedJob;
37class VerifyOpaqueJob;
38}
39
40namespace MimeTreeParser
41{
42
43/**
44 Helper class for synchronous execution of Kleo crypto jobs.
45*/
46class QGpgMEJobExecutor : public QObject
47{
48 Q_OBJECT
49public:
50 explicit QGpgMEJobExecutor(QObject *parent = nullptr);
51
52 GpgME::VerificationResult exec(QGpgME::VerifyDetachedJob *job,
53 const QByteArray &signature,
54 const QByteArray &signedData);
55 GpgME::VerificationResult exec(QGpgME::VerifyOpaqueJob *job,
56 const QByteArray &signedData,
57 QByteArray &plainText);
58 std::pair<GpgME::DecryptionResult, GpgME::VerificationResult> exec(QGpgME::DecryptVerifyJob *job,
59 const QByteArray &cipherText,
60 QByteArray &plainText);
61 GpgME::ImportResult exec(QGpgME::ImportJob *job, const QByteArray &certData);
62
63 GpgME::Error auditLogError() const;
64 QString auditLogAsHtml() const;
65
66private Q_SLOTS:
67 void verificationResult(const GpgME::VerificationResult &result);
68 void verificationResult(const GpgME::VerificationResult &result, const QByteArray &plainText);
69 void decryptResult(const GpgME::DecryptionResult &decryptionresult,
70 const GpgME::VerificationResult &verificationresult,
71 const QByteArray &plainText);
72 void importResult(const GpgME::ImportResult &result);
73
74private:
75 QEventLoop *mEventLoop;
76 GpgME::VerificationResult mVerificationResult;
77 GpgME::DecryptionResult mDecryptResult;
78 GpgME::ImportResult mImportResult;
79 QByteArray mData;
80 GpgME::Error mAuditLogError;
81 QString mAuditLog;
82};
83
84}
85
86#endif
diff --git a/framework/src/domain/mimetreeparser/otp/queuehtmlwriter.cpp b/framework/src/domain/mimetreeparser/otp/queuehtmlwriter.cpp
deleted file mode 100644
index ea17bf5c..00000000
--- a/framework/src/domain/mimetreeparser/otp/queuehtmlwriter.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
1/*
2 Copyright (c) 2015 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "queuehtmlwriter.h"
21
22#include "mimetreeparser_debug.h"
23
24#include<QByteArray>
25#include<QString>
26
27using namespace MimeTreeParser;
28
29QueueHtmlWriter::QueueHtmlWriter(HtmlWriter *base)
30 : HtmlWriter()
31 , mBase(base)
32{
33}
34
35QueueHtmlWriter::~QueueHtmlWriter()
36{
37}
38
39void QueueHtmlWriter::setBase(HtmlWriter *base)
40{
41 mBase = base;
42}
43
44void QueueHtmlWriter::begin(const QString &css)
45{
46 Command cmd;
47 cmd.type = Command::Begin;
48 cmd.s = css;
49 mQueue.append(cmd);
50}
51
52void QueueHtmlWriter::end()
53{
54 Command cmd;
55 cmd.type = Command::End;
56 mQueue.append(cmd);
57}
58
59void QueueHtmlWriter::reset()
60{
61 Command cmd;
62 cmd.type = Command::Reset;
63 mQueue.append(cmd);
64}
65
66void QueueHtmlWriter::write(const QString &str)
67{
68 Command cmd;
69 cmd.type = Command::Write;
70 cmd.s = str;
71 mQueue.append(cmd);
72}
73
74void QueueHtmlWriter::queue(const QString &str)
75{
76 Command cmd;
77 cmd.type = Command::Queue;
78 cmd.s = str;
79 mQueue.append(cmd);
80}
81
82void QueueHtmlWriter::flush()
83{
84 Command cmd;
85 cmd.type = Command::Flush;
86 mQueue.append(cmd);
87}
88
89void QueueHtmlWriter::replay()
90{
91 foreach (const auto &entry, mQueue) {
92 switch (entry.type) {
93 case Command::Begin:
94 mBase->begin(entry.s);
95 break;
96 case Command::End:
97 mBase->end();
98 break;
99 case Command::Reset:
100 mBase->reset();
101 break;
102 case Command::Write:
103 mBase->write(entry.s);
104 break;
105 case Command::Queue:
106 mBase->queue(entry.s);
107 break;
108 case Command::Flush:
109 mBase->flush();
110 break;
111 case Command::EmbedPart:
112 mBase->embedPart(entry.b, entry.s);
113 break;
114 case Command::ExtraHead:
115 mBase->extraHead(entry.s);
116 break;
117 }
118 }
119}
120
121void QueueHtmlWriter::embedPart(const QByteArray &contentId, const QString &url)
122{
123 Command cmd;
124 cmd.type = Command::EmbedPart;
125 cmd.s = url;
126 cmd.b = contentId;
127 mQueue.append(cmd);
128}
129void QueueHtmlWriter::extraHead(const QString &extra)
130{
131 Command cmd;
132 cmd.type = Command::ExtraHead;
133 cmd.s = extra;
134 mQueue.append(cmd);
135}
136
diff --git a/framework/src/domain/mimetreeparser/otp/queuehtmlwriter.h b/framework/src/domain/mimetreeparser/otp/queuehtmlwriter.h
deleted file mode 100644
index 9e7a4659..00000000
--- a/framework/src/domain/mimetreeparser/otp/queuehtmlwriter.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 Copyright (c) 2015 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_QUEUEHTMLWRITER_H__
21#define __MIMETREEPARSER_QUEUEHTMLWRITER_H__
22
23#include "htmlwriter.h"
24
25#include<QVector>
26#include<QVariant>
27
28class QString;
29class QByteArray;
30
31namespace MimeTreeParser
32{
33/**
34\brief Cache HTML output and not write them directy.
35
36This class is needed to make it possible to first process the mime tree and
37afterwards render the HTML.
38
39Please do not use this class - it is only added to make it possible to slowly
40move ObjectTreeParser to a process fist / render later.
41
42*/
43struct Command {
44 enum { Begin, End, Reset, Write, Queue, Flush, EmbedPart, ExtraHead } type;
45 QString s;
46 QByteArray b;
47};
48
49class QueueHtmlWriter : public HtmlWriter
50{
51public:
52 explicit QueueHtmlWriter(MimeTreeParser::HtmlWriter *base);
53 virtual ~QueueHtmlWriter();
54
55 void setBase(HtmlWriter *base);
56
57 void begin(const QString &cssDefs) Q_DECL_OVERRIDE;
58 void end() Q_DECL_OVERRIDE;
59 void reset() Q_DECL_OVERRIDE;
60 void write(const QString &str) Q_DECL_OVERRIDE;
61 void queue(const QString &str) Q_DECL_OVERRIDE;
62 void flush() Q_DECL_OVERRIDE;
63 void embedPart(const QByteArray &contentId, const QString &url) Q_DECL_OVERRIDE;
64 void extraHead(const QString &str) Q_DECL_OVERRIDE;
65
66 void replay();
67
68private:
69 HtmlWriter *mBase;
70 QVector<Command> mQueue;
71};
72
73} // namespace MimeTreeParser
74
75#endif // __MIMETREEPARSER_QUEUEHTMLWRITER_H__
diff --git a/framework/src/domain/mimetreeparser/otp/texthtml.cpp b/framework/src/domain/mimetreeparser/otp/texthtml.cpp
deleted file mode 100644
index 51332cff..00000000
--- a/framework/src/domain/mimetreeparser/otp/texthtml.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "texthtml.h"
21
22#include "attachmentstrategy.h"
23#include "objecttreeparser.h"
24#include "messagepart.h"
25
26#include <KMime/Content>
27
28#include "mimetreeparser_debug.h"
29
30using namespace MimeTreeParser;
31
32const TextHtmlBodyPartFormatter *TextHtmlBodyPartFormatter::self;
33
34const Interface::BodyPartFormatter *TextHtmlBodyPartFormatter::create()
35{
36 if (!self) {
37 self = new TextHtmlBodyPartFormatter();
38 }
39 return self;
40}
41Interface::BodyPartFormatter::Result TextHtmlBodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
42{
43 Q_UNUSED(writer)
44 const auto p = process(*part);
45 const auto mp = static_cast<MessagePart *>(p.data());
46 if (mp) {
47 mp->html(false);
48 return Ok;
49 }
50 return Failed;
51}
52
53Interface::MessagePart::Ptr TextHtmlBodyPartFormatter::process(Interface::BodyPart &part) const
54{
55 KMime::Content *node = part.content();
56 HtmlMessagePart::Ptr mp(new HtmlMessagePart(part.objectTreeParser(), node, part.source()));
57 return mp;
58}
diff --git a/framework/src/domain/mimetreeparser/otp/texthtml.h b/framework/src/domain/mimetreeparser/otp/texthtml.h
deleted file mode 100644
index a03cfe50..00000000
--- a/framework/src/domain/mimetreeparser/otp/texthtml.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_TEXTHTML_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_TEXTHTML_H__
22
23#include "bodypartformatter.h"
24#include "bodypart.h"
25
26namespace MimeTreeParser
27{
28
29class TextHtmlBodyPartFormatter : public Interface::BodyPartFormatter
30{
31 static const TextHtmlBodyPartFormatter *self;
32public:
33 Interface::MessagePart::Ptr process(Interface::BodyPart &part) const Q_DECL_OVERRIDE;
34 Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
35 using Interface::BodyPartFormatter::format;
36 static const Interface::BodyPartFormatter *create();
37};
38
39}
40
41#endif
diff --git a/framework/src/domain/mimetreeparser/otp/textplain.cpp b/framework/src/domain/mimetreeparser/otp/textplain.cpp
deleted file mode 100644
index d3437f04..00000000
--- a/framework/src/domain/mimetreeparser/otp/textplain.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "textplain.h"
21
22#include "attachmentstrategy.h"
23#include "objecttreeparser.h"
24#include "messagepart.h"
25
26#include <KMime/Content>
27
28#include "mimetreeparser_debug.h"
29
30using namespace MimeTreeParser;
31
32const TextPlainBodyPartFormatter *TextPlainBodyPartFormatter::self;
33
34const Interface::BodyPartFormatter *TextPlainBodyPartFormatter::create()
35{
36 if (!self) {
37 self = new TextPlainBodyPartFormatter();
38 }
39 return self;
40}
41Interface::BodyPartFormatter::Result TextPlainBodyPartFormatter::format(Interface::BodyPart *part, HtmlWriter *writer) const
42{
43 Q_UNUSED(writer)
44 const auto p = process(*part);
45 const auto mp = static_cast<MessagePart *>(p.data());
46 if (mp) {
47 mp->html(false);
48 return Ok;
49 }
50 return Failed;
51}
52
53Interface::MessagePart::Ptr TextPlainBodyPartFormatter::process(Interface::BodyPart &part) const
54{
55 KMime::Content *node = part.content();
56 const bool isFirstTextPart = (node->topLevel()->textContent() == node);
57
58 QString label = NodeHelper::fileName(node);
59
60 const bool bDrawFrame = !isFirstTextPart
61 && !part.objectTreeParser()->showOnlyOneMimePart()
62 && !label.isEmpty();
63 const QString fileName = part.nodeHelper()->writeNodeToTempFile(node);
64
65 TextMessagePart::Ptr mp;
66 if (isFirstTextPart) {
67 mp = TextMessagePart::Ptr(new TextMessagePart(part.objectTreeParser(), node, bDrawFrame, fileName.isEmpty(), part.source()->decryptMessage()));
68 } else {
69 mp = TextMessagePart::Ptr(new AttachmentMessagePart(part.objectTreeParser(), node, bDrawFrame, fileName.isEmpty(), part.source()->decryptMessage()));
70 }
71
72 part.processResult()->setInlineSignatureState(mp->signatureState());
73 part.processResult()->setInlineEncryptionState(mp->encryptionState());
74
75 part.nodeHelper()->setNodeDisplayedEmbedded(node, true);
76
77 return mp;
78}
diff --git a/framework/src/domain/mimetreeparser/otp/textplain.h b/framework/src/domain/mimetreeparser/otp/textplain.h
deleted file mode 100644
index c97a6aec..00000000
--- a/framework/src/domain/mimetreeparser/otp/textplain.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_TEXTPLAIN_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_TEXTPLAIN_H__
22
23#include "bodypartformatter.h"
24#include "bodypart.h"
25
26namespace MimeTreeParser
27{
28
29class TextPlainBodyPartFormatter : public Interface::BodyPartFormatter
30{
31 static const TextPlainBodyPartFormatter *self;
32public:
33 Interface::MessagePart::Ptr process(Interface::BodyPart &part) const Q_DECL_OVERRIDE;
34 Interface::BodyPartFormatter::Result format(Interface::BodyPart *, HtmlWriter *) const Q_DECL_OVERRIDE;
35 using Interface::BodyPartFormatter::format;
36 static const Interface::BodyPartFormatter *create();
37};
38
39}
40
41#endif
diff --git a/framework/src/domain/mimetreeparser/otp/util.cpp b/framework/src/domain/mimetreeparser/otp/util.cpp
deleted file mode 100644
index 5ca8d828..00000000
--- a/framework/src/domain/mimetreeparser/otp/util.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#include "util.h"
20
21#include "mimetreeparser_debug.h"
22
23#include "nodehelper.h"
24
25#include <KMime/Content>
26
27#include <QMimeDatabase>
28#include <QString>
29
30using namespace MimeTreeParser::Util;
31
32bool MimeTreeParser::Util::isTypeBlacklisted(KMime::Content *node)
33{
34 const QByteArray mediaTypeLower = node->contentType()->mediaType().toLower();
35 bool typeBlacklisted = mediaTypeLower == "multipart";
36 if (!typeBlacklisted) {
37 typeBlacklisted = KMime::isCryptoPart(node);
38 }
39 typeBlacklisted = typeBlacklisted || node == node->topLevel();
40 const bool firstTextChildOfEncapsulatedMsg =
41 mediaTypeLower == "text" &&
42 node->contentType()->subType().toLower() == "plain" &&
43 node->parent() && node->parent()->contentType()->mediaType().toLower() == "message";
44 return typeBlacklisted || firstTextChildOfEncapsulatedMsg;
45}
46
47QString MimeTreeParser::Util::labelForContent(KMime::Content *node)
48{
49 const QString name = node->contentType()->name();
50 QString label = name.isEmpty() ? NodeHelper::fileName(node) : name;
51 if (label.isEmpty()) {
52 label = node->contentDescription()->asUnicodeString();
53 }
54 return label;
55}
56
57QMimeType MimeTreeParser::Util::mimetype(const QString &name)
58{
59 QMimeDatabase db;
60 // consider the filename if mimetype cannot be found by content-type
61 const auto mimeTypes = db.mimeTypesForFileName(name);
62 for (const auto &mt : mimeTypes) {
63 if (mt.name() != QLatin1String("application/octet-stream")) {
64 return mt;
65 }
66 }
67
68 // consider the attachment's contents if neither the Content-Type header
69 // nor the filename give us a clue
70 return db.mimeTypeForFile(name);
71}
72
73QString MimeTreeParser::Util::iconNameForMimetype(const QString &mimeType,
74 const QString &fallbackFileName1,
75 const QString &fallbackFileName2)
76{
77 QString fileName;
78 QString tMimeType = mimeType;
79
80 // convert non-registered types to registered types
81 if (mimeType == QLatin1String("application/x-vnd.kolab.contact")) {
82 tMimeType = QStringLiteral("text/x-vcard");
83 } else if (mimeType == QLatin1String("application/x-vnd.kolab.event")) {
84 tMimeType = QStringLiteral("application/x-vnd.akonadi.calendar.event");
85 } else if (mimeType == QLatin1String("application/x-vnd.kolab.task")) {
86 tMimeType = QStringLiteral("application/x-vnd.akonadi.calendar.todo");
87 } else if (mimeType == QLatin1String("application/x-vnd.kolab.journal")) {
88 tMimeType = QStringLiteral("application/x-vnd.akonadi.calendar.journal");
89 } else if (mimeType == QLatin1String("application/x-vnd.kolab.note")) {
90 tMimeType = QStringLiteral("application/x-vnd.akonadi.note");
91 } else if (mimeType == QLatin1String("image/jpg")) {
92 tMimeType = QStringLiteral("image/jpeg");
93 }
94 QMimeDatabase mimeDb;
95 auto mime = mimeDb.mimeTypeForName(tMimeType);
96 if (mime.isValid()) {
97 fileName = mime.iconName();
98 } else {
99 fileName = QStringLiteral("unknown");
100 if (!tMimeType.isEmpty()) {
101 qCWarning(MIMETREEPARSER_LOG) << "unknown mimetype" << tMimeType;
102 }
103 }
104 //WorkAround for #199083
105 if (fileName == QLatin1String("text-vcard")) {
106 fileName = QStringLiteral("text-x-vcard");
107 }
108
109 if (fileName.isEmpty()) {
110 fileName = fallbackFileName1;
111 if (fileName.isEmpty()) {
112 fileName = fallbackFileName2;
113 }
114 if (!fileName.isEmpty()) {
115 fileName = mimeDb.mimeTypeForFile(QLatin1String("/tmp/") + fileName).iconName();
116 }
117 }
118
119 return fileName;
120}
121
122QString MimeTreeParser::Util::iconNameForContent(KMime::Content *node)
123{
124 if (!node) {
125 return QString();
126 }
127
128 QByteArray mimeType = node->contentType()->mimeType();
129 if (mimeType.isNull() || mimeType == "application/octet-stream") {
130 const QString mime = mimetype(node->contentDisposition()->filename()).name();
131 mimeType = mime.toLatin1();
132 }
133 mimeType = mimeType.toLower();
134 return iconNameForMimetype(QLatin1String(mimeType), node->contentDisposition()->filename(),
135 node->contentType()->name());
136}
diff --git a/framework/src/domain/mimetreeparser/otp/util.h b/framework/src/domain/mimetreeparser/otp/util.h
deleted file mode 100644
index 099c647a..00000000
--- a/framework/src/domain/mimetreeparser/otp/util.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#ifndef __MIMETREEPARSER_UTILS_UTIL_H__
20#define __MIMETREEPARSER_UTILS_UTIL_H__
21
22#include <QString>
23
24class QMimeType;
25
26namespace KMime
27{
28class Content;
29}
30
31namespace MimeTreeParser
32{
33
34/**
35 * The Util namespace contains a collection of helper functions use in
36 * various places.
37 */
38namespace Util
39{
40
41/**
42 * Describes the type of the displayed message. This depends on the MIME structure
43 * of the mail and on whether HTML mode is enabled (which is decided by htmlMail())
44 */
45enum HtmlMode {
46 Normal, ///< A normal plaintext message, non-multipart
47 Html, ///< A HTML message, non-multipart
48 MultipartPlain, ///< A multipart/alternative message, the plain text part is currently displayed
49 MultipartHtml, ///< A multipart/altervative message, the HTML part is currently displayed
50 MultipartIcal ///< A multipart/altervative message, the ICal part is currently displayed
51};
52
53bool isTypeBlacklisted(KMime::Content *node);
54
55QString labelForContent(KMime::Content *node);
56
57QMimeType mimetype(const QString &name);
58
59QString iconNameForMimetype(const QString &mimeType,
60 const QString &fallbackFileName1 = QString(),
61 const QString &fallbackFileName2 = QString());
62
63QString iconNameForContent(KMime::Content *node);
64}
65}
66
67#endif
diff --git a/framework/src/domain/mimetreeparser/otp/utils.cpp b/framework/src/domain/mimetreeparser/otp/utils.cpp
deleted file mode 100644
index 8f718143..00000000
--- a/framework/src/domain/mimetreeparser/otp/utils.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "utils.h"
21
22using namespace MimeTreeParser;
23
24MimeMessagePart::Ptr MimeTreeParser::createAndParseTempNode(Interface::BodyPart &part, KMime::Content *parentNode, const char *content, const char *cntDesc)
25{
26 KMime::Content *newNode = new KMime::Content();
27 newNode->setContent(KMime::CRLFtoLF(content));
28 newNode->parse();
29
30 if (!newNode->head().isEmpty()) {
31 newNode->contentDescription()->from7BitString(cntDesc);
32 }
33 part.nodeHelper()->attachExtraContent(parentNode, newNode);
34
35 return MimeMessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), newNode, false));
36}
37
38KMime::Content *MimeTreeParser::findTypeInDirectChilds(KMime::Content *content, const QByteArray &mimeType)
39{
40 if (mimeType.isEmpty()) {
41 return content;
42 }
43
44 foreach (auto child, content->contents()) {
45 if ((!child->contentType()->isEmpty())
46 && (mimeType == child->contentType()->mimeType())) {
47 return child;
48 }
49 }
50 return nullptr;
51}
52
53MessagePart::Ptr MimeTreeParser::toplevelTextNode(MessagePart::Ptr messageTree)
54{
55 foreach (const auto &mp, messageTree->subParts()) {
56 auto text = mp.dynamicCast<TextMessagePart>();
57 auto attach = mp.dynamicCast<AttachmentMessagePart>();
58 if (text && !attach) {
59 return text;
60 } else if (const auto alternative = mp.dynamicCast<AlternativeMessagePart>()) {
61 return alternative;
62 } else if (const auto m = mp.dynamicCast<MessagePart>()) {
63 auto ret = toplevelTextNode(m);
64 if (ret) {
65 return ret;
66 }
67 }
68 }
69 return MessagePart::Ptr();
70}
diff --git a/framework/src/domain/mimetreeparser/otp/utils.h b/framework/src/domain/mimetreeparser/otp/utils.h
deleted file mode 100644
index d4aaa43a..00000000
--- a/framework/src/domain/mimetreeparser/otp/utils.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_BODYFORAMATTER_UTILS_H__
21#define __MIMETREEPARSER_BODYFORAMATTER_UTILS_H__
22
23#include "bodypart.h"
24#include "messagepart.h"
25
26#include <KMime/Content>
27
28namespace MimeTreeParser
29{
30/**
31 1. Create a new partNode using 'content' data and Content-Description
32 found in 'cntDesc'.
33 2. Parse the 'node' to display the content.
34*/
35MimeMessagePart::Ptr createAndParseTempNode(Interface::BodyPart &part, KMime::Content *parentNode, const char *content, const char *cntDesc);
36
37KMime::Content *findTypeInDirectChilds(KMime::Content *content, const QByteArray &mimeType);
38
39MessagePart::Ptr toplevelTextNode(MessagePart::Ptr messageTree);
40}
41
42#endif
diff --git a/framework/src/domain/mimetreeparser/otp/verifydetachedbodypartmemento.cpp b/framework/src/domain/mimetreeparser/otp/verifydetachedbodypartmemento.cpp
deleted file mode 100644
index 56c1d1a7..00000000
--- a/framework/src/domain/mimetreeparser/otp/verifydetachedbodypartmemento.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
1/*
2 Copyright (c) 2014-2017 Montel Laurent <montel@kde.org>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#include "verifydetachedbodypartmemento.h"
19#include "mimetreeparser_debug.h"
20
21#include <QGpgME/VerifyDetachedJob>
22#include <QGpgME/KeyListJob>
23
24#include <gpgme++/keylistresult.h>
25
26#include <qstringlist.h>
27
28#include <cassert>
29
30using namespace QGpgME;
31using namespace GpgME;
32using namespace MimeTreeParser;
33
34VerifyDetachedBodyPartMemento::VerifyDetachedBodyPartMemento(VerifyDetachedJob *job,
35 KeyListJob *klj,
36 const QByteArray &signature,
37 const QByteArray &plainText)
38 : CryptoBodyPartMemento(),
39 m_signature(signature),
40 m_plainText(plainText),
41 m_job(job),
42 m_keylistjob(klj)
43{
44 assert(m_job);
45}
46
47VerifyDetachedBodyPartMemento::~VerifyDetachedBodyPartMemento()
48{
49 if (m_job) {
50 m_job->slotCancel();
51 }
52 if (m_keylistjob) {
53 m_keylistjob->slotCancel();
54 }
55}
56
57bool VerifyDetachedBodyPartMemento::start()
58{
59 assert(m_job);
60#ifdef DEBUG_SIGNATURE
61 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyDetachedBodyPartMemento started";
62#endif
63 connect(m_job, SIGNAL(result(GpgME::VerificationResult)),
64 this, SLOT(slotResult(GpgME::VerificationResult)));
65 if (const Error err = m_job->start(m_signature, m_plainText)) {
66 m_vr = VerificationResult(err);
67#ifdef DEBUG_SIGNATURE
68 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyDetachedBodyPartMemento stopped with error";
69#endif
70 return false;
71 }
72 setRunning(true);
73 return true;
74}
75
76void VerifyDetachedBodyPartMemento::exec()
77{
78 assert(m_job);
79 setRunning(true);
80#ifdef DEBUG_SIGNATURE
81 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyDetachedBodyPartMemento execed";
82#endif
83 saveResult(m_job->exec(m_signature, m_plainText));
84 m_job->deleteLater(); // exec'ed jobs don't delete themselves
85 m_job = nullptr;
86#ifdef DEBUG_SIGNATURE
87 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyDetachedBodyPartMemento after execed";
88#endif
89 if (canStartKeyListJob()) {
90 std::vector<GpgME::Key> keys;
91 m_keylistjob->exec(keyListPattern(), /*secretOnly=*/false, keys);
92 if (!keys.empty()) {
93 m_key = keys.back();
94 }
95 }
96 if (m_keylistjob) {
97 m_keylistjob->deleteLater(); // exec'ed jobs don't delete themselves
98 }
99 m_keylistjob = nullptr;
100 setRunning(false);
101}
102
103bool VerifyDetachedBodyPartMemento::canStartKeyListJob() const
104{
105 if (!m_keylistjob) {
106 return false;
107 }
108 const char *const fpr = m_vr.signature(0).fingerprint();
109 return fpr && *fpr;
110}
111
112QStringList VerifyDetachedBodyPartMemento::keyListPattern() const
113{
114 assert(canStartKeyListJob());
115 return QStringList(QString::fromLatin1(m_vr.signature(0).fingerprint()));
116}
117
118void VerifyDetachedBodyPartMemento::saveResult(const VerificationResult &vr)
119{
120 assert(m_job);
121#ifdef DEBUG_SIGNATURE
122 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyDetachedBodyPartMemento::saveResult called";
123#endif
124 m_vr = vr;
125 setAuditLog(m_job->auditLogError(), m_job->auditLogAsHtml());
126}
127
128void VerifyDetachedBodyPartMemento::slotResult(const VerificationResult &vr)
129{
130#ifdef DEBUG_SIGNATURE
131 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyDetachedBodyPartMemento::slotResult called";
132#endif
133 saveResult(vr);
134 m_job = nullptr;
135 if (canStartKeyListJob() && startKeyListJob()) {
136#ifdef DEBUG_SIGNATURE
137 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyDetachedBodyPartMemento: canStartKeyListJob && startKeyListJob";
138#endif
139 return;
140 }
141 if (m_keylistjob) {
142 m_keylistjob->deleteLater();
143 }
144 m_keylistjob = nullptr;
145 setRunning(false);
146 notify();
147}
148
149bool VerifyDetachedBodyPartMemento::startKeyListJob()
150{
151 assert(canStartKeyListJob());
152 if (const GpgME::Error err = m_keylistjob->start(keyListPattern())) {
153 return false;
154 }
155 connect(m_keylistjob, SIGNAL(done()), this, SLOT(slotKeyListJobDone()));
156 connect(m_keylistjob, SIGNAL(nextKey(GpgME::Key)),
157 this, SLOT(slotNextKey(GpgME::Key)));
158 return true;
159}
160
161void VerifyDetachedBodyPartMemento::slotNextKey(const GpgME::Key &key)
162{
163#ifdef DEBUG_SIGNATURE
164 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyDetachedBodyPartMemento::slotNextKey called";
165#endif
166 m_key = key;
167}
168
169void VerifyDetachedBodyPartMemento::slotKeyListJobDone()
170{
171#ifdef DEBUG_SIGNATURE
172 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyDetachedBodyPartMemento::slotKeyListJobDone called";
173#endif
174 m_keylistjob = nullptr;
175 setRunning(false);
176 notify();
177}
diff --git a/framework/src/domain/mimetreeparser/otp/verifydetachedbodypartmemento.h b/framework/src/domain/mimetreeparser/otp/verifydetachedbodypartmemento.h
deleted file mode 100644
index f37dfe81..00000000
--- a/framework/src/domain/mimetreeparser/otp/verifydetachedbodypartmemento.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 Copyright (c) 2014-2016 Montel Laurent <montel@kde.org>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#ifndef __MIMETREEPARSER_VERIFYDETACHEDBODYPARTMEMENTO_H__
19#define __MIMETREEPARSER_VERIFYDETACHEDBODYPARTMEMENTO_H__
20
21#include "cryptobodypartmemento.h"
22#include <gpgme++/verificationresult.h>
23#include <gpgme++/key.h>
24
25#include <QString>
26#include <QPointer>
27
28#include "bodypart.h"
29
30namespace QGpgME
31{
32class VerifyDetachedJob;
33class KeyListJob;
34}
35
36class QStringList;
37
38namespace MimeTreeParser
39{
40
41class VerifyDetachedBodyPartMemento
42 : public CryptoBodyPartMemento
43{
44 Q_OBJECT
45public:
46 VerifyDetachedBodyPartMemento(QGpgME::VerifyDetachedJob *job,
47 QGpgME::KeyListJob *klj,
48 const QByteArray &signature,
49 const QByteArray &plainText);
50 ~VerifyDetachedBodyPartMemento();
51
52 bool start() Q_DECL_OVERRIDE;
53 void exec() Q_DECL_OVERRIDE;
54
55 const GpgME::VerificationResult &verifyResult() const
56 {
57 return m_vr;
58 }
59 const GpgME::Key &signingKey() const
60 {
61 return m_key;
62 }
63
64private Q_SLOTS:
65 void slotResult(const GpgME::VerificationResult &vr);
66 void slotKeyListJobDone();
67 void slotNextKey(const GpgME::Key &);
68
69private:
70 void saveResult(const GpgME::VerificationResult &);
71 bool canStartKeyListJob() const;
72 QStringList keyListPattern() const;
73 bool startKeyListJob();
74private:
75 // input:
76 const QByteArray m_signature;
77 const QByteArray m_plainText;
78 QPointer<QGpgME::VerifyDetachedJob> m_job;
79 QPointer<QGpgME::KeyListJob> m_keylistjob;
80 // output:
81 GpgME::VerificationResult m_vr;
82 GpgME::Key m_key;
83};
84
85}
86
87#endif // __MIMETREEPARSER_VERIFYDETACHEDBODYPARTMEMENTO_H__
diff --git a/framework/src/domain/mimetreeparser/otp/verifyopaquebodypartmemento.cpp b/framework/src/domain/mimetreeparser/otp/verifyopaquebodypartmemento.cpp
deleted file mode 100644
index 99eb8b8e..00000000
--- a/framework/src/domain/mimetreeparser/otp/verifyopaquebodypartmemento.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
1/*
2 Copyright (c) 2014-2017 Montel Laurent <montel@kde.org>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#include "verifyopaquebodypartmemento.h"
19#include "mimetreeparser_debug.h"
20
21#include <QGpgME/VerifyOpaqueJob>
22#include <QGpgME/KeyListJob>
23
24#include <gpgme++/keylistresult.h>
25
26#include <qstringlist.h>
27
28#include <cassert>
29
30using namespace QGpgME;
31using namespace GpgME;
32using namespace MimeTreeParser;
33
34VerifyOpaqueBodyPartMemento::VerifyOpaqueBodyPartMemento(VerifyOpaqueJob *job,
35 KeyListJob *klj,
36 const QByteArray &signature)
37 : CryptoBodyPartMemento(),
38 m_signature(signature),
39 m_job(job),
40 m_keylistjob(klj)
41{
42 assert(m_job);
43}
44
45VerifyOpaqueBodyPartMemento::~VerifyOpaqueBodyPartMemento()
46{
47 if (m_job) {
48 m_job->slotCancel();
49 }
50 if (m_keylistjob) {
51 m_keylistjob->slotCancel();
52 }
53}
54
55bool VerifyOpaqueBodyPartMemento::start()
56{
57 assert(m_job);
58#ifdef DEBUG_SIGNATURE
59 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyOpaqueBodyPartMemento started";
60#endif
61 if (const Error err = m_job->start(m_signature)) {
62 m_vr = VerificationResult(err);
63#ifdef DEBUG_SIGNATURE
64 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyOpaqueBodyPartMemento stopped with error";
65#endif
66 return false;
67 }
68 connect(m_job, SIGNAL(result(GpgME::VerificationResult,QByteArray)),
69 this, SLOT(slotResult(GpgME::VerificationResult,QByteArray)));
70 setRunning(true);
71 return true;
72}
73
74void VerifyOpaqueBodyPartMemento::exec()
75{
76 assert(m_job);
77 setRunning(true);
78 QByteArray plainText;
79#ifdef DEBUG_SIGNATURE
80 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyOpaqueBodyPartMemento execed";
81#endif
82 saveResult(m_job->exec(m_signature, plainText), plainText);
83#ifdef DEBUG_SIGNATURE
84 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyOpaqueBodyPartMemento after execed";
85#endif
86 m_job->deleteLater(); // exec'ed jobs don't delete themselves
87 m_job = nullptr;
88 if (canStartKeyListJob()) {
89 std::vector<GpgME::Key> keys;
90 m_keylistjob->exec(keyListPattern(), /*secretOnly=*/false, keys);
91 if (!keys.empty()) {
92 m_key = keys.back();
93 }
94 }
95 if (m_keylistjob) {
96 m_keylistjob->deleteLater(); // exec'ed jobs don't delete themselves
97 }
98 m_keylistjob = nullptr;
99 setRunning(false);
100}
101
102bool VerifyOpaqueBodyPartMemento::canStartKeyListJob() const
103{
104 if (!m_keylistjob) {
105 return false;
106 }
107 const char *const fpr = m_vr.signature(0).fingerprint();
108 return fpr && *fpr;
109}
110
111QStringList VerifyOpaqueBodyPartMemento::keyListPattern() const
112{
113 assert(canStartKeyListJob());
114 return QStringList(QString::fromLatin1(m_vr.signature(0).fingerprint()));
115}
116
117void VerifyOpaqueBodyPartMemento::saveResult(const VerificationResult &vr,
118 const QByteArray &plainText)
119{
120 assert(m_job);
121#ifdef DEBUG_SIGNATURE
122 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyOpaqueBodyPartMemento::saveResult called";
123#endif
124 m_vr = vr;
125 m_plainText = plainText;
126 setAuditLog(m_job->auditLogError(), m_job->auditLogAsHtml());
127}
128
129void VerifyOpaqueBodyPartMemento::slotResult(const VerificationResult &vr,
130 const QByteArray &plainText)
131{
132#ifdef DEBUG_SIGNATURE
133 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyOpaqueBodyPartMemento::slotResult called";
134#endif
135 saveResult(vr, plainText);
136 m_job = nullptr;
137 if (canStartKeyListJob() && startKeyListJob()) {
138#ifdef DEBUG_SIGNATURE
139 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyOpaqueBodyPartMemento: canStartKeyListJob && startKeyListJob";
140#endif
141 return;
142 }
143 if (m_keylistjob) {
144 m_keylistjob->deleteLater();
145 }
146 m_keylistjob = nullptr;
147 setRunning(false);
148 notify();
149}
150
151bool VerifyOpaqueBodyPartMemento::startKeyListJob()
152{
153 assert(canStartKeyListJob());
154 if (const GpgME::Error err = m_keylistjob->start(keyListPattern())) {
155 return false;
156 }
157 connect(m_keylistjob, SIGNAL(done()), this, SLOT(slotKeyListJobDone()));
158 connect(m_keylistjob, SIGNAL(nextKey(GpgME::Key)),
159 this, SLOT(slotNextKey(GpgME::Key)));
160 return true;
161}
162
163void VerifyOpaqueBodyPartMemento::slotNextKey(const GpgME::Key &key)
164{
165#ifdef DEBUG_SIGNATURE
166 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyOpaqueBodyPartMemento::slotNextKey called";
167#endif
168 m_key = key;
169}
170
171void VerifyOpaqueBodyPartMemento::slotKeyListJobDone()
172{
173#ifdef DEBUG_SIGNATURE
174 qCDebug(MIMETREEPARSER_LOG) << "tokoe: VerifyOpaqueBodyPartMemento::slotKeyListJobDone called";
175#endif
176 m_keylistjob = nullptr;
177 setRunning(false);
178 notify();
179}
diff --git a/framework/src/domain/mimetreeparser/otp/verifyopaquebodypartmemento.h b/framework/src/domain/mimetreeparser/otp/verifyopaquebodypartmemento.h
deleted file mode 100644
index 02d30a13..00000000
--- a/framework/src/domain/mimetreeparser/otp/verifyopaquebodypartmemento.h
+++ /dev/null
@@ -1,93 +0,0 @@
1/*
2 Copyright (c) 2014-2016 Montel Laurent <montel@kde.org>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#ifndef __MIMETREEPARSER_VERIFYOPAQUEBODYPARTMEMENTO_H__
19#define __MIMETREEPARSER_VERIFYOPAQUEBODYPARTMEMENTO_H__
20
21#include "cryptobodypartmemento.h"
22#include <gpgme++/verificationresult.h>
23#include <gpgme++/decryptionresult.h>
24#include <gpgme++/key.h>
25
26#include <QString>
27#include <QPointer>
28
29#include "bodypart.h"
30
31namespace QGpgME
32{
33class VerifyOpaqueJob;
34class KeyListJob;
35}
36
37class QStringList;
38
39namespace MimeTreeParser
40{
41
42class VerifyOpaqueBodyPartMemento
43 : public CryptoBodyPartMemento
44{
45 Q_OBJECT
46public:
47 VerifyOpaqueBodyPartMemento(QGpgME::VerifyOpaqueJob *job,
48 QGpgME::KeyListJob *klj,
49 const QByteArray &signature);
50 ~VerifyOpaqueBodyPartMemento();
51
52 bool start() Q_DECL_OVERRIDE;
53 void exec() Q_DECL_OVERRIDE;
54
55 const QByteArray &plainText() const
56 {
57 return m_plainText;
58 }
59 const GpgME::VerificationResult &verifyResult() const
60 {
61 return m_vr;
62 }
63 const GpgME::Key &signingKey() const
64 {
65 return m_key;
66 }
67
68private Q_SLOTS:
69 void slotResult(const GpgME::VerificationResult &vr,
70 const QByteArray &plainText);
71 void slotKeyListJobDone();
72 void slotNextKey(const GpgME::Key &);
73
74private:
75 void saveResult(const GpgME::VerificationResult &,
76 const QByteArray &);
77 bool canStartKeyListJob() const;
78 QStringList keyListPattern() const;
79 bool startKeyListJob();
80private:
81 // input:
82 const QByteArray m_signature;
83 QPointer<QGpgME::VerifyOpaqueJob> m_job;
84 QPointer<QGpgME::KeyListJob> m_keylistjob;
85 // output:
86 GpgME::VerificationResult m_vr;
87 QByteArray m_plainText;
88 GpgME::Key m_key;
89};
90
91}
92
93#endif // __MIMETREEPARSER_VERIFYOPAQUEBODYPARTMEMENTO_H__