diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_big_inline_att.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_big_inline_att.json index 1439a3d8d1..ecf0da1d9c 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_big_inline_att.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_big_inline_att.json @@ -56,5 +56,13 @@ "toAddress": "default@flowcrypt.test", "uid": 17 }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "This is an encrypted message with inline attachment" -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_hidden_att_pgp_mime_modified_by_google.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_hidden_att_pgp_mime_modified_by_google.json index 8522a3d850..2ee180d234 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_hidden_att_pgp_mime_modified_by_google.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_hidden_att_pgp_mime_modified_by_google.json @@ -41,5 +41,13 @@ "uidAsHEX": "15", "isEncrypted": true }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "Encrypted text" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_error_no_mdc.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_error_no_mdc.json index a93b313821..05115ab78c 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_error_no_mdc.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_error_no_mdc.json @@ -54,5 +54,13 @@ "uid": 24, "uidAsHEX": "18" }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_for_2_keys_text.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_for_2_keys_text.json index ba18fcf56c..0dafb7ed6d 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_for_2_keys_text.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_for_2_keys_text.json @@ -41,5 +41,13 @@ "uid": 18, "uidAsHEX": "12" }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "It\u0027s an encrypted text" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text.json index 4e6e994b01..4a509ad6e5 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text.json @@ -41,5 +41,13 @@ "toAddress": "default@flowcrypt.test", "uid": 14 }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "Simple encrypted text" -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_error_badly_formatted.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_error_badly_formatted.json index 72f5c23db8..155add50b2 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_error_badly_formatted.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_error_badly_formatted.json @@ -58,5 +58,13 @@ "uid": 12, "uidAsHEX": "c" }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_error_one_pub_key.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_error_one_pub_key.json index 46fee35af5..8d3c0e38b9 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_error_one_pub_key.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_error_one_pub_key.json @@ -66,6 +66,14 @@ "uid": 10, "isEncrypted": true }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "origMsgHeaders": "Return-Path: \u003cdenbond7@flowcrypt.test\u003e\r\nDelivered-To: default@flowcrypt.test\r\nReceived: from mail.flowcrypt.test\r\n\tby mail.flowcrypt.test with LMTP\r\n\tid IE29GpAIe19wKAAAZlazJA\r\n\t(envelope-from \u003cdenbond7@flowcrypt.test\u003e)\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 05 Oct 2020 11:50:40 +0000\r\nReceived: from localhost (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTP id 69234B2058E\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 5 Oct 2020 11:50:40 +0000 (UTC)\r\nContent-Type: multipart/mixed;\r\n boundary\u003d\"----sinikael-?\u003d_1-16018986371740.9899334451956217\"\r\nTo: default@flowcrypt.test\r\nFrom: denbond7@flowcrypt.test\r\nSubject: only one pubkey used for encryption - possibly sender\u0027s error.\r\nDate: Mon, 05 Oct 2020 11:50:37 +0000\r\nMessage-Id: \u003c1601898637180-545631c7-a98f62fb-091da09b@flowcrypt.test\u003e\r\nMime-Version: 1.0", "text": "The message below should show a note telling the user that there was only one pubkey used for encryption - possibly sender\u0027s error.\n\nIt should also allow the user import a missing key if they have one." -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_missing_key.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_missing_key.json index 4ac393bbc1..f39752b1bf 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_missing_key.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_missing_key.json @@ -67,5 +67,13 @@ "toAddress": "default@flowcrypt.test", "uid": 16 }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "" -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_missing_key_fixed.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_missing_key_fixed.json index 2a2d0e9457..7d61174b7e 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_missing_key_fixed.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_missing_key_fixed.json @@ -42,5 +42,13 @@ "toAddress": "default@flowcrypt.test", "uid": 16 }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "It\u0027s a message with a missing key." -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_one_att.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_one_att.json index dfc5cd5177..b13ab12b42 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_one_att.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_one_att.json @@ -41,5 +41,13 @@ "toAddress": "default@flowcrypt.test", "uid": 12 }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "It\u0027s an encrypted message with one encrypted attachment." -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_pub_key.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_pub_key.json index 5c699954df..1b6bd4c09c 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_pub_key.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_info_text_with_pub_key.json @@ -79,5 +79,13 @@ "toAddress": "default@flowcrypt.test", "uid": 13 }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "It\u0027s an encrypted message with my pub key" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_inline_pub_key_parse_error.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_inline_pub_key_parse_error.json index 683828fa9d..4aeea8908f 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_inline_pub_key_parse_error.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_inline_pub_key_parse_error.json @@ -10,7 +10,7 @@ "complete": false, "content": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: PGPainless\n\nmDMEYIucWBYJKwYBBAHaRw8BAQdAew+8mzMWyf3+Pfy49qa60uKV6e5os7de4TdZ\nceAWUq+0F2RlbmJvbmQ3QGZsb3djcnlwdC50ZXN0iHgEExYKACAFAmCLnFgCGwMF\nFgIDAQAECwkIBwUVCgkICwIeAQIZAQAKCRDDIInNavjWzm3JAQCgFgCEyD58iEa/\nunaAldoabgO4OARgi5xYEgorBgEEAZdVAQUBAQdAB1/Mrq5JGYim4KqGTSK4OESQ\nUwPgK56q0yrkiU9WgyYDAQgHiHUEGBYKAB0FAmCLnFgCGwwFFgIDAQAECwkIBwUV\nCgkICwIeAQAKCRDDIInNavjWzjMgAQCU+R1fItqdY6lt9jXUqipmXuqVaEFPwNA8\nYJ1rIwDwVQEAyUc8162KWzA2iQB5akwLwNr/pLDDtOWwhLUkrBb3mAc\u003d\n\u003dpXF6\n-----END PGP PUBLIC KEY BLOCK-----\n", "error": { - "errorMsg": "IOException: crc check failed in armored message." + "errorMsg": "[IOException]: crc check failed in armored message." }, "type": "publicKey" } @@ -50,5 +50,13 @@ "uid": 25, "uidAsHEX": "19" }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "33333" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_need_passphrase_multiply_keys.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_need_passphrase_multiply_keys.json index 9f45753c6c..d80a6ad39d 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_need_passphrase_multiply_keys.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_need_passphrase_multiply_keys.json @@ -58,5 +58,13 @@ "uid": 18, "uidAsHEX": "12" }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_need_passphrase_single_key.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_need_passphrase_single_key.json index cc4ac27b1b..992b6babc8 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_need_passphrase_single_key.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_need_passphrase_single_key.json @@ -56,5 +56,13 @@ "uid": 14, "uidAsHEX": "e" }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_symantec_encryption_server_message_format.json b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_symantec_encryption_server_message_format.json index d43d753c11..c00dc1ea7e 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_symantec_encryption_server_message_format.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/encrypted_msg_symantec_encryption_server_message_format.json @@ -42,5 +42,13 @@ "uid": 22, "uidAsHEX": "16" }, + "verificationResult": { + "isEncrypted": true, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "Some encrypted text" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/msg_info_8bit-utf8.json b/FlowCrypt/src/androidTest/assets/messages/info/msg_info_8bit-utf8.json index b20fe19c4a..f953855917 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/msg_info_8bit-utf8.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/msg_info_8bit-utf8.json @@ -43,6 +43,14 @@ "toAddress": "default@flowcrypt.test", "uid": 17 }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "origMsgHeaders": "Return-Path: \u003cdenbond7@flowcrypt.test\u003e\r\nDelivered-To: default@flowcrypt.test\r\nReceived: from mail.flowcrypt.test\r\n\tby mail.flowcrypt.test with LMTP\r\n\tid 3yVQLfBPe1+6QAAAZlazJA\r\n\t(envelope-from \u003cdenbond7@flowcrypt.test\u003e)\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 05 Oct 2020 16:55:12 +0000\r\nReceived: from localhost (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTP id B623BB20B92\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 5 Oct 2020 16:55:12 +0000 (UTC)\r\nTo: default@flowcrypt.test\r\nFrom: Denis Bondarenko \u003cdenbond7@flowcrypt.test\u003e\r\nSubject: 8bit encoded utf broken\r\nAutocrypt: addr\u003ddenbond7@flowcrypt.test; keydata\u003d\r\n mQENBFyM4vkBCACr8FvuG4MAZsz90hrZ2B+oEznArD46QUbAGrPT8JU6zz27SfLmTTbTA86q\r\n +DVAZC94CZ2lqJaG7KY7eqHFqJObetA8mcUk0Oo3EshphpK0MnNv+bHFpKf/srJgKSDmpCF+\r\n JSHeZs2WAPtrdfoTO1KPy5IZexMWdnhYZy8d0xUr4rPZ7i2UyrkdV3k2O9x4aG5tD1Zo/Wkm\r\n lTv8z2BtAwAziqUQFxABQLu1fzcRkMHTMcGVXrB+73GITl03GbfeJHvFuThhofqP09o/p3Y1\r\n 8Zm+zVWL/T4zsA5P+Cp6kwnwUnQkL3Tc49a0qIJShlP4LbSbPBqFGWTHxceCkFBkMVoJABEB\r\n AAG0LWRlbmJvbmQ3QGRlbmJvbmQ3LmNvbSA8ZGVuYm9uZDdAZGVuYm9uZDcuY29tPokBPwQQ\r\n AQgAKQUCXIzjAQYLCQcIAwIJEGoVBlPxgAh0BBUICgIDFgIBAhkBAhsDAh4BAAoJEGoVBlPx\r\n gAh0L2EIAJRM22lnSHhgQ+waiCf0p739L3XKs2eDZUkxAX+4an654wnn1OjxWrG7lls2GgN1\r\n ziKHHdGgxU4PQ8PmQrgyc6F05vmYihRFaVFDQ97xF16+IvO4xiuYMuJk7ovsr5mrlI43CWE4\r\n f7GPtmJ7QYTlxeYW3s7KLqr0TKxqGG8f6qRjy/Q1ky3qnseR5Fp1GjIwijVI2rncfH0lOkNm\r\n BHj4aYugN60HNlUJbosb2vjJkz5dsqe+nY3XVKI6Iqq07I+Jvankn6jyvlMP8jNLxQMUsqrt\r\n Bki/C6ett3z+JeP2+2Nh+mp1vDW/kO7gSgRHUEPJ9w/VVIpWIOTEv+Bsz3l28h65AQ0EXIzj\r\n AAEIAJKbKexaP/2HqUAj/DxOebhKqw2ddK5HsYacv12pHVTEVjOnLQELyroZ1ikO21UK8Z/z\r\n ng9+8DlCz72SMql+/uZYpoEdgqMy9PU3zPDzGcAeOr07R56G08l+hUO/i3FMW4v2ZT6gLCIn\r\n AJ417wSvF4wg6dJzfrBFkj7o2lyTOwfD87CehQozyGza1cb+yS3ZPC8oc99a1jwSqFYecDI2\r\n 7Cgy7KWSbhSfoPcJG4KPTLDrvVn2Y+U2jxx6OiYXRai8wwlheAmIohmZNpHLaCQiTZTWRYPK\r\n vP0kb6aoN9O4fGhgMh3QAbc2BVwh299rToBieI/zow+I9OcrScejwQNI2VUAEQEAAYkBKQQY\r\n AQgAEwUCXIzjAgkQahUGU/GACHQCGwwACgkQahUGU/GACHSfcQf/euBJSXopDZxAVniN9HDQ\r\n Dga+ccwJYWZvyiDOaGSoSxW3QDhTOWbCH66GkZiOp9KLObHs54KzoOGaOJbQmhWGR4rwNdGS\r\n np8oWimyyXVEHHhir2BmT8MZrMC3WpMPmUlY2v9CMFD7hF2OfmXd1M9fuFT41aZQVDgGSdYc\r\n IQchOmUv3NQUiBJyOlp1bF1RT7Yf3UjAQANyENz19fYHKd2yh9Ltv3CYVjwRB4crQmuESxM8\r\n 7IEXDVNnYOBP0F5WaSQEesFAhjk+cVjxTUfcmM04YEFhedBStsV8kWF50ojYgF9te4yRM/zo\r\n NRi6SjWLSeEw/zIfvkggDvn1UfA2bGFk8Q\u003d\u003d\r\nMessage-ID: \u003c6e66bc34-0e1f-bb13-ccdc-8e61bdf63f6a@flowcrypt.test\u003e\r\nDate: Mon, 5 Oct 2020 19:55:12 +0300\r\nMime-Version: 1.0\r\nContent-Type: multipart/alternative;\r\n boundary\u003d\"------------FD1FA5F98C2FD885200F7353\"\r\nContent-Language: en-US", "text": "Text: Ваше оголошення" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_encrypted_signed.json b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_encrypted_signed.json new file mode 100644 index 0000000000..bced61e816 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_encrypted_signed.json @@ -0,0 +1,54 @@ +{ + "encryptionType": "ENCRYPTED", + "msgBlocks": [ + { + "complete": true, + "content": " \u003c!DOCTYPE html\u003e\n \u003chtml\u003e\n \u003chead\u003e\n \u003cmeta name\u003d\"viewport\" content\u003d\"width\u003ddevice-width\"/\u003e\n \u003cstyle\u003e\n body { word-wrap: break-word; word-break: break-word; hyphens: auto; margin-left: 0px; padding-left: 0px; }\n body img { display: inline !important; height: auto !important; max-width: 95% !important; }\n body pre { white-space: pre-wrap !important; }\n body \u003e div.MsgBlock \u003e table { zoom: 75% } /* table layouts tend to overflow - eg emails from fb */\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\u003cdiv class\u003d\"MsgBlock GREEN\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #31A217;border-right: none;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAh1BMVEXw8PD////w8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PD7MuHIAAAALXRSTlMAAAECBAcICw4QEhUZIyYqMTtGTV5kdn2Ii5mfoKOqrbG0uL6/xcnM0NTX2t1l7cN4AAAB0UlEQVR4Ae3Y3Y4SQRCG4bdHweFHRBTBH1FRFLXv//qsA8kmvbMdXhh2Q0KfknpSCQc130c67s22+e9+v/+d84fxkSPH0m/+5P9vN7vRV0vPfx7or1NB23e99KAHuoXOOc6moQsBwNN1Q9g4Wdh1uq3MA7Qn0+2ylAt7WbWpyT+Wo8roKH6v2QhZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2gjZ2AUNOLmwgQdogEJ2dnF3UJdU3WjqO/u96aYtVd/7jqvIyu76G5se6GaY7tNNcy5d7se7eWVnDz87fMkuVuS8epF6f9NPObPY5re9y4N1/vya9Gr3se2bfvl9M0mkyZdv077p+a/3z4Meby5Br4NWiV51BaiUqfLro9I3WiR61RVcffwfXI7u5zZ20EOA82Uu8x3SlrSwXQuBSvSqK0AletUVoBK96gpIwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWckIletUVIJJxITN6wtZd2EI+0NquyIJOnUpFVvRpcwmV6FVXgEr0qitAJXrVFaASveoKUIledQWoRK+6AlSiV13BP+/VVbky7Xq1AAAAAElFTkSuQmCC);\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eIt\u0027s encrypted and signed message\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e", + "type": "plainHtml" + } + ], + "msgEntity": { + "cc": [], + "email": "default@flowcrypt.test", + "flags": "\\SEEN", + "folder": "INBOX", + "from": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "fromAddress": "denbond7@flowcrypt.test", + "hasAttachments": false, + "id": 453, + "isEncrypted": true, + "isSeen": true, + "msgState": "NONE", + "receivedDate": 1639147807000, + "replyTo": "denbond7@flowcrypt.test", + "replyToAddress": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "sentDate": 1639147805000, + "state": -1, + "subject": "Encrypted + signed(Inband)", + "to": [ + { + "address": "default@flowcrypt.test" + } + ], + "toAddress": "default@flowcrypt.test", + "uid": 32, + "uidAsHEX": "20" + }, + "text": "It's encrypted and signed message", + "verificationResult": { + "hasBadSignatures": false, + "hasMixedSignatures": false, + "hasUnverifiedSignatures": false, + "isEncrypted": true, + "isPartialSigned": false, + "isSigned": true + } +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_encrypted_signed_mixed.json b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_encrypted_signed_mixed.json new file mode 100644 index 0000000000..026cd5b834 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_encrypted_signed_mixed.json @@ -0,0 +1,55 @@ +{ + "encryptionType": "ENCRYPTED", + "msgBlocks": [ + { + "complete": true, + "content": " \u003c!DOCTYPE html\u003e\n \u003chtml\u003e\n \u003chead\u003e\n \u003cmeta name\u003d\"viewport\" content\u003d\"width\u003ddevice-width\"/\u003e\n \u003cstyle\u003e\n body { word-wrap: break-word; word-break: break-word; hyphens: auto; margin-left: 0px; padding-left: 0px; }\n body img { display: inline !important; height: auto !important; max-width: 95% !important; }\n body pre { white-space: pre-wrap !important; }\n body \u003e div.MsgBlock \u003e table { zoom: 75% } /* table layouts tend to overflow - eg emails from fb */\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\u003cdiv class\u003d\"MsgBlock GREEN\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #31A217;border-right: none;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAh1BMVEXw8PD////w8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PD7MuHIAAAALXRSTlMAAAECBAcICw4QEhUZIyYqMTtGTV5kdn2Ii5mfoKOqrbG0uL6/xcnM0NTX2t1l7cN4AAAB0UlEQVR4Ae3Y3Y4SQRCG4bdHweFHRBTBH1FRFLXv//qsA8kmvbMdXhh2Q0KfknpSCQc130c67s22+e9+v/+d84fxkSPH0m/+5P9vN7vRV0vPfx7or1NB23e99KAHuoXOOc6moQsBwNN1Q9g4Wdh1uq3MA7Qn0+2ylAt7WbWpyT+Wo8roKH6v2QhZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2gjZ2AUNOLmwgQdogEJ2dnF3UJdU3WjqO/u96aYtVd/7jqvIyu76G5se6GaY7tNNcy5d7se7eWVnDz87fMkuVuS8epF6f9NPObPY5re9y4N1/vya9Gr3se2bfvl9M0mkyZdv077p+a/3z4Meby5Br4NWiV51BaiUqfLro9I3WiR61RVcffwfXI7u5zZ20EOA82Uu8x3SlrSwXQuBSvSqK0AletUVoBK96gpIwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWckIletUVIJJxITN6wtZd2EI+0NquyIJOnUpFVvRpcwmV6FVXgEr0qitAJXrVFaASveoKUIledQWoRK+6AlSiV13BP+/VVbky7Xq1AAAAAElFTkSuQmCC);\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eEncrypted + signed with the primary key\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003cdiv class\u003d\"MsgBlock GREEN\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #31A217;border-right: none;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAh1BMVEXw8PD////w8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PD7MuHIAAAALXRSTlMAAAECBAcICw4QEhUZIyYqMTtGTV5kdn2Ii5mfoKOqrbG0uL6/xcnM0NTX2t1l7cN4AAAB0UlEQVR4Ae3Y3Y4SQRCG4bdHweFHRBTBH1FRFLXv//qsA8kmvbMdXhh2Q0KfknpSCQc130c67s22+e9+v/+d84fxkSPH0m/+5P9vN7vRV0vPfx7or1NB23e99KAHuoXOOc6moQsBwNN1Q9g4Wdh1uq3MA7Qn0+2ylAt7WbWpyT+Wo8roKH6v2QhZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2gjZ2AUNOLmwgQdogEJ2dnF3UJdU3WjqO/u96aYtVd/7jqvIyu76G5se6GaY7tNNcy5d7se7eWVnDz87fMkuVuS8epF6f9NPObPY5re9y4N1/vya9Gr3se2bfvl9M0mkyZdv077p+a/3z4Meby5Br4NWiV51BaiUqfLro9I3WiR61RVcffwfXI7u5zZ20EOA82Uu8x3SlrSwXQuBSvSqK0AletUVoBK96gpIwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWckIletUVIJJxITN6wtZd2EI+0NquyIJOnUpFVvRpcwmV6FVXgEr0qitAJXrVFaASveoKUIledQWoRK+6AlSiV13BP+/VVbky7Xq1AAAAAElFTkSuQmCC);\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eEncrypted + signed with the second key\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e", + "type": "plainHtml" + } + ], + "msgEntity": { + "cc": [], + "email": "default@flowcrypt.test", + "flags": "\\SEEN", + "folder": "INBOX", + "from": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "fromAddress": "denbond7@flowcrypt.test", + "hasAttachments": false, + "id": 460, + "isEncrypted": true, + "isNew": false, + "isSeen": true, + "msgState": "NONE", + "receivedDate": 1639377131000, + "replyTo": "denbond7@flowcrypt.test", + "replyToAddress": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "sentDate": 1639226834000, + "state": -1, + "subject": "Encrypted + signed mixed(inband)", + "to": [ + { + "address": "default@flowcrypt.test" + } + ], + "toAddress": "default@flowcrypt.test", + "uid": 37, + "uidAsHEX": "25" + }, + "text": "Encrypted + signed with the primary key\nEncrypted + signed with the second key", + "verificationResult": { + "hasBadSignatures": false, + "hasMixedSignatures": true, + "hasUnverifiedSignatures": true, + "isEncrypted": true, + "isPartialSigned": false, + "isSigned": true + } +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_encrypted_signed_partially.json b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_encrypted_signed_partially.json new file mode 100644 index 0000000000..d56c542565 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_encrypted_signed_partially.json @@ -0,0 +1,54 @@ +{ + "encryptionType": "ENCRYPTED", + "msgBlocks": [ + { + "complete": true, + "content": " \u003c!DOCTYPE html\u003e\n \u003chtml\u003e\n \u003chead\u003e\n \u003cmeta name\u003d\"viewport\" content\u003d\"width\u003ddevice-width\"/\u003e\n \u003cstyle\u003e\n body { word-wrap: break-word; word-break: break-word; hyphens: auto; margin-left: 0px; padding-left: 0px; }\n body img { display: inline !important; height: auto !important; max-width: 95% !important; }\n body pre { white-space: pre-wrap !important; }\n body \u003e div.MsgBlock \u003e table { zoom: 75% } /* table layouts tend to overflow - eg emails from fb */\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\u003cdiv class\u003d\"MsgBlock GREEN\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #31A217;border-right: none;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAh1BMVEXw8PD////w8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PD7MuHIAAAALXRSTlMAAAECBAcICw4QEhUZIyYqMTtGTV5kdn2Ii5mfoKOqrbG0uL6/xcnM0NTX2t1l7cN4AAAB0UlEQVR4Ae3Y3Y4SQRCG4bdHweFHRBTBH1FRFLXv//qsA8kmvbMdXhh2Q0KfknpSCQc130c67s22+e9+v/+d84fxkSPH0m/+5P9vN7vRV0vPfx7or1NB23e99KAHuoXOOc6moQsBwNN1Q9g4Wdh1uq3MA7Qn0+2ylAt7WbWpyT+Wo8roKH6v2QhZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2gjZ2AUNOLmwgQdogEJ2dnF3UJdU3WjqO/u96aYtVd/7jqvIyu76G5se6GaY7tNNcy5d7se7eWVnDz87fMkuVuS8epF6f9NPObPY5re9y4N1/vya9Gr3se2bfvl9M0mkyZdv077p+a/3z4Meby5Br4NWiV51BaiUqfLro9I3WiR61RVcffwfXI7u5zZ20EOA82Uu8x3SlrSwXQuBSvSqK0AletUVoBK96gpIwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWckIletUVIJJxITN6wtZd2EI+0NquyIJOnUpFVvRpcwmV6FVXgEr0qitAJXrVFaASveoKUIledQWoRK+6AlSiV13BP+/VVbky7Xq1AAAAAElFTkSuQmCC);\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eSome encrypted and signed text\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003cdiv class\u003d\"MsgBlock GREEN\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #31A217;border-right: none;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAh1BMVEXw8PD////w8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PD7MuHIAAAALXRSTlMAAAECBAcICw4QEhUZIyYqMTtGTV5kdn2Ii5mfoKOqrbG0uL6/xcnM0NTX2t1l7cN4AAAB0UlEQVR4Ae3Y3Y4SQRCG4bdHweFHRBTBH1FRFLXv//qsA8kmvbMdXhh2Q0KfknpSCQc130c67s22+e9+v/+d84fxkSPH0m/+5P9vN7vRV0vPfx7or1NB23e99KAHuoXOOc6moQsBwNN1Q9g4Wdh1uq3MA7Qn0+2ylAt7WbWpyT+Wo8roKH6v2QhZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2gjZ2AUNOLmwgQdogEJ2dnF3UJdU3WjqO/u96aYtVd/7jqvIyu76G5se6GaY7tNNcy5d7se7eWVnDz87fMkuVuS8epF6f9NPObPY5re9y4N1/vya9Gr3se2bfvl9M0mkyZdv077p+a/3z4Meby5Br4NWiV51BaiUqfLro9I3WiR61RVcffwfXI7u5zZ20EOA82Uu8x3SlrSwXQuBSvSqK0AletUVoBK96gpIwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWckIletUVIJJxITN6wtZd2EI+0NquyIJOnUpFVvRpcwmV6FVXgEr0qitAJXrVFaASveoKUIledQWoRK+6AlSiV13BP+/VVbky7Xq1AAAAAElFTkSuQmCC);\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eIt\u0027s encrypted only message\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e", + "type": "plainHtml" + } + ], + "msgEntity": { + "cc": [], + "email": "default@flowcrypt.test", + "flags": "\\SEEN", + "folder": "INBOX", + "from": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "isEncrypted": true, + "fromAddress": "denbond7@flowcrypt.test", + "hasAttachments": false, + "id": 456, + "isSeen": true, + "msgState": "NONE", + "receivedDate": 1639223056000, + "replyTo": "denbond7@flowcrypt.test", + "replyToAddress": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "sentDate": 1639223054000, + "state": -1, + "subject": "Encrypted + signed partially(inband)", + "to": [ + { + "address": "default@flowcrypt.test" + } + ], + "toAddress": "default@flowcrypt.test", + "uid": 35, + "uidAsHEX": "23" + }, + "text": "Some encrypted and signed text\nIt\u0027s encrypted only message", + "verificationResult": { + "hasBadSignatures": false, + "hasMixedSignatures": false, + "hasUnverifiedSignatures": false, + "isEncrypted": true, + "isPartialSigned": true, + "isSigned": true + } +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_missing_pub_key_encrypted_signed.json b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_missing_pub_key_encrypted_signed.json new file mode 100644 index 0000000000..cb57f4ab08 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_missing_pub_key_encrypted_signed.json @@ -0,0 +1,54 @@ +{ + "encryptionType": "ENCRYPTED", + "msgBlocks": [ + { + "complete": true, + "content": " \u003c!DOCTYPE html\u003e\n \u003chtml\u003e\n \u003chead\u003e\n \u003cmeta name\u003d\"viewport\" content\u003d\"width\u003ddevice-width\"/\u003e\n \u003cstyle\u003e\n body { word-wrap: break-word; word-break: break-word; hyphens: auto; margin-left: 0px; padding-left: 0px; }\n body img { display: inline !important; height: auto !important; max-width: 95% !important; }\n body pre { white-space: pre-wrap !important; }\n body \u003e div.MsgBlock \u003e table { zoom: 75% } /* table layouts tend to overflow - eg emails from fb */\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\u003cdiv class\u003d\"MsgBlock GREEN\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #31A217;border-right: none;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAh1BMVEXw8PD////w8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PD7MuHIAAAALXRSTlMAAAECBAcICw4QEhUZIyYqMTtGTV5kdn2Ii5mfoKOqrbG0uL6/xcnM0NTX2t1l7cN4AAAB0UlEQVR4Ae3Y3Y4SQRCG4bdHweFHRBTBH1FRFLXv//qsA8kmvbMdXhh2Q0KfknpSCQc130c67s22+e9+v/+d84fxkSPH0m/+5P9vN7vRV0vPfx7or1NB23e99KAHuoXOOc6moQsBwNN1Q9g4Wdh1uq3MA7Qn0+2ylAt7WbWpyT+Wo8roKH6v2QhZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2gjZ2AUNOLmwgQdogEJ2dnF3UJdU3WjqO/u96aYtVd/7jqvIyu76G5se6GaY7tNNcy5d7se7eWVnDz87fMkuVuS8epF6f9NPObPY5re9y4N1/vya9Gr3se2bfvl9M0mkyZdv077p+a/3z4Meby5Br4NWiV51BaiUqfLro9I3WiR61RVcffwfXI7u5zZ20EOA82Uu8x3SlrSwXQuBSvSqK0AletUVoBK96gpIwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWckIletUVIJJxITN6wtZd2EI+0NquyIJOnUpFVvRpcwmV6FVXgEr0qitAJXrVFaASveoKUIledQWoRK+6AlSiV13BP+/VVbky7Xq1AAAAAElFTkSuQmCC);\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eIt\u0027s an encrypted message that was signed with a wrong private key. Sender and signer are different.\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e", + "type": "plainHtml" + } + ], + "msgEntity": { + "cc": [], + "email": "default@flowcrypt.test", + "flags": "\\SEEN", + "folder": "INBOX", + "from": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "fromAddress": "denbond7@flowcrypt.test", + "hasAttachments": false, + "id": 497, + "isEncrypted": true, + "isNew": false, + "isSeen": true, + "msgState": "NONE", + "receivedDate": 1639402456000, + "replyTo": "denbond7@flowcrypt.test", + "replyToAddress": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "sentDate": 1639402453000, + "subject": "Encrypted + signed(inband) + no pub key", + "to": [ + { + "address": "default@flowcrypt.test" + } + ], + "toAddress": "default@flowcrypt.test", + "uid": 39, + "uidAsHEX": "27" + }, + "text": "It\u0027s an encrypted message that was signed with a wrong private key. Sender and signer are different.", + "verificationResult": { + "hasBadSignatures": false, + "hasMixedSignatures": false, + "hasUnverifiedSignatures": true, + "isEncrypted": true, + "isPartialSigned": false, + "isSigned": true + } +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_missing_pub_key_only_signed.json b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_missing_pub_key_only_signed.json new file mode 100644 index 0000000000..880023eac9 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_missing_pub_key_only_signed.json @@ -0,0 +1,54 @@ +{ + "encryptionType": "STANDARD", + "msgBlocks": [ + { + "complete": true, + "content": " \u003c!DOCTYPE html\u003e\n \u003chtml\u003e\n \u003chead\u003e\n \u003cmeta name\u003d\"viewport\" content\u003d\"width\u003ddevice-width\"/\u003e\n \u003cstyle\u003e\n body { word-wrap: break-word; word-break: break-word; hyphens: auto; margin-left: 0px; padding-left: 0px; }\n body img { display: inline !important; height: auto !important; max-width: 95% !important; }\n body pre { white-space: pre-wrap !important; }\n body \u003e div.MsgBlock \u003e table { zoom: 75% } /* table layouts tend to overflow - eg emails from fb */\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\u003cdiv class\u003d\"MsgBlock GRAY\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #989898;border-right: none;\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eIt\u0027s a regular message that was signed with a wrong private key. Sender and signer are different.\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e", + "type": "plainHtml" + } + ], + "msgEntity": { + "cc": [], + "email": "default@flowcrypt.test", + "flags": "\\SEEN", + "folder": "INBOX", + "from": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "fromAddress": "denbond7@flowcrypt.test", + "hasAttachments": false, + "id": 499, + "isEncrypted": false, + "isNew": false, + "isSeen": true, + "msgState": "NONE", + "receivedDate": 1639402610000, + "replyTo": "denbond7@flowcrypt.test", + "replyToAddress": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "sentDate": 1639402608000, + "subject": "NOT encrypted + signed(inband) + no pub key", + "to": [ + { + "address": "default@flowcrypt.test" + } + ], + "toAddress": "default@flowcrypt.test", + "uid": 40, + "uidAsHEX": "28" + }, + "text": "It's a regular message that was signed with a wrong private key. Sender and signer are different.", + "verificationResult": { + "hasBadSignatures": false, + "hasMixedSignatures": false, + "hasUnverifiedSignatures": true, + "isEncrypted": false, + "isPartialSigned": false, + "isSigned": true + } +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_encrypted.json b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_encrypted.json new file mode 100644 index 0000000000..dac129a54f --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_encrypted.json @@ -0,0 +1,54 @@ +{ + "encryptionType": "ENCRYPTED", + "msgBlocks": [ + { + "complete": true, + "content": " \u003c!DOCTYPE html\u003e\n \u003chtml\u003e\n \u003chead\u003e\n \u003cmeta name\u003d\"viewport\" content\u003d\"width\u003ddevice-width\"/\u003e\n \u003cstyle\u003e\n body { word-wrap: break-word; word-break: break-word; hyphens: auto; margin-left: 0px; padding-left: 0px; }\n body img { display: inline !important; height: auto !important; max-width: 95% !important; }\n body pre { white-space: pre-wrap !important; }\n body \u003e div.MsgBlock \u003e table { zoom: 75% } /* table layouts tend to overflow - eg emails from fb */\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\u003cdiv class\u003d\"MsgBlock GREEN\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #31A217;border-right: none;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAh1BMVEXw8PD////w8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PD7MuHIAAAALXRSTlMAAAECBAcICw4QEhUZIyYqMTtGTV5kdn2Ii5mfoKOqrbG0uL6/xcnM0NTX2t1l7cN4AAAB0UlEQVR4Ae3Y3Y4SQRCG4bdHweFHRBTBH1FRFLXv//qsA8kmvbMdXhh2Q0KfknpSCQc130c67s22+e9+v/+d84fxkSPH0m/+5P9vN7vRV0vPfx7or1NB23e99KAHuoXOOc6moQsBwNN1Q9g4Wdh1uq3MA7Qn0+2ylAt7WbWpyT+Wo8roKH6v2QhZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2ghZ2gjZ2AUNOLmwgQdogEJ2dnF3UJdU3WjqO/u96aYtVd/7jqvIyu76G5se6GaY7tNNcy5d7se7eWVnDz87fMkuVuS8epF6f9NPObPY5re9y4N1/vya9Gr3se2bfvl9M0mkyZdv077p+a/3z4Meby5Br4NWiV51BaiUqfLro9I3WiR61RVcffwfXI7u5zZ20EOA82Uu8x3SlrSwXQuBSvSqK0AletUVoBK96gpIwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWctDCVnLQwlZy0MJWckIletUVIJJxITN6wtZd2EI+0NquyIJOnUpFVvRpcwmV6FVXgEr0qitAJXrVFaASveoKUIledQWoRK+6AlSiV13BP+/VVbky7Xq1AAAAAElFTkSuQmCC);\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eIt\u0027s encrypted only message\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e", + "type": "plainHtml" + } + ], + "msgEntity": { + "cc": [], + "email": "default@flowcrypt.test", + "flags": "\\SEEN", + "folder": "INBOX", + "from": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "fromAddress": "denbond7@flowcrypt.test", + "hasAttachments": false, + "id": 451, + "isSeen": true, + "isEncrypted": true, + "msgState": "NONE", + "receivedDate": 1639147522000, + "replyTo": "denbond7@flowcrypt.test", + "replyToAddress": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "sentDate": 1639147477000, + "state": -1, + "subject": "Encrypted + NOT signed", + "to": [ + { + "address": "default@flowcrypt.test" + } + ], + "toAddress": "default@flowcrypt.test", + "uid": 29, + "uidAsHEX": "1d" + }, + "text": "It\u0027s encrypted only message", + "verificationResult": { + "hasBadSignatures": false, + "hasMixedSignatures": false, + "hasUnverifiedSignatures": false, + "isEncrypted": true, + "isPartialSigned": false, + "isSigned": false + } +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_signed.json b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_signed.json new file mode 100644 index 0000000000..615daf7ebb --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_signed.json @@ -0,0 +1,53 @@ +{ + "encryptionType": "STANDARD", + "msgBlocks": [ + { + "complete": true, + "content": " \u003c!DOCTYPE html\u003e\n \u003chtml\u003e\n \u003chead\u003e\n \u003cmeta name\u003d\"viewport\" content\u003d\"width\u003ddevice-width\"/\u003e\n \u003cstyle\u003e\n body { word-wrap: break-word; word-break: break-word; hyphens: auto; margin-left: 0px; padding-left: 0px; }\n body img { display: inline !important; height: auto !important; max-width: 95% !important; }\n body pre { white-space: pre-wrap !important; }\n body \u003e div.MsgBlock \u003e table { zoom: 75% } /* table layouts tend to overflow - eg emails from fb */\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\u003cdiv class\u003d\"MsgBlock GRAY\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #989898;border-right: none;\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eIt\u0027s signed (Inband) only message.\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e", + "type": "plainHtml" + } + ], + "msgEntity": { + "cc": [], + "email": "default@flowcrypt.test", + "flags": "\\SEEN", + "folder": "INBOX", + "from": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "fromAddress": "denbond7@flowcrypt.test", + "hasAttachments": false, + "id": 452, + "isSeen": true, + "msgState": "NONE", + "receivedDate": 1639147743000, + "replyTo": "denbond7@flowcrypt.test", + "replyToAddress": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "sentDate": 1639147740000, + "state": -1, + "subject": "NOT encrypted + signed(Inband)", + "to": [ + { + "address": "default@flowcrypt.test" + } + ], + "toAddress": "default@flowcrypt.test", + "uid": 31, + "uidAsHEX": "1f" + }, + "text": "It's signed (Inband) only message.", + "verificationResult": { + "hasBadSignatures": false, + "hasMixedSignatures": false, + "hasUnverifiedSignatures": false, + "isEncrypted": false, + "isPartialSigned": false, + "isSigned": true + } +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_signed_mixed.json b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_signed_mixed.json new file mode 100644 index 0000000000..bb71f70cf2 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_signed_mixed.json @@ -0,0 +1,55 @@ +{ + "encryptionType": "STANDARD", + "msgBlocks": [ + { + "complete": true, + "content": " \u003c!DOCTYPE html\u003e\n \u003chtml\u003e\n \u003chead\u003e\n \u003cmeta name\u003d\"viewport\" content\u003d\"width\u003ddevice-width\"/\u003e\n \u003cstyle\u003e\n body { word-wrap: break-word; word-break: break-word; hyphens: auto; margin-left: 0px; padding-left: 0px; }\n body img { display: inline !important; height: auto !important; max-width: 95% !important; }\n body pre { white-space: pre-wrap !important; }\n body \u003e div.MsgBlock \u003e table { zoom: 75% } /* table layouts tend to overflow - eg emails from fb */\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\u003cdiv class\u003d\"MsgBlock GRAY\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #989898;border-right: none;\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eSigned with a primary key\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003cdiv class\u003d\"MsgBlock GRAY\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #989898;border-right: none;\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eSigned with the second key\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e", + "type": "plainHtml" + } + ], + "msgEntity": { + "cc": [], + "email": "default@flowcrypt.test", + "flags": "\\SEEN", + "folder": "INBOX", + "from": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "fromAddress": "denbond7@flowcrypt.test", + "hasAttachments": false, + "id": 462, + "isEncrypted": false, + "isNew": false, + "isSeen": true, + "msgState": "NONE", + "receivedDate": 1639377556000, + "replyTo": "denbond7@flowcrypt.test", + "replyToAddress": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "sentDate": 1639227258000, + "state": -1, + "subject": "NOT encrypted + signed mixed(inband)", + "to": [ + { + "address": "default@flowcrypt.test" + } + ], + "toAddress": "default@flowcrypt.test", + "uid": 38, + "uidAsHEX": "26" + }, + "text": "Signed with a primary key\nSigned with the second key", + "verificationResult": { + "hasBadSignatures": false, + "hasMixedSignatures": true, + "hasUnverifiedSignatures": true, + "isEncrypted": false, + "isPartialSigned": false, + "isSigned": true + } +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_signed_partially.json b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_signed_partially.json new file mode 100644 index 0000000000..c1eb8ba5a7 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/info/signature_verification_inband_only_signed_partially.json @@ -0,0 +1,53 @@ +{ + "encryptionType": "STANDARD", + "msgBlocks": [ + { + "complete": true, + "content": " \u003c!DOCTYPE html\u003e\n \u003chtml\u003e\n \u003chead\u003e\n \u003cmeta name\u003d\"viewport\" content\u003d\"width\u003ddevice-width\"/\u003e\n \u003cstyle\u003e\n body { word-wrap: break-word; word-break: break-word; hyphens: auto; margin-left: 0px; padding-left: 0px; }\n body img { display: inline !important; height: auto !important; max-width: 95% !important; }\n body pre { white-space: pre-wrap !important; }\n body \u003e div.MsgBlock \u003e table { zoom: 75% } /* table layouts tend to overflow - eg emails from fb */\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\u003cdiv class\u003d\"MsgBlock PLAIN\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: none;\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eSome plain text\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003cdiv class\u003d\"MsgBlock GRAY\" style\u003d\"background: white;padding-left: 8px;min-height: 50px;padding-top: 4px;padding-bottom: 4px;width: 100%;border: 1px solid #f0f0f0;border-left: 8px solid #989898;border-right: none;\"\u003e\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003eOnly signed message\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e", + "type": "plainHtml" + } + ], + "msgEntity": { + "cc": [], + "email": "default@flowcrypt.test", + "flags": "\\SEEN", + "folder": "INBOX", + "from": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "fromAddress": "denbond7@flowcrypt.test", + "hasAttachments": false, + "id": 457, + "isSeen": true, + "msgState": "NONE", + "receivedDate": 1639223239000, + "replyTo": "denbond7@flowcrypt.test", + "replyToAddress": [ + { + "address": "denbond7@flowcrypt.test" + } + ], + "sentDate": 1639223237000, + "state": -1, + "subject": "NOT encrypted + signed partially(inband)", + "to": [ + { + "address": "default@flowcrypt.test" + } + ], + "toAddress": "default@flowcrypt.test", + "uid": 36, + "uidAsHEX": "24" + }, + "text": "Some plain text\nOnly signed message", + "verificationResult": { + "hasBadSignatures": false, + "hasMixedSignatures": false, + "hasUnverifiedSignatures": false, + "isEncrypted": false, + "isPartialSigned": true, + "isSigned": true + } +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_armored.json b/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_armored.json index a81e2f9b76..4bb902c02d 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_armored.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_armored.json @@ -42,5 +42,13 @@ "uid": 26, "uidAsHEX": "1a" }, + "verificationResult": { + "isEncrypted": false, + "isSigned": true, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "Signed text for default@flowcrypt.test" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_clearsign.json b/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_clearsign.json index 0a8b754efa..0467a70120 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_clearsign.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_clearsign.json @@ -42,5 +42,13 @@ "uid": 28, "uidAsHEX": "1c" }, + "verificationResult": { + "isEncrypted": false, + "isSigned": true, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "Some important text that is signed" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_clearsign_broken.json b/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_clearsign_broken.json index 337c9d46c0..f26cb583ab 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_clearsign_broken.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/signed_msg_clearsign_broken.json @@ -51,5 +51,13 @@ "uid": 27, "uidAsHEX": "1b" }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "" } diff --git a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext.json b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext.json index 0c22d1290e..f53b30b35a 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext.json @@ -43,6 +43,14 @@ "toAddress": "default@flowcrypt.test", "uid": 5 }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "origMsgHeaders": "Return-Path: \u003cdenbond7@flowcrypt.test\u003e\r\nDelivered-To: default@flowcrypt.test\r\nReceived: from mail.flowcrypt.test\r\n\tby mail.flowcrypt.test with LMTP\r\n\tid WF4PDSLael+dCQAAZlazJA\r\n\t(envelope-from \u003cdenbond7@flowcrypt.test\u003e)\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 05 Oct 2020 08:32:34 +0000\r\nReceived: from localhost (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTP id 347E7A20940\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 5 Oct 2020 08:32:34 +0000 (UTC)\r\nTo: default@flowcrypt.test\r\nFrom: Denis Bondarenko \u003cdenbond7@flowcrypt.test\u003e\r\nX-Pep-Version: 2.0\r\nMessage-ID: \u003c8fcbd0f1-e33b-9b5e-51ee-79d7c639f0bc@flowcrypt.test\u003e\r\nDate: Mon, 5 Oct 2020 11:32:34 +0300\r\nMime-Version: 1.0\r\nSubject: Standard message - plaintext\r\nContent-Type: multipart/alternative;\r\n boundary\u003d\"------------D3F69D95534F587EC1BE35A3\"\r\nContent-Language: en-US", "text": "It\u0027s a standard message with plaintext" -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_single_to_replyto_cc.json b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_single_to_replyto_cc.json index d4bcfe6688..44572b5cf8 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_single_to_replyto_cc.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_single_to_replyto_cc.json @@ -48,6 +48,14 @@ "toAddress": "default@flowcrypt.test", "uid": 5 }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "origMsgHeaders": "Return-Path: \u003cdenbond7@flowcrypt.test\u003e\r\nDelivered-To: default@flowcrypt.test\r\nReceived: from mail.flowcrypt.test\r\n\tby mail.flowcrypt.test with LMTP\r\n\tid WF4PDSLael+dCQAAZlazJA\r\n\t(envelope-from \u003cdenbond7@flowcrypt.test\u003e)\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 05 Oct 2020 08:32:34 +0000\r\nReceived: from localhost (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTP id 347E7A20940\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 5 Oct 2020 08:32:34 +0000 (UTC)\r\nTo: default@flowcrypt.test\r\nFrom: Denis Bondarenko \u003cdenbond7@flowcrypt.test\u003e\r\nX-Pep-Version: 2.0\r\nMessage-ID: \u003c8fcbd0f1-e33b-9b5e-51ee-79d7c639f0bc@flowcrypt.test\u003e\r\nDate: Mon, 5 Oct 2020 11:32:34 +0300\r\nMime-Version: 1.0\r\nSubject: Standard message - plaintext\r\nContent-Type: multipart/alternative;\r\n boundary\u003d\"------------D3F69D95534F587EC1BE35A3\"\r\nContent-Language: en-US", "text": "It\u0027s a standard message with plaintext" -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_to_2_recipients.json b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_to_2_recipients.json index 7ed5884233..defda0e4c3 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_to_2_recipients.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_to_2_recipients.json @@ -47,6 +47,14 @@ "toAddress": "default@flowcrypt.test, User ", "uid": 5 }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "origMsgHeaders": "Return-Path: \u003cdenbond7@flowcrypt.test\u003e\r\nDelivered-To: default@flowcrypt.test\r\nReceived: from mail.flowcrypt.test\r\n\tby mail.flowcrypt.test with LMTP\r\n\tid WF4PDSLael+dCQAAZlazJA\r\n\t(envelope-from \u003cdenbond7@flowcrypt.test\u003e)\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 05 Oct 2020 08:32:34 +0000\r\nReceived: from localhost (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTP id 347E7A20940\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 5 Oct 2020 08:32:34 +0000 (UTC)\r\nTo: default@flowcrypt.test\r\nFrom: Denis Bondarenko \u003cdenbond7@flowcrypt.test\u003e\r\nX-Pep-Version: 2.0\r\nMessage-ID: \u003c8fcbd0f1-e33b-9b5e-51ee-79d7c639f0bc@flowcrypt.test\u003e\r\nDate: Mon, 5 Oct 2020 11:32:34 +0300\r\nMime-Version: 1.0\r\nSubject: Standard message - plaintext\r\nContent-Type: multipart/alternative;\r\n boundary\u003d\"------------D3F69D95534F587EC1BE35A3\"\r\nContent-Language: en-US", "text": "It\u0027s a standard message with plaintext" -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_with_one_att.json b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_with_one_att.json index 561f90f3c9..c301dc4924 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_with_one_att.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_info_plaintext_with_one_att.json @@ -43,6 +43,14 @@ "toAddress": "default@flowcrypt.test", "uid": 6 }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "origMsgHeaders": "Return-Path: \u003cdenbond7@flowcrypt.test\u003e\r\nDelivered-To: default@flowcrypt.test\r\nReceived: from mail.flowcrypt.test\r\n\tby mail.flowcrypt.test with LMTP\r\n\tid YISlMxbcel9GEwAAZlazJA\r\n\t(envelope-from \u003cdenbond7@flowcrypt.test\u003e)\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 05 Oct 2020 08:40:54 +0000\r\nReceived: from localhost (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTP id D03A0A2098A\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Mon, 5 Oct 2020 08:40:54 +0000 (UTC)\r\nTo: default@flowcrypt.test\r\nFrom: Denis Bondarenko \u003cdenbond7@flowcrypt.test\u003e\r\nX-Pep-Version: 2.0\r\nMessage-ID: \u003cfacd4f6d-9e74-977b-3f11-abbe7cd467eb@flowcrypt.test\u003e\r\nDate: Mon, 5 Oct 2020 11:40:54 +0300\r\nMime-Version: 1.0\r\nSubject: Standard message + one attachment\r\nContent-Type: multipart/mixed;\r\n boundary\u003d\"------------9575DD1DBF2C2FFA08F4568A\"\r\nContent-Language: en-US", "text": "It\u0027s a standard message with plaintext and one attachment" -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_reply_all_via_gmail_alias.json b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_reply_all_via_gmail_alias.json index a2e3e731ce..445bbc1c17 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_reply_all_via_gmail_alias.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_reply_all_via_gmail_alias.json @@ -47,6 +47,14 @@ "type": "plainHtml" } ], + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "origMsgHeaders": "Return-Path: \u003cdenbond7@flowcrypt.test\u003e\r\nDelivered-To: default@flowcrypt.test\r\nReceived: from mail.flowcrypt.test (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTP id E24B021EE5\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Tue, 1 Oct 2019 11:25:36 +0000 (UTC)\r\nAuthentication-Results: mail.flowcrypt.test (amavisd-new); dkim\u003dpass\r\n\treason\u003d\"pass (just generated, assumed good)\" header.d\u003dflowcrypt.test\r\nDKIM-Signature: v\u003d1; a\u003drsa-sha256; c\u003drelaxed/simple; d\u003dflowcrypt.test; h\u003d\r\n\tuser-agent:message-id:reply-to:subject:subject:to:from:from:date\r\n\t:date:content-transfer-encoding:content-type:content-type\r\n\t:mime-version; s\u003ddkim; t\u003d1569929122; x\u003d1570793123; bh\u003dx1bgGo2MG/\r\n\tBhDI0wq3RU1YBrrUGERXYHxNAJggBUVNU\u003d; b\u003dHMAJby/fdCu+baav9xxlUpzo4f\r\n\toCJrkHjltgdAUnwvCA7gmFG0rOH366G57fQME7Vv0KtjodHoG3ijNotoJUw+66VS\r\n\tww9CjSWXadPriTIXN/cRzJBnNN9Lvp5qEcg93MI0kTvX5kJHZEAG7jbZZUXX3LUw\r\n\tXWKNohPwqcECOM8fI\u003d\r\nX-Virus-Scanned: Debian amavisd-new at mail.flowcrypt.test\r\nReceived: from mail.flowcrypt.test ([127.0.0.1])\r\n\tby mail.flowcrypt.test (mail.flowcrypt.test [127.0.0.1]) (amavisd-new, port 10026)\r\n\twith ESMTP id 640VPIOx-Lcz for \u003cdefault@flowcrypt.test\u003e;\r\n\tTue, 1 Oct 2019 11:25:22 +0000 (UTC)\r\nReceived: from flowcrypt.test (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTPSA id 6D12421ED6\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Tue, 1 Oct 2019 11:25:22 +0000 (UTC)\r\nMIME-Version: 1.0\r\nContent-Type: text/plain; charset\u003dUS-ASCII; format\u003dflowed\r\nContent-Transfer-Encoding: 7bit\r\nDate: Tue, 01 Oct 2019 14:25:21 +0300\r\nFrom: denbond7@flowcrypt.test\r\nTo: Default \u003cdefault@flowcrypt.test\u003e\r\nSubject: Honor reply-to address\r\nReply-To: android@flowcrypt.test\r\nMail-Reply-To: android@flowcrypt.test\r\nMessage-ID: \u003c8b50eeb45d3b6cd88be8d06907b171de@flowcrypt.test\u003e\r\nX-Sender: denbond7@flowcrypt.test\r\nUser-Agent: Roundcube Webmail", "text": "Some message with some text. See details here https://github.com/FlowCrypt/flowcrypt-android/issues/602" -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_reply_to_header.json b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_reply_to_header.json index f052b4e61d..22f4f3837d 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_reply_to_header.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_reply_to_header.json @@ -53,6 +53,14 @@ "type": "plainHtml" } ], + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "origMsgHeaders": "Return-Path: \u003cdenbond7@flowcrypt.test\u003e\r\nDelivered-To: default@flowcrypt.test\r\nReceived: from mail.flowcrypt.test (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTP id E24B021EE5\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Tue, 1 Oct 2019 11:25:36 +0000 (UTC)\r\nAuthentication-Results: mail.flowcrypt.test (amavisd-new); dkim\u003dpass\r\n\treason\u003d\"pass (just generated, assumed good)\" header.d\u003dflowcrypt.test\r\nDKIM-Signature: v\u003d1; a\u003drsa-sha256; c\u003drelaxed/simple; d\u003dflowcrypt.test; h\u003d\r\n\tuser-agent:message-id:reply-to:subject:subject:to:from:from:date\r\n\t:date:content-transfer-encoding:content-type:content-type\r\n\t:mime-version; s\u003ddkim; t\u003d1569929122; x\u003d1570793123; bh\u003dx1bgGo2MG/\r\n\tBhDI0wq3RU1YBrrUGERXYHxNAJggBUVNU\u003d; b\u003dHMAJby/fdCu+baav9xxlUpzo4f\r\n\toCJrkHjltgdAUnwvCA7gmFG0rOH366G57fQME7Vv0KtjodHoG3ijNotoJUw+66VS\r\n\tww9CjSWXadPriTIXN/cRzJBnNN9Lvp5qEcg93MI0kTvX5kJHZEAG7jbZZUXX3LUw\r\n\tXWKNohPwqcECOM8fI\u003d\r\nX-Virus-Scanned: Debian amavisd-new at mail.flowcrypt.test\r\nReceived: from mail.flowcrypt.test ([127.0.0.1])\r\n\tby mail.flowcrypt.test (mail.flowcrypt.test [127.0.0.1]) (amavisd-new, port 10026)\r\n\twith ESMTP id 640VPIOx-Lcz for \u003cdefault@flowcrypt.test\u003e;\r\n\tTue, 1 Oct 2019 11:25:22 +0000 (UTC)\r\nReceived: from flowcrypt.test (localhost [127.0.0.1])\r\n\tby mail.flowcrypt.test (Postfix) with ESMTPSA id 6D12421ED6\r\n\tfor \u003cdefault@flowcrypt.test\u003e; Tue, 1 Oct 2019 11:25:22 +0000 (UTC)\r\nMIME-Version: 1.0\r\nContent-Type: text/plain; charset\u003dUS-ASCII; format\u003dflowed\r\nContent-Transfer-Encoding: 7bit\r\nDate: Tue, 01 Oct 2019 14:25:21 +0300\r\nFrom: denbond7@flowcrypt.test\r\nTo: Default \u003cdefault@flowcrypt.test\u003e\r\nSubject: Honor reply-to address\r\nReply-To: android@flowcrypt.test\r\nMail-Reply-To: android@flowcrypt.test\r\nMessage-ID: \u003c8b50eeb45d3b6cd88be8d06907b171de@flowcrypt.test\u003e\r\nX-Sender: denbond7@flowcrypt.test\r\nUser-Agent: Roundcube Webmail", "text": "Some message with some text. See details here https://github.com/FlowCrypt/flowcrypt-android/issues/602" -} \ No newline at end of file +} diff --git a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_with_pub_key_that_has_no_suitable_encryption_subkeys.json b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_with_pub_key_that_has_no_suitable_encryption_subkeys.json index 8ea621039d..e79dcbc118 100644 --- a/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_with_pub_key_that_has_no_suitable_encryption_subkeys.json +++ b/FlowCrypt/src/androidTest/assets/messages/info/standard_msg_with_pub_key_that_has_no_suitable_encryption_subkeys.json @@ -37,1433 +37,7 @@ "no_encryption_subkeys@flowcrypt.test" ] }, - "publicKey": [ - 45, - 45, - 45, - 45, - 45, - 66, - 69, - 71, - 73, - 78, - 32, - 80, - 71, - 80, - 32, - 80, - 85, - 66, - 76, - 73, - 67, - 32, - 75, - 69, - 89, - 32, - 66, - 76, - 79, - 67, - 75, - 45, - 45, - 45, - 45, - 45, - 10, - 86, - 101, - 114, - 115, - 105, - 111, - 110, - 58, - 32, - 70, - 108, - 111, - 119, - 67, - 114, - 121, - 112, - 116, - 32, - 49, - 46, - 50, - 46, - 52, - 95, - 100, - 101, - 118, - 95, - 49, - 50, - 52, - 95, - 95, - 50, - 48, - 50, - 49, - 95, - 49, - 50, - 95, - 48, - 50, - 32, - 71, - 109, - 97, - 105, - 108, - 32, - 69, - 110, - 99, - 114, - 121, - 112, - 116, - 105, - 111, - 110, - 10, - 67, - 111, - 109, - 109, - 101, - 110, - 116, - 58, - 32, - 83, - 101, - 97, - 109, - 108, - 101, - 115, - 115, - 108, - 121, - 32, - 115, - 101, - 110, - 100, - 32, - 97, - 110, - 100, - 32, - 114, - 101, - 99, - 101, - 105, - 118, - 101, - 32, - 101, - 110, - 99, - 114, - 121, - 112, - 116, - 101, - 100, - 32, - 101, - 109, - 97, - 105, - 108, - 10, - 10, - 109, - 81, - 71, - 78, - 66, - 71, - 71, - 111, - 115, - 101, - 85, - 66, - 68, - 65, - 67, - 43, - 114, - 75, - 104, - 90, - 56, - 110, - 114, - 68, - 115, - 114, - 75, - 68, - 82, - 104, - 51, - 82, - 102, - 83, - 80, - 121, - 119, - 103, - 80, - 107, - 56, - 104, - 110, - 79, - 70, - 80, - 105, - 111, - 97, - 109, - 90, - 70, - 114, - 110, - 47, - 99, - 121, - 83, - 103, - 88, - 65, - 104, - 56, - 50, - 10, - 57, - 103, - 87, - 101, - 119, - 68, - 48, - 89, - 101, - 122, - 83, - 108, - 110, - 79, - 70, - 100, - 49, - 53, - 114, - 102, - 56, - 54, - 85, - 111, - 118, - 72, - 111, - 48, - 83, - 107, - 53, - 112, - 86, - 121, - 97, - 101, - 65, - 86, - 48, - 52, - 115, - 56, - 78, - 102, - 99, - 50, - 115, - 90, - 90, - 90, - 68, - 97, - 121, - 70, - 114, - 50, - 51, - 50, - 47, - 109, - 99, - 75, - 54, - 76, - 10, - 73, - 77, - 57, - 73, - 53, - 85, - 120, - 105, - 114, - 69, - 122, - 83, - 70, - 83, - 72, - 80, - 100, - 86, - 43, - 122, - 67, - 106, - 114, - 57, - 118, - 47, - 54, - 89, - 110, - 53, - 109, - 48, - 97, - 103, - 99, - 49, - 54, - 103, - 54, - 77, - 99, - 109, - 72, - 71, - 109, - 83, - 110, - 79, - 76, - 121, - 77, - 106, - 121, - 57, - 72, - 103, - 57, - 103, - 85, - 67, - 71, - 112, - 77, - 103, - 10, - 90, - 89, - 88, - 83, - 97, - 98, - 56, - 78, - 71, - 69, - 97, - 89, - 121, - 54, - 90, - 53, - 67, - 104, - 97, - 66, - 106, - 83, - 47, - 108, - 53, - 90, - 121, - 101, - 122, - 66, - 85, - 53, - 53, - 47, - 43, - 55, - 99, - 72, - 107, - 73, - 65, - 72, - 89, - 85, - 120, - 109, - 68, - 100, - 89, - 49, - 112, - 111, - 43, - 121, - 50, - 85, - 53, - 67, - 84, - 110, - 97, - 47, - 65, - 98, - 10, - 88, - 68, - 110, - 108, - 88, - 67, - 102, - 104, - 116, - 110, - 84, - 68, - 112, - 75, - 73, - 56, - 113, - 55, - 50, - 68, - 68, - 73, - 78, - 103, - 70, - 57, - 113, - 69, - 121, - 74, - 122, - 87, - 79, - 88, - 51, - 117, - 105, - 119, - 111, - 121, - 87, - 110, - 76, - 85, - 112, - 122, - 109, - 101, - 70, - 71, - 87, - 80, - 82, - 48, - 85, - 115, - 98, - 80, - 52, - 101, - 51, - 85, - 100, - 74, - 10, - 114, - 113, - 78, - 122, - 98, - 70, - 88, - 78, - 76, - 78, - 74, - 83, - 78, - 47, - 69, - 81, - 47, - 50, - 84, - 71, - 115, - 49, - 119, - 98, - 121, - 81, - 50, - 48, - 99, - 115, - 85, - 111, - 69, - 105, - 117, - 65, - 43, - 89, - 49, - 52, - 118, - 110, - 43, - 75, - 99, - 49, - 122, - 106, - 111, - 52, - 89, - 82, - 73, - 66, - 56, - 54, - 49, - 112, - 102, - 55, - 121, - 117, - 100, - 101, - 10, - 66, - 115, - 78, - 79, - 67, - 121, - 43, - 51, - 55, - 74, - 97, - 100, - 55, - 49, - 68, - 76, - 55, - 70, - 76, - 89, - 115, - 66, - 112, - 55, - 47, - 102, - 104, - 71, - 56, - 117, - 43, - 57, - 74, - 67, - 65, - 49, - 101, - 118, - 68, - 66, - 104, - 55, - 70, - 118, - 88, - 74, - 75, - 109, - 97, - 47, - 49, - 116, - 74, - 107, - 68, - 57, - 50, - 108, - 87, - 88, - 87, - 86, - 85, - 99, - 10, - 113, - 82, - 82, - 90, - 100, - 79, - 56, - 52, - 65, - 81, - 88, - 112, - 103, - 88, - 69, - 115, - 74, - 88, - 55, - 68, - 67, - 119, - 108, - 78, - 121, - 47, - 98, - 66, - 109, - 119, - 68, - 88, - 103, - 75, - 56, - 112, - 100, - 73, - 87, - 102, - 68, - 69, - 99, - 66, - 52, - 49, - 55, - 101, - 77, - 120, - 67, - 51, - 81, - 105, - 101, - 104, - 122, - 73, - 86, - 106, - 115, - 103, - 50, - 90, - 10, - 68, - 101, - 113, - 103, - 71, - 86, - 66, - 113, - 66, - 90, - 47, - 52, - 71, - 69, - 99, - 65, - 69, - 81, - 69, - 65, - 65, - 98, - 81, - 107, - 98, - 109, - 57, - 102, - 90, - 87, - 53, - 106, - 99, - 110, - 108, - 119, - 100, - 71, - 108, - 118, - 98, - 108, - 57, - 122, - 100, - 87, - 74, - 114, - 90, - 88, - 108, - 122, - 81, - 71, - 90, - 115, - 98, - 51, - 100, - 106, - 99, - 110, - 108, - 119, - 10, - 100, - 67, - 53, - 48, - 90, - 88, - 78, - 48, - 105, - 81, - 72, - 85, - 66, - 66, - 77, - 66, - 67, - 65, - 65, - 43, - 70, - 105, - 69, - 69, - 87, - 78, - 56, - 104, - 66, - 55, - 108, - 83, - 117, - 106, - 99, - 104, - 112, - 103, - 103, - 97, - 111, - 71, - 117, - 47, - 103, - 113, - 73, - 72, - 115, - 104, - 52, - 70, - 65, - 109, - 71, - 111, - 115, - 101, - 85, - 67, - 71, - 119, - 77, - 70, - 10, - 67, - 81, - 80, - 67, - 90, - 119, - 65, - 70, - 67, - 119, - 107, - 73, - 66, - 119, - 73, - 71, - 70, - 81, - 111, - 74, - 67, - 65, - 115, - 67, - 66, - 66, - 89, - 67, - 65, - 119, - 69, - 67, - 72, - 103, - 69, - 67, - 70, - 52, - 65, - 65, - 67, - 103, - 107, - 81, - 111, - 71, - 117, - 47, - 103, - 113, - 73, - 72, - 115, - 104, - 52, - 72, - 101, - 65, - 118, - 47, - 101, - 72, - 87, - 68, - 10, - 101, - 97, - 75, - 76, - 72, - 121, - 48, - 87, - 43, - 112, - 51, - 52, - 118, - 108, - 55, - 108, - 111, - 98, - 90, - 54, - 110, - 100, - 112, - 90, - 101, - 107, - 67, - 100, - 80, - 56, - 118, - 101, - 50, - 57, - 77, - 116, - 100, - 117, - 52, - 54, - 67, - 83, - 55, - 87, - 53, - 78, - 50, - 117, - 53, - 108, - 84, - 69, - 99, - 100, - 54, - 105, - 114, - 43, - 116, - 113, - 56, - 87, - 66, - 48, - 10, - 54, - 77, - 113, - 90, - 47, - 75, - 114, - 54, - 111, - 49, - 72, - 115, - 86, - 68, - 114, - 115, - 114, - 68, - 101, - 72, - 52, - 112, - 81, - 120, - 78, - 54, - 70, - 122, - 117, - 73, - 89, - 52, - 117, - 105, - 80, - 98, - 121, - 83, - 115, - 73, - 66, - 118, - 121, - 54, - 90, - 76, - 83, - 120, - 106, - 79, - 55, - 85, - 49, - 100, - 97, - 121, - 102, - 65, - 50, - 97, - 57, - 66, - 73, - 71, - 10, - 110, - 74, - 100, - 50, - 87, - 57, - 102, - 89, - 73, - 115, - 121, - 113, - 111, - 107, - 85, - 88, - 100, - 88, - 43, - 48, - 109, - 43, - 83, - 111, - 89, - 73, - 86, - 103, - 108, - 76, - 85, - 118, - 69, - 74, - 90, - 98, - 90, - 78, - 75, - 73, - 52, - 111, - 78, - 101, - 112, - 82, - 85, - 55, - 51, - 103, - 121, - 75, - 77, - 98, - 85, - 57, - 72, - 81, - 78, - 57, - 109, - 118, - 80, - 82, - 10, - 102, - 67, - 112, - 105, - 103, - 80, - 104, - 43, - 120, - 80, - 111, - 105, - 97, - 102, - 103, - 119, - 70, - 49, - 99, - 80, - 68, - 108, - 50, - 100, - 114, - 71, - 99, - 66, - 90, - 79, - 69, - 53, - 72, - 55, - 76, - 84, - 99, - 121, - 73, - 70, - 75, - 113, - 72, - 56, - 115, - 70, - 77, - 68, - 105, - 90, - 82, - 66, - 55, - 87, - 101, - 114, - 113, - 47, - 117, - 70, - 69, - 120, - 53, - 118, - 10, - 107, - 50, - 105, - 117, - 48, - 68, - 57, - 97, - 47, - 99, - 90, - 71, - 69, - 43, - 85, - 86, - 116, - 111, - 86, - 111, - 107, - 48, - 114, - 65, - 70, - 71, - 105, - 50, - 81, - 116, - 82, - 105, - 120, - 68, - 99, - 102, - 101, - 43, - 119, - 113, - 54, - 48, - 85, - 102, - 106, - 67, - 82, - 66, - 79, - 98, - 70, - 108, - 66, - 85, - 103, - 118, - 108, - 49, - 72, - 73, - 83, - 108, - 87, - 69, - 10, - 48, - 67, - 53, - 80, - 54, - 72, - 67, - 108, - 72, - 113, - 113, - 122, - 104, - 98, - 114, - 56, - 90, - 98, - 107, - 84, - 118, - 78, - 113, - 101, - 82, - 51, - 97, - 101, - 50, - 78, - 98, - 105, - 121, - 49, - 73, - 109, - 86, - 56, - 117, - 76, - 100, - 82, - 78, - 90, - 70, - 114, - 116, - 79, - 103, - 118, - 116, - 70, - 97, - 54, - 103, - 106, - 115, - 122, - 115, - 71, - 69, - 48, - 70, - 88, - 10, - 119, - 82, - 116, - 74, - 80, - 57, - 97, - 121, - 121, - 48, - 50, - 121, - 80, - 114, - 112, - 77, - 122, - 77, - 107, - 118, - 51, - 52, - 65, - 112, - 69, - 121, - 53, - 43, - 48, - 55, - 119, - 79, - 82, - 84, - 98, - 97, - 67, - 115, - 97, - 87, - 100, - 122, - 75, - 115, - 89, - 79, - 74, - 73, - 120, - 108, - 109, - 120, - 51, - 101, - 66, - 65, - 84, - 114, - 103, - 78, - 106, - 86, - 83, - 111, - 10, - 82, - 116, - 48, - 113, - 103, - 99, - 117, - 67, - 54, - 67, - 69, - 109, - 86, - 43, - 106, - 109, - 65, - 87, - 117, - 114, - 73, - 70, - 110, - 100, - 89, - 108, - 112, - 47, - 65, - 74, - 89, - 121, - 74, - 90, - 57, - 74, - 89, - 109, - 56, - 74, - 108, - 66, - 74, - 104, - 108, - 116, - 107, - 99, - 68, - 83, - 120, - 121, - 104, - 90, - 114, - 85, - 89, - 111, - 102, - 52, - 10, - 61, - 48, - 89, - 105, - 87, - 10, - 45, - 45, - 45, - 45, - 45, - 69, - 78, - 68, - 32, - 80, - 71, - 80, - 32, - 80, - 85, - 66, - 76, - 73, - 67, - 32, - 75, - 69, - 89, - 32, - 66, - 76, - 79, - 67, - 75, - 45, - 45, - 45, - 45, - 45, - 10 - ], + "publicKey": [], "recipient": "no_encryption_subkeys@flowcrypt.test" } ], @@ -1532,5 +106,13 @@ "uid": 29, "uidAsHEX": "1d" }, + "verificationResult": { + "isEncrypted": false, + "isSigned": false, + "hasMixedSignatures": false, + "isPartialSigned": false, + "hasUnverifiedSignatures": false, + "hasBadSignatures": false + }, "text": "This message has an attached pub key that has no suitable encryption subkeys" } diff --git a/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_encrypted_signed.txt b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_encrypted_signed.txt new file mode 100644 index 0000000000..7db7ef8829 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_encrypted_signed.txt @@ -0,0 +1,39 @@ +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id 7exvFh9ps2HaCAAAc/RpdQ + (envelope-from ) + for ; Fri, 10 Dec 2021 14:50:07 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 593256C1E68 + for ; Fri, 10 Dec 2021 14:50:07 +0000 (UTC) +Date: Fri, 10 Dec 2021 16:50:05 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <80534408.1.1639147805211@flowcrypt.test> +Subject: Encrypted + signed(Inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_85360913.1639147805127" + +------=_Part_0_85360913.1639147805127 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdA3AUBbNBYHs7uBkHYPB2MScrOjyjr8H3uUHD/oV66NRUw +QwHSwqj/w5Zh1TIyCNPrL+5CHKw6AWoxf/tueiN7k18lxhrrrK2G4YcmW2IxhAD0 +hF4D16Pe22XLHvsSAQdADdHH+j+A9Vl8dYDlQLewJrBsDqoLXtL3C9qvSVBXo0Aw +zxk+hWPctb9Zuu9kexEZao2sA7CkyQIVuoX++toxpuUH2cnM2tMx2wdOsqk/b80u +0sASASXoL13FL1aRfUmJti8FXjwK7pu7sR7EOXq1dqVfuDRWT1PICa3cJRvTZbe1 +jsePedNvt74GsllnaoZykqcWoEfiEL0CvU796P60+CBpsxQ304rO9G41P1a9CtvR +OTAwOd+ZcfypPoNGQuw90TY/678yq03RROZMiZvHa96UqYPHjdo5q/7RjZVVde7k +JGplAW7C9+93vjJ8tl328hYItBpPF26dQB+AHMIz/AND0MwbnUEdJyPs9AGoVeak +xjaRjpUqh3BDc+mdxXlztNVdmRFQ +=YZEj +-----END PGP MESSAGE----- + +------=_Part_0_85360913.1639147805127-- diff --git a/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_encrypted_signed_mixed.txt b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_encrypted_signed_mixed.txt new file mode 100644 index 0000000000..61b8b913d5 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_encrypted_signed_mixed.txt @@ -0,0 +1,53 @@ +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id hynLJ+votmFNBwAAc/RpdQ + (envelope-from ) + for ; Mon, 13 Dec 2021 06:32:11 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 9F6B67E0E3C + for ; Mon, 13 Dec 2021 06:32:11 +0000 (UTC) +Date: Sat, 11 Dec 2021 14:47:14 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <110314482.1.1639226834163@flowcrypt.test> +Subject: Encrypted + signed mixed(inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_150365359.1639226834147" + +------=_Part_0_150365359.1639226834147 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAyDv4lT7yZwY+k7XTngGbM9R3TSIDfJ05jjPtP1tgVhww +Ow986yKDq8RwNwRuOP+Zetgzv3Rueds53oH6WubsfFbkfqDddSuxbivSPMaJrsEa +hF4D16Pe22XLHvsSAQdAm0JxdCnyvGhOwCeljYCmXnnR6bd7sfxTpHbiBN5eiUYw +vXWpjLvybfnbIwMFOkYJY7xLi0nbiMG4GYKTUzy1UZYezPlig0CN65zXmQtwSX+I +0sAXAXZTOnpBBAC7adCCn98X8ym6EhabfV/Kxtk54zNP4/E2tEs88G3eKRHAcFYA +dsSRpd6fbQ+Od+2MxRr29gKdH/IMk+zuhg4K45HEu24039/1KyV31g+L35A9764A +yxGwyMw816TcSK4Rfx3ZdRc4gxRy1chCLf9QDlTowDiaiAk14ntfqqUOZTUj+OcV +80bEHI8VxTs1KPgqHvt0dOkSQBJzLk/4OlqOhoRBTJq2TBaP2iBlO4/MMKlhG4NG +ubaIKDKh/tfhMteAfWE52yiz3htm980akzc= +=rudy +-----END PGP MESSAGE----- + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdArBX9SbPgfhP9wqWOBFvkfDKBxszXMVfDrmKr31dNOh8w +tOprLXmSEJw6YwEIqAXByU/olv90UG7sEmIkI7J6AEmyFOkSDokJPAQrpU9Umcum +hF4DdhH7TgaiP74SAQdANFfZyN86QhSBkh5ywThUC/nNmQlkIUJ2pEuCF7IEKAIw +4xVCdmdRlEltVVP4K7OnGme3nQEmnANDXdZ69HQJYUSMsgFWB3HkFJ/iqM4b3TNe +0sAXATT2v+7RWASJS/tLN1a2XEMy+ybwNremGO0IPo8ji9EQOcFaD029OvMdq2C+ +AHXxBqmi1hcnn2CuLVyAOWh5bj0VJSKuMsgx1yDMpYItfuhTLs0dQ1JA93dJCfi2 +7r6ueKx5eDv5y6hr3thNn+ctOF0r7CDOZWtE5oznOErmmg05Q+nGMJzN85kGV6mj +1cmYEq6/sVjYf6J+iYFVkywdY7ne+FBHjJ0cX4JEmvy4SCfO51cM+cGzFtup+a6P +afd0d2jaJS9rkgbmS4VMtGIlfrCMIOhl6ws= +=1cM4 +-----END PGP MESSAGE----- +------=_Part_0_150365359.1639226834147-- diff --git a/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_encrypted_signed_partially.txt b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_encrypted_signed_partially.txt new file mode 100644 index 0000000000..151ddf4365 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_encrypted_signed_partially.txt @@ -0,0 +1,51 @@ +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id U5V7IRCPtGGABQAAc/RpdQ + (envelope-from ) + for ; Sat, 11 Dec 2021 11:44:16 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 85B8C7E0A66 + for ; Sat, 11 Dec 2021 11:44:16 +0000 (UTC) +Date: Sat, 11 Dec 2021 13:44:14 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <18216133.1.1639223054277@flowcrypt.test> +Subject: Encrypted + signed partially(inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_233169424.1639223054262" + +------=_Part_0_233169424.1639223054262 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAk9cJSvMdCEy720HDusXhkyPPueKN/lCJs7a+9ZipNkMw +t7kWnNV1GPawCh2AO4tsQAglt05gXfMVp6KZuobhOzAo8ejsFZ8l6NrmD9GkSKgk +hF4D16Pe22XLHvsSAQdAYZljKw41PYIeGNnPxbXXj+fMEVZ7r95/jGx24PiL2nsw +2mxZJ0IFqejwD1EtWWHGdCvQJq9hRE3xGUqG5KutLvFP70rZr7ohNzEZW3g8hIl7 +0sAOAZdOkq7hFd+2edSp6QoBo08lCtGPZ99uWjZMJ2O0xlrzXQHHfiKo29jLE4dd +QSLDkAEe6NFeGxFFtETWipOL/a7spfrSuGhC6irfR6kVVlvloMDGJQqdMyaJx/6r +JA68fo+lcMeN198b471AMPnMfzuhh5UnudeKfTsP4G/phi+PFPdVCyvbCPVCfzC/ +1SwnbFOfc3HzjDqy61i1L44qDuEIXe2DKQqRvKOcWcUjiHM5/v+oGaqTrzINmvMA +XoGVOoniX+yu/7XfbhKbybw= +=SzXS +-----END PGP MESSAGE----- + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4D16Pe22XLHvsSAQdALlp3UOL9wBsSRF3uIEH5imchVNuITE2KqoJdMtKRq1Ew ++1jecnPqy2r3gsk2ixXt53R/oqyleCaCa05WwQH2jvOlJBLYDSaG0nvPTXGYhFD1 +hF4DTxRYvSK3u1MSAQdAxmUBg1MOvPSKFfVE5UraFUX5hzEIOo/IBxoGt6mfTC4w +DihowFXP5XlePFtr3z7M/R00Wkmw/TAa+fukqjLTFrYIuacQW1gTiEYfOOif8V4d +0k0BBHpU9I+AK/yYkkSdhW3C4JowbvOYvOFFtq5z+2/4jrZGgGmiydLBQ+ASCJTW +5LoxisOo1ZWXU5GyhEsUfGWomTmIqdHPr6QOxEZmDw== +=jl09 +-----END PGP MESSAGE----- + +------=_Part_0_233169424.1639223054262-- diff --git a/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_missing_pub_key_encrypted_signed.txt b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_missing_pub_key_encrypted_signed.txt new file mode 100644 index 0000000000..faa40dba21 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_missing_pub_key_encrypted_signed.txt @@ -0,0 +1,39 @@ +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id KrPbA9hLt2FtDgAAc/RpdQ + (envelope-from ) + for ; Mon, 13 Dec 2021 13:34:16 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 0C05F84061C + for ; Mon, 13 Dec 2021 13:34:16 +0000 (UTC) +Date: Mon, 13 Dec 2021 15:34:13 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <176319358.1.1639402453750@flowcrypt.test> +Subject: Encrypted + signed(inband) + no pub key +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_123085323.1639402453729" + +------=_Part_0_123085323.1639402453729 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAtdnv+F2LD9GVA09dGxdtNXp9XOUNildn0KoRRyfS71Yw +oz40WsLIOFiq24WAnkZaig3mh3ZIZPH30CpNG6D50xJgH87vhlHr8KMc/UKCD8HT +hF4D16Pe22XLHvsSAQdAdmfEzaR46pX8T/DSVrKmGPlxKWaS/GYPCJbHwa1/8hsw +QpKP7zTwoRGg+OC01wgviQjaHehQ5PHCcgF92js19ipqeK0nZ6NumYBhuReeTn0j +0sBPATC6XlUcftJVv3oydls4C8Mpu+KK+fFvsgaZY5QeoLttl07GfRQMqPhpb6wb +5sEKrS0QTpxzAth07Ow22cETz+BYbxkVmbube82CBNwkiv8jF05expxtLdAUTSc4 +p9/hKUSFAXP/a4x5ce7ImZ8IeBftDfD1UjCvL/vPqhGfuPg/ObAPAIk4vs6K8yGW +0ub67smJCF6x3rTeYWJHtZA2w3aYX332klhyWWyyvq4EhfkViNCbch0gkBvrqxd0 +hIoSRW4Tg/SzbTNbwvoojwB4Qn/NKj6tG+/NCXsNoCaAW24oCpJC+J5CUUbHVH3O +Ru2kYMZ0/G0F3zplBJ+UdNl3edCVuOsYKosqA251SpbBhw== +=52uO +-----END PGP MESSAGE----- +------=_Part_0_123085323.1639402453729-- diff --git a/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_missing_pub_key_only_signed.txt b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_missing_pub_key_only_signed.txt new file mode 100644 index 0000000000..3fff000586 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_missing_pub_key_only_signed.txt @@ -0,0 +1,34 @@ +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id 7nTaL3JMt2EwEQAAc/RpdQ + (envelope-from ) + for ; Mon, 13 Dec 2021 13:36:50 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id C0AAD84061F + for ; Mon, 13 Dec 2021 13:36:50 +0000 (UTC) +Date: Mon, 13 Dec 2021 15:36:48 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <2967984.1.1639402608568@flowcrypt.test> +Subject: NOT encrypted + signed(inband) + no pub key +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_15474263.1639402608553" + +------=_Part_0_15474263.1639402608553 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCX2jaFz8aOWw08ZT6cnMYCAZ4l6sUKiQlFqemlOYpFCbmpxcWJ6qkJJ +RmKJQnlisUJxZnpeaopCeWZJBlBZeVF+XrpCQVFmWWJJqkJ2aqWeQnBqXkpqkUJi +XgpELZBZlKqQkpmWllqUmlei11HKwiDGxcDGypS4pfkigyKnAMwNYoosHXsObGz8 +luG6RyfyAkx4oz8jw8yK2S9W5S19cGL2MsGt7+3eVS0MPiv4Zp367xdLbDUKb0xn ++O+T+pZxU/QMpfK1GqsbxbL2eXkEq9kvZjlr4FvM3tH7kBEA +=BWVd +-----END PGP MESSAGE----- +------=_Part_0_15474263.1639402608553-- diff --git a/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_encrypted.txt b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_encrypted.txt new file mode 100644 index 0000000000..ecb7f90546 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_encrypted.txt @@ -0,0 +1,36 @@ +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id F6uPOgJos2GyAwAAc/RpdQ + (envelope-from ) + for ; Fri, 10 Dec 2021 14:45:22 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id EC1CC6C1E67 + for ; Fri, 10 Dec 2021 14:45:22 +0000 (UTC) +Date: Fri, 10 Dec 2021 16:44:37 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <36760296.1.1639147477268@flowcrypt.test> +Subject: Encrypted + NOT signed +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_143475953.1639147477209" + +------=_Part_0_143475953.1639147477209 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4D16Pe22XLHvsSAQdApkbDtf6GMhbUdIG8lbA1xVidfOw1xw90yYMKSeUd1lMw +HIPCm32G4OnJFEgSodLZGIjLXAR98YlPANHx8CI12avC5FzWQrbhegmdhnHzw/Ti +hF4DTxRYvSK3u1MSAQdAur1cw4tCsoeoQm4vzslmw+Nr57fIj0rkhhzVnaM/IBYw +MGUnTXLXmjvVnGKb5XZHmpkybOFMtXrZKvddQfJ+uY5BAevGDCCLeJySGceMbDta +0k0B7jC+C2ZeZdJzFcvzhotQDWSM2YOvRNKA0BkMyVsJabUKY1xExidzBQnK5HSp +Ru9HZjZJZTsBnbji9GwvfvgMXlc9LxP53hLdW6lszA== +=xJjg +-----END PGP MESSAGE----- + +------=_Part_0_143475953.1639147477209-- diff --git a/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_signed.txt b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_signed.txt new file mode 100644 index 0000000000..8d03dc4a1b --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_signed.txt @@ -0,0 +1,34 @@ +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id Mv2+B99os2GuBwAAc/RpdQ + (envelope-from ) + for ; Fri, 10 Dec 2021 14:49:03 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 1C4DA6C1E68 + for ; Fri, 10 Dec 2021 14:49:03 +0000 (UTC) +Date: Fri, 10 Dec 2021 16:49:00 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <124374216.1.1639147740952@flowcrypt.test> +Subject: NOT encrypted + signed(Inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_176969482.1639147740896" + +------=_Part_0_176969482.1639147740896 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCV2WKHzbNaPa+cYT2skMYCAZ4l6sUJxZnpeaoqChmdeUmJeiqZCfl5O +pUJuanFxYnqqXkcpC4MYFwMbK1Pi5ow7DIqcAjBDxBRZDqZoXGM8bWneeT7xCkz4 +7ENGhitGLy5tuiSTY85ues+ItWT7wT2CITKucV8OHVkQ9ePp+xSG/2W/Nm2fzvZ0 ++k4VL8PMqSYF12u0TkrKFsRfvRAooudkzgQA +=c6F0 +-----END PGP MESSAGE----- + +------=_Part_0_176969482.1639147740896-- diff --git a/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_signed_mixed.txt b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_signed_mixed.txt new file mode 100644 index 0000000000..5cac1e9a50 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_signed_mixed.txt @@ -0,0 +1,43 @@ +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id Q6lDHJTqtmGyDgAAc/RpdQ + (envelope-from ) + for ; Mon, 13 Dec 2021 06:39:16 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 708E07E22DC + for ; Mon, 13 Dec 2021 06:39:16 +0000 (UTC) +Date: Sat, 11 Dec 2021 14:54:18 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <178316538.1.1639227258998@flowcrypt.test> +Subject: NOT encrypted + signed mixed(inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_254081431.1639227258976" + +------=_Part_0_254081431.1639227258976 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCV2WKHzbNaPa+cYT8snMYBAcGZ6XmqKQnlmSYZCokJBUWZuYlGlQnZq +ZUcpC4MYFwMbK1Pi1uf+DIqcAjC9YoosB1M0rjGetjTvPJ94BSZsw8vwV2r5jx3K +D09YX2YxmXdpntcL7iO8J4vT5asfPUv6f+iMRDojwyG9s+lHxOMUJ60VP6tl/sjr +Kedlni+bmO2MptWmXQj0YQMA +=usCN +-----END PGP MESSAGE----- + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCXWaL/vvdiErcGMpxWSGEAgODM9LzVFoTyzJEOhJCNVoTg1OT8vRSE7 +tbKjlIVBjIuBjZUpcevzDwyKnAIwzWKKLHfMHwmFMAmaprieNocJp/Uy/A/MjTzK +N9UkpXLTg0dXFFasM5wQxT93ufHj+o9hhzuO97YxMlwwsG+6lNHn4xkilcwbmmhx +/ernRzJH7rFaPLM7d/zlHj4A +=Yz2p +-----END PGP MESSAGE----- +------=_Part_0_254081431.1639227258976-- diff --git a/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_signed_partially.txt b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_signed_partially.txt new file mode 100644 index 0000000000..2854dbd7c5 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/messages/mime/signature_verification_inband_only_signed_partially.txt @@ -0,0 +1,36 @@ +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id bfJgJ8ePtGHDCAAAc/RpdQ + (envelope-from ) + for ; Sat, 11 Dec 2021 11:47:19 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 9DF3F7E0A69 + for ; Sat, 11 Dec 2021 11:47:19 +0000 (UTC) +Date: Sat, 11 Dec 2021 13:47:17 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <134516345.1.1639223237410@flowcrypt.test> +Subject: NOT encrypted + signed partially(inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_104860116.1639223237396" + +------=_Part_0_104860116.1639223237396 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +Some plain text + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCV2WKHzbNaPa+cYT0smMYCAf15OpUJxZnpeaopCbmpxcWJ6akcpC4MY +FwMbK1Pilt7tDIqcAjBdYoosB1M0rjGetjTvPJ94BSZ8iZmR4cTMG9aGhvM/T7z3 +ceaf7VPS4l55x0m3eXiIXqm71HX8sQcjw7/JfNKsbvpM+sH6siuTFmrfPrjCsp+J +VTNI6HmdjMpMVgA= +=4Gih +-----END PGP MESSAGE----- + +------=_Part_0_104860116.1639223237396-- diff --git a/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_prv_strong.asc b/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_prv_strong_primary.asc similarity index 100% rename from FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_prv_strong.asc rename to FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_prv_strong_primary.asc diff --git a/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_prv_strong_second.asc b/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_prv_strong_second.asc new file mode 100644 index 0000000000..af36b49b41 --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_prv_strong_second.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP PRIVATE KEY BLOCK----- +Version: PGPainless + +lIYEYbXg9xYJKwYBBAHaRw8BAQdAjU9kv9cb0xfBXcXQrYUlqG2eiwGsohMYotN4 +CpAebUr+CQMCDH1gBMQ0PxVgYuhn3lmmt9BUJFB6AO/KkNvVOHswGdKYmfD8cIPH +yh57/11cO+uImNLQCJDvm88qCwYg5Bdd+UEa7nFhTwmHce9evrCfK7QXZGVuYm9u +ZDdAZmxvd2NyeXB0LnRlc3SIeAQTFgoAIAUCYbXg9wIbAwUWAgMBAAUVCgkICwQL +CQgHAh4BAhkBAAoJEIE/vu8WkLVTVH4A/1SwDUMznNrTPTAhZCCNTQGEP2fvlL7Y +hSZ+YQglVPeyAQCQOwW7Xo0nGzGunnPZfZK3oEMWo0yiWCHLRVkFlb3HCpyLBGG1 +4PcSCisGAQQBl1UBBQEBB0DHDqFonIH6bVQHdEI2zApC8FoB4Vus9DVwbseb9aUg +QAMBCAf+CQMCDH1gBMQ0PxVgOeMvXYhjqkQReahybagjEVVknNBPWbn8wWIwVVV9 +Q+s8gmFATu9C3DW9QFbqtwwyR7rp66qXVVcRCzcU3KqMThc56MK43Ih1BBgWCgAd +BQJhteD3AhsMBRYCAwEABRUKCQgLBAsJCAcCHgEACgkQgT++7xaQtVMmjQD+MFs1 +ll4eD+arY/6nBDD31Q60ZuU3Tz6V/2EwVQZBnVcA/RNlFaw+7GLxhtqQKOk0HsmE +4gcvw7Tug9ws/9TdBBMH +=2xMu +-----END PGP PRIVATE KEY BLOCK----- diff --git a/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_pub.asc b/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_pub_primary.asc similarity index 100% rename from FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_pub.asc rename to FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_pub_primary.asc diff --git a/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_pub_second.asc b/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_pub_second.asc new file mode 100644 index 0000000000..6aa5ce047f --- /dev/null +++ b/FlowCrypt/src/androidTest/assets/pgp/denbond7@flowcrypt.test_pub_second.asc @@ -0,0 +1,13 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: PGPainless + +mDMEYbXg9xYJKwYBBAHaRw8BAQdAjU9kv9cb0xfBXcXQrYUlqG2eiwGsohMYotN4 +CpAebUq0F2RlbmJvbmQ3QGZsb3djcnlwdC50ZXN0iHgEExYKACAFAmG14PcCGwMF +FgIDAQAFFQoJCAsECwkIBwIeAQIZAQAKCRCBP77vFpC1U1R+AP9UsA1DM5za0z0w +IWQgjU0BhD9n75S+2IUmfmEIJVT3sgEAkDsFu16NJxsxrp5z2X2St6BDFqNMolgh +y0VZBZW9xwq4OARhteD3EgorBgEEAZdVAQUBAQdAxw6haJyB+m1UB3RCNswKQvBa +AeFbrPQ1cG7Hm/WlIEADAQgHiHUEGBYKAB0FAmG14PcCGwwFFgIDAQAFFQoJCAsE +CwkIBwIeAQAKCRCBP77vFpC1UyaNAP4wWzWWXh4P5qtj/qcEMPfVDrRm5TdPPpX/ +YTBVBkGdVwD9E2UVrD7sYvGG2pAo6TQeyYTiBy/DtO6D3Cz/1N0EEwc= +=WuSJ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/CustomMatchers.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/CustomMatchers.kt index c823c27236..61cab3ee61 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/CustomMatchers.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/CustomMatchers.kt @@ -7,9 +7,11 @@ package com.flowcrypt.email.matchers import android.view.View import android.widget.ListView +import androidx.recyclerview.widget.RecyclerView import androidx.test.espresso.Root import androidx.test.espresso.matcher.BoundedMatcher import com.flowcrypt.email.api.email.model.SecurityType +import com.flowcrypt.email.ui.adapter.PgpBadgeListAdapter import com.flowcrypt.email.ui.widget.PGPContactChipSpan import com.google.android.material.appbar.AppBarLayout import com.hootsuite.nachos.NachoTextView @@ -106,6 +108,10 @@ class CustomMatchers { return NachoTextViewChipBackgroundColorMatcher(chipText, backgroundColor) } + fun withPgpBadge(pgpBadge: PgpBadgeListAdapter.PgpBadge): PgpBadgeMatcher { + return PgpBadgeMatcher(pgpBadge) + } + fun isToast(): BaseMatcher { return ToastMatcher() } diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/PgpBadgeMatcher.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/PgpBadgeMatcher.kt new file mode 100644 index 0000000000..04d4ef0004 --- /dev/null +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/PgpBadgeMatcher.kt @@ -0,0 +1,30 @@ +/* + * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com + * Contributors: DenBond7 + */ + +package com.flowcrypt.email.matchers + +import androidx.recyclerview.widget.RecyclerView +import androidx.test.espresso.matcher.BoundedMatcher +import com.flowcrypt.email.ui.adapter.PgpBadgeListAdapter +import org.hamcrest.Description + +/** + * @author Denis Bondarenko + * Date: 12/14/21 + * Time: 10:33 AM + * E-mail: DenBond7@gmail.com + */ +class PgpBadgeMatcher(private val pgpBadge: PgpBadgeListAdapter.PgpBadge) : + BoundedMatcher( + PgpBadgeListAdapter.ViewHolder::class.java + ) { + override fun matchesSafely(holder: PgpBadgeListAdapter.ViewHolder): Boolean { + return holder.badgeType == pgpBadge.type + } + + override fun describeTo(description: Description) { + description.appendText("with: $pgpBadge") + } +} diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityPassphraseInRamTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityPassphraseInRamTest.kt index 77a22fbde6..6639026aef 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityPassphraseInRamTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityPassphraseInRamTest.kt @@ -29,7 +29,7 @@ import com.flowcrypt.email.rules.AddPrivateKeyToDatabaseRule import com.flowcrypt.email.rules.ClearAppSettingsRule import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule -import com.flowcrypt.email.security.pgp.PgpDecrypt +import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify import com.flowcrypt.email.ui.activity.base.BaseMessageDetailsActivityTest import com.flowcrypt.email.util.GeneralUtil import com.flowcrypt.email.util.PrivateKeysManager @@ -78,7 +78,10 @@ class MessageDetailsActivityPassphraseInRamTest : BaseMessageDetailsActivityTest val decryptErrorMsgBlock = incomingMsgInfo.msgBlocks?.get(1) as DecryptErrorMsgBlock val decryptError = decryptErrorMsgBlock.decryptErr!! - assertEquals(PgpDecrypt.DecryptionErrorType.NEED_PASSPHRASE, decryptError.details?.type) + assertEquals( + PgpDecryptAndOrVerify.DecryptionErrorType.NEED_PASSPHRASE, + decryptError.details?.type + ) //check error message val errorMsg = getResString( diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityTest.kt index 4275a31990..2e620eab1d 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/MessageDetailsActivityTest.kt @@ -24,6 +24,7 @@ import androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent import androidx.test.espresso.matcher.BoundedMatcher import androidx.test.espresso.matcher.RootMatchers import androidx.test.espresso.matcher.ViewMatchers.assertThat +import androidx.test.espresso.matcher.ViewMatchers.hasSibling import androidx.test.espresso.matcher.ViewMatchers.isChecked import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import androidx.test.espresso.matcher.ViewMatchers.withId @@ -43,6 +44,8 @@ import com.flowcrypt.email.junit.annotations.NotReadyForCI import com.flowcrypt.email.matchers.CustomMatchers import com.flowcrypt.email.matchers.CustomMatchers.Companion.withDrawable import com.flowcrypt.email.matchers.CustomMatchers.Companion.withEmptyRecyclerView +import com.flowcrypt.email.matchers.CustomMatchers.Companion.withPgpBadge +import com.flowcrypt.email.matchers.CustomMatchers.Companion.withRecyclerViewItemCount import com.flowcrypt.email.model.KeyImportDetails import com.flowcrypt.email.rules.AddPrivateKeyToDatabaseRule import com.flowcrypt.email.rules.ClearAppSettingsRule @@ -50,12 +53,14 @@ import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.base.BaseMessageDetailsActivityTest import com.flowcrypt.email.ui.adapter.MsgDetailsRecyclerViewAdapter +import com.flowcrypt.email.ui.adapter.PgpBadgeListAdapter import com.flowcrypt.email.util.DateTimeUtil import com.flowcrypt.email.util.GeneralUtil import com.flowcrypt.email.util.PrivateKeysManager import com.flowcrypt.email.util.TestGeneralUtil import org.hamcrest.Description import org.hamcrest.Matcher +import org.hamcrest.Matchers.allOf import org.hamcrest.Matchers.anyOf import org.hamcrest.Matchers.anything import org.hamcrest.Matchers.containsString @@ -365,7 +370,7 @@ class MessageDetailsActivityTest : BaseMessageDetailsActivityTest() { baseCheckWithAtt(msgInfo, pubKeyAttInfo) val pgpKeyDetails = - PrivateKeysManager.getPgpKeyDetailsFromAssets("pgp/denbond7@flowcrypt.test_pub.asc") + PrivateKeysManager.getPgpKeyDetailsFromAssets("pgp/denbond7@flowcrypt.test_pub_primary.asc") val email = requireNotNull(pgpKeyDetails.getPrimaryInternetAddress()).address onView(withId(R.id.textViewKeyOwnerTemplate)).check( matches(withText(getResString(R.string.template_message_part_public_key_owner, email))) @@ -451,7 +456,7 @@ class MessageDetailsActivityTest : BaseMessageDetailsActivityTest() { .perform(scrollTo(), click()) onView(withId(R.id.rVMsgDetails)) .check(matches(isDisplayed())) - .check(matches(CustomMatchers.withRecyclerViewItemCount(5))) + .check(matches(withRecyclerViewItemCount(5))) onView(withId(R.id.rVMsgDetails)) .perform( @@ -620,7 +625,7 @@ class MessageDetailsActivityTest : BaseMessageDetailsActivityTest() { ) baseCheck(msgInfo) - onView(withId(R.id.textViewStatus)) + onView(allOf(withId(R.id.textViewStatus), hasSibling(withId(R.id.switchShowPublicKey)))) .check(matches(withText(getResString(R.string.cannot_be_used_for_encryption)))) onView(withId(R.id.buttonKeyAction)) .check(matches(not(isDisplayed()))) @@ -628,6 +633,153 @@ class MessageDetailsActivityTest : BaseMessageDetailsActivityTest() { .check(matches(not(isDisplayed()))) } + @Test + fun testSignatureVerificationInbandMissingPubKeyEncryptedAndSigned() { + val msgInfo = getMsgInfo( + "messages/info/signature_verification_inband_missing_pub_key_encrypted_signed.json", + "messages/mime/signature_verification_inband_missing_pub_key_encrypted_signed.txt" + ) + baseCheck(msgInfo) + + testPgpBadges( + 2, + PgpBadgeListAdapter.PgpBadge.Type.ENCRYPTED, + PgpBadgeListAdapter.PgpBadge.Type.CAN_NOT_VERIFY_SIGNATURE + ) + } + + @Test + fun testSignatureVerificationInbandMissingPubKeyOnlySigned() { + val msgInfo = getMsgInfo( + "messages/info/signature_verification_inband_missing_pub_key_only_signed.json", + "messages/mime/signature_verification_inband_missing_pub_key_only_signed.txt" + ) + baseCheck(msgInfo) + + testPgpBadges( + 2, + PgpBadgeListAdapter.PgpBadge.Type.NOT_ENCRYPTED, + PgpBadgeListAdapter.PgpBadge.Type.CAN_NOT_VERIFY_SIGNATURE + ) + } + + @Test + fun testSignatureVerificationInbandOnlySignedMixed() { + PrivateKeysManager.savePubKeyToDatabase("pgp/denbond7@flowcrypt.test_pub_primary.asc") + PrivateKeysManager.savePubKeyToDatabase("pgp/denbond7@flowcrypt.test_pub_second.asc") + val msgInfo = getMsgInfo( + "messages/info/signature_verification_inband_only_signed_mixed.json", + "messages/mime/signature_verification_inband_only_signed_mixed.txt" + ) + baseCheck(msgInfo) + + testPgpBadges( + 2, + PgpBadgeListAdapter.PgpBadge.Type.NOT_ENCRYPTED, + PgpBadgeListAdapter.PgpBadge.Type.MIXED_SIGNED + ) + } + + @Test + fun testSignatureVerificationInbandEncryptedAndSignedMixed() { + PrivateKeysManager.savePubKeyToDatabase("pgp/denbond7@flowcrypt.test_pub_primary.asc") + PrivateKeysManager.savePubKeyToDatabase("pgp/denbond7@flowcrypt.test_pub_second.asc") + val msgInfo = getMsgInfo( + "messages/info/signature_verification_inband_encrypted_signed_mixed.json", + "messages/mime/signature_verification_inband_encrypted_signed_mixed.txt" + ) + baseCheck(msgInfo) + + testPgpBadges( + 2, + PgpBadgeListAdapter.PgpBadge.Type.ENCRYPTED, + PgpBadgeListAdapter.PgpBadge.Type.MIXED_SIGNED + ) + } + + @Test + fun testSignatureVerificationInbandOnlySignedPartially() { + PrivateKeysManager.savePubKeyToDatabase("pgp/denbond7@flowcrypt.test_pub_primary.asc") + + val msgInfo = getMsgInfo( + "messages/info/signature_verification_inband_only_signed_partially.json", + "messages/mime/signature_verification_inband_only_signed_partially.txt" + ) + baseCheck(msgInfo) + + testPgpBadges( + 2, + PgpBadgeListAdapter.PgpBadge.Type.NOT_ENCRYPTED, + PgpBadgeListAdapter.PgpBadge.Type.ONLY_PARTIALLY_SIGNED + ) + } + + @Test + fun testSignatureVerificationInbandEncryptedSignedPartially() { + PrivateKeysManager.savePubKeyToDatabase("pgp/denbond7@flowcrypt.test_pub_primary.asc") + + val msgInfo = getMsgInfo( + "messages/info/signature_verification_inband_encrypted_signed_partially.json", + "messages/mime/signature_verification_inband_encrypted_signed_partially.txt" + ) + baseCheck(msgInfo) + + testPgpBadges( + 2, + PgpBadgeListAdapter.PgpBadge.Type.ENCRYPTED, + PgpBadgeListAdapter.PgpBadge.Type.ONLY_PARTIALLY_SIGNED + ) + } + + @Test + fun testSignatureVerificationInbandEncryptedSigned() { + PrivateKeysManager.savePubKeyToDatabase("pgp/denbond7@flowcrypt.test_pub_primary.asc") + + val msgInfo = getMsgInfo( + "messages/info/signature_verification_inband_encrypted_signed.json", + "messages/mime/signature_verification_inband_encrypted_signed.txt" + ) + baseCheck(msgInfo) + + testPgpBadges( + 2, + PgpBadgeListAdapter.PgpBadge.Type.ENCRYPTED, + PgpBadgeListAdapter.PgpBadge.Type.SIGNED + ) + } + + @Test + fun testSignatureVerificationInbandOnlySigned() { + PrivateKeysManager.savePubKeyToDatabase("pgp/denbond7@flowcrypt.test_pub_primary.asc") + + val msgInfo = getMsgInfo( + "messages/info/signature_verification_inband_only_signed.json", + "messages/mime/signature_verification_inband_only_signed.txt" + ) + baseCheck(msgInfo) + + testPgpBadges( + 2, + PgpBadgeListAdapter.PgpBadge.Type.NOT_ENCRYPTED, + PgpBadgeListAdapter.PgpBadge.Type.SIGNED + ) + } + + @Test + fun testSignatureVerificationInbandOnlyEncrypted() { + val msgInfo = getMsgInfo( + "messages/info/signature_verification_inband_only_encrypted.json", + "messages/mime/signature_verification_inband_only_encrypted.txt" + ) + baseCheck(msgInfo) + + testPgpBadges( + 2, + PgpBadgeListAdapter.PgpBadge.Type.ENCRYPTED, + PgpBadgeListAdapter.PgpBadge.Type.NOT_SIGNED + ) + } + private fun testMissingKey(incomingMsgInfo: IncomingMessageInfo?) { assertThat(incomingMsgInfo, notNullValue()) @@ -791,4 +943,15 @@ class MessageDetailsActivityTest : BaseMessageDetailsActivityTest() { } } } + + private fun testPgpBadges(badgeCount: Int, vararg badgeTypes: PgpBadgeListAdapter.PgpBadge.Type) { + onView(withId(R.id.rVPgpBadges)) + .check(matches(withRecyclerViewItemCount(badgeCount))) + + + for (badgeType in badgeTypes) { + onView(withId(R.id.rVPgpBadges)) + .perform(scrollToHolder(withPgpBadge(PgpBadgeListAdapter.PgpBadge(badgeType)))) + } + } } diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/util/PrivateKeysManager.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/util/PrivateKeysManager.kt index 103278e2c6..a7832d7c8a 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/util/PrivateKeysManager.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/util/PrivateKeysManager.kt @@ -64,6 +64,22 @@ class PrivateKeysManager { Thread.sleep(3000) } + fun savePubKeyToDatabase(assetsPath: String) { + savePubKeyToDatabase(getPgpKeyDetailsFromAssets(assetsPath)) + } + + fun savePubKeyToDatabase(pgpKeyDetails: PgpKeyDetails) { + val context = InstrumentationRegistry.getInstrumentation().targetContext + val email = requireNotNull(pgpKeyDetails.getPrimaryInternetAddress()).address.lowercase() + val roomDatabase = FlowCryptRoomDatabase.getDatabase(context) + if (roomDatabase.recipientDao().getRecipientByEmail(email) == null) { + roomDatabase.recipientDao().insert(requireNotNull(pgpKeyDetails.toRecipientEntity())) + } + roomDatabase.pubKeyDao().insert(pgpKeyDetails.toPublicKeyEntity(email)) + // Added timeout for a better sync between threads. + Thread.sleep(500) + } + fun getPgpKeyDetailsFromAssets( assetsPath: String, onlyPrivate: Boolean = false diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/api/email/EmailUtil.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/api/email/EmailUtil.kt index 3da0232165..186bca656b 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/api/email/EmailUtil.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/api/email/EmailUtil.kt @@ -30,7 +30,7 @@ import com.flowcrypt.email.security.KeyStoreCryptoManager import com.flowcrypt.email.security.KeysStorageImpl import com.flowcrypt.email.security.SecurityUtils import com.flowcrypt.email.security.model.PgpKeyDetails -import com.flowcrypt.email.security.pgp.PgpEncrypt +import com.flowcrypt.email.security.pgp.PgpEncryptAndOrSign import com.flowcrypt.email.util.GeneralUtil import com.flowcrypt.email.util.SharedPreferencesHelper import com.flowcrypt.email.util.exception.ExceptionUtil @@ -1123,7 +1123,7 @@ class EmailUtil { protector: SecretKeyRingProtector? = null ): String { return if (info.encryptionType == MessageEncryptionType.ENCRYPTED) { - PgpEncrypt.encryptAndOrSignMsg( + PgpEncryptAndOrSign.encryptAndOrSignMsg( msg = info.msg ?: "", pubKeys = pubKeys ?: emptyList(), prvKeys = prvKeys, diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/api/email/model/IncomingMessageInfo.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/api/email/model/IncomingMessageInfo.kt index 105f44ef1f..98e9f4d8ad 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/api/email/model/IncomingMessageInfo.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/api/email/model/IncomingMessageInfo.kt @@ -9,6 +9,7 @@ import android.os.Parcel import android.os.Parcelable import com.flowcrypt.email.api.retrofit.response.model.GenericMsgBlock import com.flowcrypt.email.api.retrofit.response.model.MsgBlock +import com.flowcrypt.email.api.retrofit.response.model.VerificationResult import com.flowcrypt.email.database.entity.MessageEntity import com.flowcrypt.email.model.MessageEncryptionType import java.util.Date @@ -30,7 +31,8 @@ data class IncomingMessageInfo constructor( var text: String? = null, var inlineSubject: String? = null, val msgBlocks: List<@JvmSuppressWildcards MsgBlock>? = null, - val encryptionType: MessageEncryptionType + val encryptionType: MessageEncryptionType, + val verificationResult: VerificationResult ) : Parcelable { fun getSubject(): String? = msgEntity.subject @@ -62,7 +64,7 @@ data class IncomingMessageInfo constructor( constructor( msgEntity: MessageEntity, text: String?, subject: String?, msgBlocks: List, - encryptionType: MessageEncryptionType + encryptionType: MessageEncryptionType, verificationResult: VerificationResult ) : this( msgEntity, null, @@ -70,7 +72,8 @@ data class IncomingMessageInfo constructor( text, subject, msgBlocks, - encryptionType + encryptionType, + verificationResult ) fun hasHtmlText(): Boolean { @@ -98,7 +101,8 @@ data class IncomingMessageInfo constructor( source.readString(), source.readString(), mutableListOf().apply { source.readTypedList(this, GenericMsgBlock.CREATOR) }, - source.readParcelable(MessageEncryptionType::class.java.classLoader)!! + source.readParcelable(MessageEncryptionType::class.java.classLoader)!!, + source.readParcelable(VerificationResult::class.java.classLoader)!! ) override fun describeContents() = 0 @@ -111,6 +115,7 @@ data class IncomingMessageInfo constructor( writeString(inlineSubject) writeTypedList(msgBlocks) writeParcelable(encryptionType, flags) + writeParcelable(verificationResult, flags) } companion object { diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/DecryptErrorDetails.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/DecryptErrorDetails.kt index b4ecf782a4..fd26313048 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/DecryptErrorDetails.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/DecryptErrorDetails.kt @@ -7,7 +7,7 @@ package com.flowcrypt.email.api.retrofit.response.model import android.os.Parcel import android.os.Parcelable -import com.flowcrypt.email.security.pgp.PgpDecrypt +import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify import com.google.gson.annotations.Expose /** @@ -17,11 +17,11 @@ import com.google.gson.annotations.Expose * E-mail: DenBond7@gmail.com */ data class DecryptErrorDetails( - @Expose val type: PgpDecrypt.DecryptionErrorType?, + @Expose val type: PgpDecryptAndOrVerify.DecryptionErrorType?, @Expose val message: String? ) : Parcelable { constructor(source: Parcel) : this( - source.readParcelable(PgpDecrypt.DecryptionErrorType::class.java.classLoader), + source.readParcelable(PgpDecryptAndOrVerify.DecryptionErrorType::class.java.classLoader), source.readString() ) diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/DecryptedAndOrSignedContentMsgBlock.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/DecryptedAndOrSignedContentMsgBlock.kt new file mode 100644 index 0000000000..1917925ac7 --- /dev/null +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/DecryptedAndOrSignedContentMsgBlock.kt @@ -0,0 +1,53 @@ +/* + * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com + * Contributors: DenBond7 + */ + +package com.flowcrypt.email.api.retrofit.response.model + +import android.os.Parcel +import android.os.Parcelable +import com.google.gson.annotations.Expose +import org.pgpainless.decryption_verification.OpenPgpMetadata + +/** + * @author Denis Bondarenko + * Date: 12/8/21 + * Time: 6:55 PM + * E-mail: DenBond7@gmail.com + */ +data class DecryptedAndOrSignedContentMsgBlock( + @Expose override val error: MsgBlockError? = null, + @Expose val blocks: List = listOf() +) : MsgBlock { + @Expose + override val content: String? = null + + @Expose + override val complete: Boolean = true + + @Expose + override val type: MsgBlock.Type = MsgBlock.Type.DECRYPTED_AND_OR_SIGNED_CONTENT + + var openPgpMetadata: OpenPgpMetadata? = null + + constructor(parcel: Parcel) : this( + parcel.readParcelable(MsgBlockError::class.java.classLoader), + mutableListOf().apply { parcel.readTypedList(this, GenericMsgBlock.CREATOR) } + ) + + override fun writeToParcel(parcel: Parcel, flags: Int) { + parcel.writeParcelable(error, flags) + parcel.writeList(blocks) + } + + override fun describeContents(): Int { + return 0 + } + + companion object CREATOR : Parcelable.Creator { + override fun createFromParcel(parcel: Parcel) = DecryptedAndOrSignedContentMsgBlock(parcel) + override fun newArray(size: Int): Array = + arrayOfNulls(size) + } +} diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/MsgBlock.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/MsgBlock.kt index 990d4e261d..dd9c3270c1 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/MsgBlock.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/MsgBlock.kt @@ -39,9 +39,6 @@ interface MsgBlock : Parcelable { @SerializedName("attestPacket") ATTEST_PACKET, - @SerializedName("cryptupVerification") - VERIFICATION, - @SerializedName("privateKey") PRIVATE_KEY, @@ -79,7 +76,10 @@ interface MsgBlock : Parcelable { SIGNED_HTML, @SerializedName("verifiedMsg") - VERIFIED_MSG; + VERIFIED_MSG, + + @SerializedName("decryptedAndOrSignedContent") + DECRYPTED_AND_OR_SIGNED_CONTENT; override fun describeContents(): Int { return 0 @@ -108,10 +108,18 @@ interface MsgBlock : Parcelable { PUBLIC_KEY, PRIVATE_KEY, SIGNED_MSG, ENCRYPTED_MSG ) - val SIGNED_BLOCK_TYPES = setOf(SIGNED_TEXT, SIGNED_HTML, SIGNED_MSG) + val SIGNED_BLOCK_TYPES = setOf( + SIGNED_TEXT, SIGNED_HTML, SIGNED_MSG, DECRYPTED_AND_OR_SIGNED_CONTENT + ) val CONTENT_BLOCK_TYPES = setOf( - PLAIN_TEXT, PLAIN_HTML, DECRYPTED_TEXT, DECRYPTED_HTML, SIGNED_MSG, VERIFIED_MSG + PLAIN_TEXT, + PLAIN_HTML, + DECRYPTED_TEXT, + DECRYPTED_HTML, + SIGNED_MSG, + VERIFIED_MSG, + DECRYPTED_AND_OR_SIGNED_CONTENT ) val DECRYPTED_CONTENT_BLOCK_TYPES = setOf( diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/SignedMsgBlock.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/SignedMsgBlock.kt index 7cf9e71d4b..b1899953d0 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/SignedMsgBlock.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/SignedMsgBlock.kt @@ -9,6 +9,7 @@ package com.flowcrypt.email.api.retrofit.response.model import android.os.Parcel import android.os.Parcelable import com.google.gson.annotations.Expose +import org.pgpainless.decryption_verification.OpenPgpMetadata /** * Message block which represents content with a signature. @@ -21,6 +22,8 @@ data class SignedMsgBlock( @Expose override val error: MsgBlockError? = null ) : MsgBlock { + var openPgpMetadata: OpenPgpMetadata? = null + @Expose override val type: MsgBlock.Type = when (signedType) { Type.SIGNED_MSG -> MsgBlock.Type.SIGNED_MSG diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/VerificationResult.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/VerificationResult.kt new file mode 100644 index 0000000000..2b23177036 --- /dev/null +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/model/VerificationResult.kt @@ -0,0 +1,52 @@ +/* + * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com + * Contributors: DenBond7 + */ + +package com.flowcrypt.email.api.retrofit.response.model + +import android.os.Parcel +import android.os.Parcelable +import com.google.gson.annotations.Expose + +/** + * @author Denis Bondarenko + * Date: 12/10/21 + * Time: 10:09 AM + * E-mail: DenBond7@gmail.com + */ +data class VerificationResult( + @Expose val isEncrypted: Boolean, + @Expose val isSigned: Boolean, + @Expose val hasMixedSignatures: Boolean, + @Expose val isPartialSigned: Boolean, + @Expose val hasUnverifiedSignatures: Boolean, + @Expose val hasBadSignatures: Boolean, +) : Parcelable { + constructor(parcel: Parcel) : this( + parcel.readByte() != 0.toByte(), + parcel.readByte() != 0.toByte(), + parcel.readByte() != 0.toByte(), + parcel.readByte() != 0.toByte(), + parcel.readByte() != 0.toByte(), + parcel.readByte() != 0.toByte() + ) + + override fun writeToParcel(parcel: Parcel, flags: Int) { + parcel.writeByte(if (isEncrypted) 1 else 0) + parcel.writeByte(if (isSigned) 1 else 0) + parcel.writeByte(if (hasMixedSignatures) 1 else 0) + parcel.writeByte(if (isPartialSigned) 1 else 0) + parcel.writeByte(if (hasUnverifiedSignatures) 1 else 0) + parcel.writeByte(if (hasBadSignatures) 1 else 0) + } + + override fun describeContents(): Int { + return 0 + } + + companion object CREATOR : Parcelable.Creator { + override fun createFromParcel(parcel: Parcel) = VerificationResult(parcel) + override fun newArray(size: Int): Array = arrayOfNulls(size) + } +} diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/core/msg/MimeUtils.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/core/msg/MimeUtils.kt index 7e61465e07..6596df78fd 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/core/msg/MimeUtils.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/core/msg/MimeUtils.kt @@ -10,7 +10,6 @@ import com.flowcrypt.email.api.retrofit.response.model.MsgBlock import com.flowcrypt.email.api.retrofit.response.model.PlainAttMsgBlock import com.flowcrypt.email.extensions.kotlin.toInputStream import java.nio.charset.StandardCharsets -import java.util.Locale import java.util.Properties import javax.mail.Session import javax.mail.internet.MimeMessage @@ -20,7 +19,7 @@ object MimeUtils { if (msg == null) return false val firstChars = msg.copyOfRange(0, msg.size.coerceAtMost(1000)) .toString(StandardCharsets.US_ASCII) - .toLowerCase(Locale.ROOT) + .lowercase() val contentType = CONTENT_TYPE_REGEX.find(firstChars) ?: return false return CONTENT_TRANSFER_ENCODING_REGEX.containsMatchIn(firstChars) || CONTENT_DISPOSITION_REGEX.containsMatchIn(firstChars) diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/MsgDetailsViewModel.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/MsgDetailsViewModel.kt index 4caba176c8..ec2858400f 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/MsgDetailsViewModel.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/MsgDetailsViewModel.kt @@ -41,7 +41,7 @@ import com.flowcrypt.email.jetpack.workmanager.sync.UpdateMsgsSeenStateWorker import com.flowcrypt.email.model.MessageEncryptionType import com.flowcrypt.email.security.KeyStoreCryptoManager import com.flowcrypt.email.security.KeysStorageImpl -import com.flowcrypt.email.security.pgp.PgpDecrypt +import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify import com.flowcrypt.email.security.pgp.PgpKey import com.flowcrypt.email.security.pgp.PgpMsg import com.flowcrypt.email.ui.activity.SearchMessagesActivity @@ -211,11 +211,12 @@ class MsgDetailsViewModel( text = processedMimeMessageResult.text, //subject = parseDecryptedMsgResult.subject, msgBlocks = processedMimeMessageResult.blocks, - encryptionType = if (processedMimeMessageResult.isReplyEncrypted) { + encryptionType = if (processedMimeMessageResult.verificationResult.isEncrypted) { MessageEncryptionType.ENCRYPTED } else { MessageEncryptionType.STANDARD - } + }, + verificationResult = processedMimeMessageResult.verificationResult ) Result.success(requestCode = it.requestCode, data = msgInfo) } catch (e: Exception) { @@ -428,7 +429,7 @@ class MsgDetailsViewModel( } is DecryptErrorMsgBlock -> { - if (block.decryptErr?.details?.type == PgpDecrypt.DecryptionErrorType.NEED_PASSPHRASE) { + if (block.decryptErr?.details?.type == PgpDecryptAndOrVerify.DecryptionErrorType.NEED_PASSPHRASE) { val fingerprints = block.decryptErr.fingerprints ?: emptyList() if (fingerprints.isEmpty()) { ExceptionUtil.handleError(IllegalStateException("Fingerprints were not provided")) diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/PgpSignatureHandlerViewModel.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/PgpSignatureHandlerViewModel.kt new file mode 100644 index 0000000000..e0e46fe2a7 --- /dev/null +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/PgpSignatureHandlerViewModel.kt @@ -0,0 +1,16 @@ +/* + * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com + * Contributors: DenBond7 + */ + +package com.flowcrypt.email.jetpack.viewmodel + +import android.app.Application + +/** + * @author Denis Bondarenko + * Date: 12/7/21 + * Time: 9:25 PM + * E-mail: DenBond7@gmail.com + */ +class PgpSignatureHandlerViewModel(application: Application) : AccountViewModel(application) diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/ForwardedAttachmentsDownloaderWorker.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/ForwardedAttachmentsDownloaderWorker.kt index 4768de94d3..4de474f16a 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/ForwardedAttachmentsDownloaderWorker.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/ForwardedAttachmentsDownloaderWorker.kt @@ -28,7 +28,7 @@ import com.flowcrypt.email.database.entity.MessageEntity import com.flowcrypt.email.extensions.kotlin.toHex import com.flowcrypt.email.jetpack.viewmodel.AccountViewModel import com.flowcrypt.email.security.SecurityUtils -import com.flowcrypt.email.security.pgp.PgpEncrypt +import com.flowcrypt.email.security.pgp.PgpEncryptAndOrSign import com.flowcrypt.email.ui.notifications.ErrorNotificationManager import com.flowcrypt.email.util.FileAndDirectoryUtils import com.flowcrypt.email.util.GeneralUtil @@ -295,7 +295,7 @@ class ForwardedAttachmentsDownloaderWorker(context: Context, params: WorkerParam withContext(Dispatchers.IO) { if (msgEntity.isEncrypted == true) { requireNotNull(pubKeys) - PgpEncrypt.encryptAndOrSign(srcInputStream, destFile.outputStream(), pubKeys) + PgpEncryptAndOrSign.encryptAndOrSign(srcInputStream, destFile.outputStream(), pubKeys) } else { FileUtils.copyInputStreamToFile(srcInputStream, destFile) } diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/security/KeysStorageImpl.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/security/KeysStorageImpl.kt index 7b11bd8e46..9bb327c317 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/security/KeysStorageImpl.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/security/KeysStorageImpl.kt @@ -15,7 +15,7 @@ import com.flowcrypt.email.database.entity.KeyEntity import com.flowcrypt.email.extensions.org.bouncycastle.openpgp.toPgpKeyDetails import com.flowcrypt.email.model.KeysStorage import com.flowcrypt.email.security.model.PgpKeyDetails -import com.flowcrypt.email.security.pgp.PgpDecrypt +import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify import com.flowcrypt.email.security.pgp.PgpKey import com.flowcrypt.email.util.exception.DecryptionException import org.bouncycastle.openpgp.PGPException @@ -176,7 +176,7 @@ class KeysStorageImpl private constructor(context: Context) : KeysStorage { if (passphrase == null || passphrase.isEmpty) { if (throwException) { throw DecryptionException( - decryptionErrorType = PgpDecrypt.DecryptionErrorType.NEED_PASSPHRASE, + decryptionErrorType = PgpDecryptAndOrVerify.DecryptionErrorType.NEED_PASSPHRASE, e = PGPException("flowcrypt: need passphrase"), fingerprints = listOf(fingerprint) ) diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/security/SecurityUtils.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/security/SecurityUtils.kt index 91d75180be..58b2ba8463 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/security/SecurityUtils.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/security/SecurityUtils.kt @@ -13,7 +13,7 @@ import com.flowcrypt.email.database.FlowCryptRoomDatabase import com.flowcrypt.email.database.entity.AccountEntity import com.flowcrypt.email.extensions.org.bouncycastle.openpgp.toPgpKeyDetails import com.flowcrypt.email.security.model.PgpKeyDetails -import com.flowcrypt.email.security.pgp.PgpDecrypt +import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify import com.flowcrypt.email.security.pgp.PgpKey import com.flowcrypt.email.security.pgp.PgpPwd import com.flowcrypt.email.util.exception.DifferentPassPhrasesException @@ -181,7 +181,9 @@ class SecurityUtils { * If yes - it can mean the file is encrypted */ fun isEncryptedData(fileName: String?): Boolean { - return PgpDecrypt.DETECT_SEPARATE_ENCRYPTED_ATTACHMENTS_PATTERN.find(fileName ?: "") != null + return PgpDecryptAndOrVerify.DETECT_SEPARATE_ENCRYPTED_ATTACHMENTS_PATTERN.find( + fileName ?: "" + ) != null } } } diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpDecrypt.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpDecryptAndOrVerify.kt similarity index 84% rename from FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpDecrypt.kt rename to FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpDecryptAndOrVerify.kt index 7976310822..fe690b1efc 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpDecrypt.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpDecryptAndOrVerify.kt @@ -10,6 +10,7 @@ import android.os.Parcelable import com.flowcrypt.email.util.exception.DecryptionException import org.bouncycastle.openpgp.PGPDataValidationException import org.bouncycastle.openpgp.PGPException +import org.bouncycastle.openpgp.PGPPublicKeyRingCollection import org.bouncycastle.openpgp.PGPSecretKeyRingCollection import org.pgpainless.PGPainless import org.pgpainless.decryption_verification.ConsumerOptions @@ -32,14 +33,14 @@ import java.io.OutputStream * Time: 2:10 PM * E-mail: DenBond7@gmail.com */ -object PgpDecrypt { +object PgpDecryptAndOrVerify { val DETECT_SEPARATE_ENCRYPTED_ATTACHMENTS_PATTERN = "(?i)(\\.pgp$)|(\\.gpg$)|(\\.[a-zA-Z0-9]{3,4}\\.asc$)".toRegex() fun decrypt( srcInputStream: InputStream, destOutputStream: OutputStream, - pgpSecretKeyRingCollection: PGPSecretKeyRingCollection, + secretKeys: PGPSecretKeyRingCollection, protector: SecretKeyRingProtector ): OpenPgpMetadata { srcInputStream.use { srcStream -> @@ -49,7 +50,7 @@ object PgpDecrypt { .onInputStream(srcStream) .withOptions( ConsumerOptions() - .addDecryptionKeys(pgpSecretKeyRingCollection, protector) + .addDecryptionKeys(secretKeys, protector) .setMissingKeyPassphraseStrategy(MissingKeyPassphraseStrategy.THROW_EXCEPTION) ) decryptionStream.use { it.copyTo(outStream) } @@ -61,9 +62,10 @@ object PgpDecrypt { } } - fun decryptWithResult( + fun decryptAndOrVerifyWithResult( srcInputStream: InputStream, - pgpSecretKeyRingCollection: PGPSecretKeyRingCollection, + publicKeys: PGPPublicKeyRingCollection, + secretKeys: PGPSecretKeyRingCollection, protector: SecretKeyRingProtector, ignoreMdcErrors: Boolean = false ): DecryptionResult { @@ -75,17 +77,16 @@ object PgpDecrypt { .onInputStream(srcStream) .withOptions( ConsumerOptions() - .addDecryptionKeys(pgpSecretKeyRingCollection, protector) + .addDecryptionKeys(secretKeys, protector) .setMissingKeyPassphraseStrategy(MissingKeyPassphraseStrategy.THROW_EXCEPTION) .setIgnoreMDCErrors(ignoreMdcErrors) + .addVerificationCerts(publicKeys) ) decryptionStream.use { it.copyTo(outStream) } return DecryptionResult( - content = destOutputStream, - isEncrypted = decryptionStream.result.isEncrypted, - isSigned = decryptionStream.result.isSigned, - filename = decryptionStream.result.fileName + openPgpMetadata = decryptionStream.result, + content = destOutputStream ) } catch (e: Exception) { return DecryptionResult.withError( @@ -139,26 +140,27 @@ object PgpDecrypt { } data class DecryptionResult( + val openPgpMetadata: OpenPgpMetadata? = null, // provided if decryption was successful val content: ByteArrayOutputStream? = null, - // true if message was encrypted. - // Alternatively false (because it could have also been plaintext signed, - // or wrapped in PGP armor as plaintext packet without encrypting) - // also false when error happens. - val isEncrypted: Boolean = false, - - val isSigned: Boolean = false, - - // pgp messages may include original filename in them - val filename: String? = null, - // todo later - signature verification not supported on Android yet val signature: String? = null, // provided if error happens val exception: DecryptionException? = null ) { + /** + * true if message was encrypted. + * Alternatively false (because it could have also been plaintext signed, or wrapped in + * PGP armor as plaintext packet without encrypting). Also false when error happens. + */ + val isEncrypted: Boolean = openPgpMetadata?.isEncrypted ?: false + val isSigned = openPgpMetadata?.isSigned ?: false + + // pgp messages may include original filename in them + val filename = openPgpMetadata?.fileName + companion object { fun withError(exception: DecryptionException): DecryptionResult { return DecryptionResult(exception = exception) diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpEncrypt.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpEncryptAndOrSign.kt similarity index 99% rename from FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpEncrypt.kt rename to FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpEncryptAndOrSign.kt index 0306ca2a97..8141d69972 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpEncrypt.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpEncryptAndOrSign.kt @@ -27,7 +27,7 @@ import java.io.OutputStream * Time: 3:28 PM * E-mail: DenBond7@gmail.com */ -object PgpEncrypt { +object PgpEncryptAndOrSign { fun encryptAndOrSignMsg( msg: String, pubKeys: List, diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt index 310f9e470e..8ebe6a6b3d 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt @@ -11,6 +11,7 @@ import com.flowcrypt.email.api.email.JavaEmailConstants import com.flowcrypt.email.api.retrofit.response.model.AttMeta import com.flowcrypt.email.api.retrofit.response.model.AttMsgBlock import com.flowcrypt.email.api.retrofit.response.model.DecryptErrorMsgBlock +import com.flowcrypt.email.api.retrofit.response.model.DecryptedAndOrSignedContentMsgBlock import com.flowcrypt.email.api.retrofit.response.model.EncryptedAttLinkMsgBlock import com.flowcrypt.email.api.retrofit.response.model.EncryptedAttMsgBlock import com.flowcrypt.email.api.retrofit.response.model.MsgBlock @@ -18,8 +19,10 @@ import com.flowcrypt.email.api.retrofit.response.model.MsgBlockError import com.flowcrypt.email.api.retrofit.response.model.MsgBlockFactory import com.flowcrypt.email.api.retrofit.response.model.PublicKeyMsgBlock import com.flowcrypt.email.api.retrofit.response.model.SignedMsgBlock +import com.flowcrypt.email.api.retrofit.response.model.VerificationResult import com.flowcrypt.email.core.msg.MimeUtils import com.flowcrypt.email.core.msg.MsgBlockParser +import com.flowcrypt.email.database.FlowCryptRoomDatabase import com.flowcrypt.email.extensions.java.io.readText import com.flowcrypt.email.extensions.javax.mail.internet.hasFileName import com.flowcrypt.email.extensions.javax.mail.isInline @@ -32,7 +35,12 @@ import com.flowcrypt.email.extensions.kotlin.unescapeHtml import com.flowcrypt.email.extensions.org.bouncycastle.openpgp.armor import com.flowcrypt.email.extensions.org.owasp.html.allowAttributesOnElementsExt import com.flowcrypt.email.security.KeysStorageImpl +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import org.bouncycastle.openpgp.PGPPublicKeyRing +import org.bouncycastle.openpgp.PGPPublicKeyRingCollection import org.bouncycastle.openpgp.PGPSecretKeyRingCollection +import org.bouncycastle.openpgp.PGPSignature import org.json.JSONObject import org.jsoup.Jsoup import org.jsoup.nodes.Document @@ -40,6 +48,7 @@ import org.jsoup.nodes.Element import org.jsoup.nodes.Node import org.jsoup.nodes.TextNode import org.owasp.html.HtmlPolicyBuilder +import org.pgpainless.key.SubkeyIdentifier import org.pgpainless.key.protection.SecretKeyRingProtector import java.io.InputStream import java.nio.charset.StandardCharsets @@ -48,6 +57,7 @@ import javax.mail.Multipart import javax.mail.Part import javax.mail.Session import javax.mail.internet.ContentType +import javax.mail.internet.InternetAddress import javax.mail.internet.MimeMessage import javax.mail.internet.MimePart import kotlin.random.Random @@ -198,37 +208,63 @@ object PgpMsg { .allowAttributesOnElementsExt(ALLOWED_ATTRS) .toFactory() - fun processMimeMessage(context: Context, inputStream: InputStream): ProcessedMimeMessageResult { + suspend fun processMimeMessage(context: Context, inputStream: InputStream): + ProcessedMimeMessageResult = withContext(Dispatchers.IO) { val keysStorage = KeysStorageImpl.getInstance(context) - val pgpSecretKeyRingCollection = PGPSecretKeyRingCollection(keysStorage.getPGPSecretKeyRings()) + val accountSecretKeys = PGPSecretKeyRingCollection(keysStorage.getPGPSecretKeyRings()) val protector = keysStorage.getSecretKeyRingProtector() - return processMimeMessage( - msg = MimeMessage(Session.getInstance(Properties()), inputStream), - pgpSecretKeyRingCollection = pgpSecretKeyRingCollection, + val msg = MimeMessage(Session.getInstance(Properties()), inputStream) + + val verificationPublicKeys = mutableListOf() + val pubKeyDao = FlowCryptRoomDatabase.getDatabase(context).pubKeyDao() + + for (address in msg.from) { + if (address is InternetAddress) { + val existingPubKeysInfo = pubKeyDao.getPublicKeysByRecipient(address.address.lowercase()) + for (existingPublicKeyEntity in existingPubKeysInfo) { + verificationPublicKeys.addAll( + //ask Tom about this place. Do we need to catch exception here or we can throw it + PgpKey.parseKeys(source = existingPublicKeyEntity.publicKey) + .pgpKeyRingCollection.pgpPublicKeyRingCollection + ) + } + } + } + + return@withContext processMimeMessage( + msg = msg, + verificationPublicKeys = PGPPublicKeyRingCollection(verificationPublicKeys), + secretKeys = accountSecretKeys, protector = protector ) } fun processMimeMessage( inputStream: InputStream, - pgpSecretKeyRingCollection: PGPSecretKeyRingCollection, + secretKeys: PGPSecretKeyRingCollection, protector: SecretKeyRingProtector ): ProcessedMimeMessageResult { return processMimeMessage( msg = MimeMessage(Session.getInstance(Properties()), inputStream), - pgpSecretKeyRingCollection = pgpSecretKeyRingCollection, + secretKeys = secretKeys, protector = protector ) } fun processMimeMessage( msg: MimeMessage, - pgpSecretKeyRingCollection: PGPSecretKeyRingCollection, + verificationPublicKeys: PGPPublicKeyRingCollection = PGPPublicKeyRingCollection(listOf()), + secretKeys: PGPSecretKeyRingCollection, protector: SecretKeyRingProtector ): ProcessedMimeMessageResult { val extractedMimeContent = extractMimeContent(msg) val extractedMsgBlocks = extractMsgBlocks(extractedMimeContent) - return processExtractedMsgBlocks(extractedMsgBlocks, pgpSecretKeyRingCollection, protector) + return processExtractedMsgBlocks( + msgBlocks = extractedMsgBlocks, + verificationPublicKeys = verificationPublicKeys, + secretKeys = secretKeys, + protector = protector + ) } fun extractMimeContent(msg: MimeMessage): ExtractedMimeContent { @@ -764,15 +800,28 @@ object PgpMsg { private fun processExtractedMsgBlocks( msgBlocks: List, - ringCollection: PGPSecretKeyRingCollection, + verificationPublicKeys: PGPPublicKeyRingCollection, + secretKeys: PGPSecretKeyRingCollection, protector: SecretKeyRingProtector ): ProcessedMimeMessageResult { - val sequentialProcessedBlocks = handleExtractedMsgBlocks(msgBlocks, ringCollection, protector) + val sequentialProcessedBlocks = handleExtractedMsgBlocks( + msgBlocks = msgBlocks, + verificationPublicKeys = verificationPublicKeys, + secretKeys = secretKeys, + protector = protector + ) - var isReplyEncrypted = false + var isEncrypted = false val contentBlocks = mutableListOf() val resultBlocks = mutableListOf() + var hasMixedSignatures = false + var hasUnverifiedSignatures = false + var hasBadSignatures = false + var signedBlockCount = 0 + var isPartialSigned = false + val verifiedSignatures = mutableMapOf() + for (block in sequentialProcessedBlocks) { // We don't need Base64 correction here, fromAttachment() does this for us // We also seem to don't need to make correction between raw and utf8 @@ -780,87 +829,122 @@ object PgpMsg { // So, at least meanwhile, not porting this: // block.content = isContentBlock(block.type) // ? block.content.toUtfStr() : block.content.toRawBytesStr(); + if (block.type in MsgBlock.Type.SIGNED_BLOCK_TYPES) { + val openPgpMetadata = when (block) { + is DecryptedAndOrSignedContentMsgBlock -> { + block.openPgpMetadata + } - if (block.type in MsgBlock.Type.DECRYPTED_CONTENT_BLOCK_TYPES) { - isReplyEncrypted = true - } + is SignedMsgBlock -> { + block.openPgpMetadata + } - when { - block.type == MsgBlock.Type.DECRYPTED_ATT -> { - resultBlocks.add(block) + else -> null } - block.type == MsgBlock.Type.PUBLIC_KEY -> { - block.content?.let { source -> - try { - val keyRings = PgpKey.parseAndNormalizeKeyRings(source) - if (keyRings.isNotEmpty()) { - resultBlocks.addAll(keyRings.map { - MsgBlockFactory.fromContent(MsgBlock.Type.PUBLIC_KEY, it.armor(null)) - }) - } else { - resultBlocks.add( - PublicKeyMsgBlock( - content = block.content, - complete = false, - keyDetails = null, - error = MsgBlockError("empty KeyRing") - ) - ) - } - } catch (ex: Exception) { - ex.printStackTrace() - resultBlocks.add( - PublicKeyMsgBlock( - content = block.content, - complete = false, - keyDetails = null, - error = MsgBlockError(ex.javaClass.simpleName + ": " + ex.message) - ) - ) + if (!isEncrypted) { + isEncrypted = openPgpMetadata?.isEncrypted ?: false + } + + if (openPgpMetadata?.isSigned == true) { + signedBlockCount++ + + if (openPgpMetadata.invalidInbandSignatures.isNotEmpty() + || openPgpMetadata.invalidDetachedSignatures.isNotEmpty() + ) { + val invalidSignatureFailures = openPgpMetadata.invalidInbandSignatures + + openPgpMetadata.invalidDetachedSignatures + + hasBadSignatures = invalidSignatureFailures.any { + it.validationException.underlyingException != null + } + + hasUnverifiedSignatures = invalidSignatureFailures.any { + it.validationException.message?.startsWith( + "Missing verification certificate", true + ) ?: false } } - } - block.type.isContentBlockType() || MimeUtils.isPlainImgAtt(block) -> { - if (block.error != null) { - resultBlocks.add(block) + if (verifiedSignatures.isEmpty()) { + verifiedSignatures.putAll(openPgpMetadata.verifiedSignatures) } else { - contentBlocks.add(block) + val keyIdsOfAllVerifiedSignatures = verifiedSignatures.keys.map { it.keyId } + val keyIdsOfCurrentVerifiedSignatures = openPgpMetadata.verifiedSignatures.keys.map { + it.keyId + } + if (keyIdsOfAllVerifiedSignatures != keyIdsOfCurrentVerifiedSignatures) { + hasMixedSignatures = true + verifiedSignatures.putAll(openPgpMetadata.verifiedSignatures) + } } } + } - block.type != MsgBlock.Type.PLAIN_ATT -> { - resultBlocks.add(block) + if (block is DecryptedAndOrSignedContentMsgBlock) { + for (innerBlock in block.blocks) { + if (canBeAddedToCombinedContent(innerBlock)) { + contentBlocks.add(innerBlock) + } else { + resultBlocks.add(innerBlock) + } } } + + if (canBeAddedToCombinedContent(block)) { + contentBlocks.add(block) + } else { + resultBlocks.add(block) + } } val fmtRes = prepareFormattedContentBlock(contentBlocks) resultBlocks.add(0, fmtRes.contentBlock) + if (signedBlockCount > 0 && signedBlockCount != sequentialProcessedBlocks.size) { + isPartialSigned = true + } + return ProcessedMimeMessageResult( - isReplyEncrypted = isReplyEncrypted, text = fmtRes.text, - blocks = resultBlocks + blocks = resultBlocks, + verificationResult = VerificationResult( + isEncrypted = isEncrypted, + isSigned = signedBlockCount > 0, + hasMixedSignatures = hasMixedSignatures, + isPartialSigned = isPartialSigned, + hasUnverifiedSignatures = hasUnverifiedSignatures, + hasBadSignatures = hasBadSignatures + ) ) } + private fun canBeAddedToCombinedContent(block: MsgBlock): Boolean = + (block.type.isContentBlockType() || MimeUtils.isPlainImgAtt(block)) && block.error == null + private fun handleExtractedMsgBlocks( msgBlocks: List, - keyRings: PGPSecretKeyRingCollection, + verificationPublicKeys: PGPPublicKeyRingCollection, + secretKeys: PGPSecretKeyRingCollection, protector: SecretKeyRingProtector ): MutableList { val sequentialProcessedBlocks = mutableListOf() for (msgBlock in msgBlocks) { when { msgBlock is SignedMsgBlock -> { - processSignedMsgBlock(msgBlock)?.let { sequentialProcessedBlocks.add(it) } + processSignedMsgBlock(msgBlock, verificationPublicKeys)?.let { + sequentialProcessedBlocks.add(it) + } } msgBlock.type == MsgBlock.Type.ENCRYPTED_MSG -> { - val handledBlocks = processEncryptedMsgBlock(msgBlock, keyRings, protector) - sequentialProcessedBlocks.addAll(handledBlocks) + val decryptedContentMsgBlock = processEncryptedMsgBlock( + msgBlock = msgBlock, + verificationPublicKeys = verificationPublicKeys, + secretKeys = secretKeys, + protector = protector + ) + sequentialProcessedBlocks.add(decryptedContentMsgBlock) } msgBlock.type == MsgBlock.Type.ENCRYPTED_ATT @@ -868,13 +952,46 @@ object PgpMsg { && PUBLIC_KEY_REGEX_3.matches(msgBlock.attMeta.name ?: "") -> { sequentialProcessedBlocks.add( processPublicKeyMsgBlock( - msgBlock, - keyRings, - protector + msgBlock = msgBlock, + verificationPublicKeys = verificationPublicKeys, + secretKeys = secretKeys, + protector = protector ) ) } + msgBlock.type == MsgBlock.Type.PUBLIC_KEY -> { + msgBlock.content?.let { source -> + try { + val keyRings = PgpKey.parseAndNormalizeKeyRings(source) + if (keyRings.isNotEmpty()) { + sequentialProcessedBlocks.addAll(keyRings.map { + MsgBlockFactory.fromContent(MsgBlock.Type.PUBLIC_KEY, it.armor(null)) + }) + } else { + sequentialProcessedBlocks.add( + PublicKeyMsgBlock( + content = source, + complete = false, + keyDetails = null, + error = MsgBlockError("empty KeyRing") + ) + ) + } + } catch (ex: Exception) { + ex.printStackTrace() + sequentialProcessedBlocks.add( + PublicKeyMsgBlock( + content = source, + complete = false, + keyDetails = null, + error = MsgBlockError(ex.javaClass.simpleName + ": " + ex.message) + ) + ) + } + } + } + else -> { sequentialProcessedBlocks.add(msgBlock) } @@ -885,14 +1002,16 @@ object PgpMsg { private fun processPublicKeyMsgBlock( msgBlock: MsgBlock, - keyRings: PGPSecretKeyRingCollection, + verificationPublicKeys: PGPPublicKeyRingCollection, + secretKeys: PGPSecretKeyRingCollection, protector: SecretKeyRingProtector ): MsgBlock { // encrypted public key attached - val decryptionResult = PgpDecrypt.decryptWithResult( - msgBlock.content?.toInputStream()!!, - keyRings, - protector + val decryptionResult = PgpDecryptAndOrVerify.decryptAndOrVerifyWithResult( + srcInputStream = msgBlock.content?.toInputStream()!!, + publicKeys = verificationPublicKeys, + secretKeys = secretKeys, + protector = protector ) return if (decryptionResult.content != null) { val content = decryptionResult.content.toString(StandardCharsets.UTF_8.displayName()) @@ -905,23 +1024,24 @@ object PgpMsg { private fun processEncryptedMsgBlock( msgBlock: MsgBlock, - ringCollection: PGPSecretKeyRingCollection, + verificationPublicKeys: PGPPublicKeyRingCollection, + secretKeys: PGPSecretKeyRingCollection, protector: SecretKeyRingProtector - ): List { - val decryptionResult = PgpDecrypt.decryptWithResult( - msgBlock.content?.toInputStream()!!, - ringCollection, - protector + ): DecryptedAndOrSignedContentMsgBlock { + val decryptionResult = PgpDecryptAndOrVerify.decryptAndOrVerifyWithResult( + srcInputStream = msgBlock.content?.toInputStream()!!, + publicKeys = verificationPublicKeys, + secretKeys = secretKeys, + protector = protector ) - val results = mutableListOf() - + val blocks = mutableListOf() if (decryptionResult.exception == null) { if (decryptionResult.isEncrypted) { val decrypted = decryptionResult.content?.toByteArray() val formatted = MsgBlockParser.fmtDecryptedAsSanitizedHtmlBlocks(decrypted) //todo-denbond7 fix it //if (subject == null) subject = formatted.subject - results.addAll(formatted.blocks) + blocks.addAll(formatted.blocks) } else { // ------------------------------------------------------------------------------------ // Comment from TS code: @@ -933,7 +1053,7 @@ object PgpMsg { // message that was actually fully armored (text not visible) with a mime msg inside // ... -> in which case the user would I think see full mime content? // ------------------------------------------------------------------------------------ - results.add( + blocks.add( MsgBlockFactory.fromContent( type = MsgBlock.Type.VERIFIED_MSG, content = decryptionResult.content?.toString( @@ -944,16 +1064,17 @@ object PgpMsg { ) } } else { - if (PgpDecrypt.DecryptionErrorType.NO_MDC == decryptionResult.exception.decryptionErrorType) { - val resultWithIgnoredMDCErrors = PgpDecrypt.decryptWithResult( - msgBlock.content?.toInputStream()!!, - ringCollection, - protector, - true + if (PgpDecryptAndOrVerify.DecryptionErrorType.NO_MDC == decryptionResult.exception.decryptionErrorType) { + val resultWithIgnoredMDCErrors = PgpDecryptAndOrVerify.decryptAndOrVerifyWithResult( + srcInputStream = msgBlock.content?.toInputStream()!!, + publicKeys = verificationPublicKeys, + secretKeys = secretKeys, + protector = protector, + ignoreMdcErrors = true ) val decryptErrorMsgBlock = if (resultWithIgnoredMDCErrors.exception == null) { DecryptErrorMsgBlock( - content = resultWithIgnoredMDCErrors.content.toString(), + content = String(resultWithIgnoredMDCErrors.content?.toByteArray() ?: byteArrayOf()), complete = true, decryptErr = decryptionResult.exception.toDecryptError() ) @@ -965,9 +1086,9 @@ object PgpMsg { ) } - results.add(decryptErrorMsgBlock) + blocks.add(decryptErrorMsgBlock) } else { - results.add( + blocks.add( DecryptErrorMsgBlock( content = msgBlock.content, complete = true, @@ -977,10 +1098,15 @@ object PgpMsg { } } - return results + return DecryptedAndOrSignedContentMsgBlock(blocks = blocks).apply { + openPgpMetadata = decryptionResult.openPgpMetadata + } } - private fun processSignedMsgBlock(msgBlock: SignedMsgBlock): MsgBlock? { + private fun processSignedMsgBlock( + msgBlock: SignedMsgBlock, + verificationPublicKeys: PGPPublicKeyRingCollection + ): MsgBlock? { return when { msgBlock.signature != null -> { when (msgBlock.type) { @@ -1016,8 +1142,13 @@ object PgpMsg { msgBlock.type == MsgBlock.Type.SIGNED_MSG -> { return try { - val cleartext = PgpSignature.extractClearText(msgBlock.content, false) - msgBlock.copy(content = cleartext) + val clearTextVerificationResult = PgpSignature.verifyClearTextSignature( + srcInputStream = requireNotNull(msgBlock.content?.toInputStream()), + publicKeys = verificationPublicKeys + ) + clearTextVerificationResult.exception?.let { throw it } + msgBlock.copy(content = clearTextVerificationResult.clearText) + .apply { openPgpMetadata = clearTextVerificationResult.openPgpMetadata } } catch (e: Exception) { msgBlock.copy(error = MsgBlockError("[" + e.javaClass.simpleName + "]: " + e.message)) } @@ -1266,9 +1397,9 @@ object PgpMsg { } data class ProcessedMimeMessageResult( - val isReplyEncrypted: Boolean, val text: String, - val blocks: List + val blocks: List, + val verificationResult: VerificationResult ) enum class TreatAs { diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpSignature.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpSignature.kt index af146f30bf..4e940cd948 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpSignature.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpSignature.kt @@ -6,9 +6,15 @@ package com.flowcrypt.email.security.pgp +import org.bouncycastle.openpgp.PGPPublicKeyRingCollection +import org.pgpainless.PGPainless +import org.pgpainless.decryption_verification.ConsumerOptions +import org.pgpainless.decryption_verification.OpenPgpMetadata import org.pgpainless.decryption_verification.cleartext_signatures.ClearsignedMessageUtil +import org.pgpainless.decryption_verification.cleartext_signatures.InMemoryMultiPassStrategy import org.pgpainless.decryption_verification.cleartext_signatures.MultiPassStrategy import java.io.ByteArrayInputStream +import java.io.ByteArrayOutputStream import java.io.InputStream /** @@ -40,4 +46,33 @@ object PgpSignature { } } } + + fun verifyClearTextSignature( + srcInputStream: InputStream, + publicKeys: PGPPublicKeyRingCollection + ): ClearTextVerificationResult { + ByteArrayOutputStream().use { outStream -> + return try { + val verificationStream = PGPainless.verifyCleartextSignedMessage() + .onInputStream(srcInputStream) + .withStrategy(InMemoryMultiPassStrategy()) + .withOptions(ConsumerOptions().addVerificationCerts(publicKeys)) + .verificationStream + + verificationStream.use { it.copyTo(outStream) } + ClearTextVerificationResult( + openPgpMetadata = verificationStream.result, + clearText = String(outStream.toByteArray()) + ) + } catch (e: Exception) { + ClearTextVerificationResult(exception = e) + } + } + } + + data class ClearTextVerificationResult( + val openPgpMetadata: OpenPgpMetadata? = null, + val clearText: String? = null, + val exception: Exception? = null + ) } diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/service/PrepareOutgoingMessagesJobIntentService.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/service/PrepareOutgoingMessagesJobIntentService.kt index 2001dd4235..1c4ae2c5b1 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/service/PrepareOutgoingMessagesJobIntentService.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/service/PrepareOutgoingMessagesJobIntentService.kt @@ -28,7 +28,7 @@ import com.flowcrypt.email.jobscheduler.JobIdManager import com.flowcrypt.email.model.MessageEncryptionType import com.flowcrypt.email.model.MessageType import com.flowcrypt.email.security.SecurityUtils -import com.flowcrypt.email.security.pgp.PgpEncrypt +import com.flowcrypt.email.security.pgp.PgpEncryptAndOrSign import com.flowcrypt.email.ui.notifications.ErrorNotificationManager import com.flowcrypt.email.util.FileAndDirectoryUtils import com.flowcrypt.email.util.GeneralUtil @@ -311,7 +311,7 @@ class PrepareOutgoingMessagesJobIntentService : JobIntentService() { } requireNotNull(pubKeys) - PgpEncrypt.encryptAndOrSign( + PgpEncryptAndOrSign.encryptAndOrSign( originalFileInputStream, encryptedTempFile.outputStream(), pubKeys diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/service/attachment/AttachmentDownloadManagerService.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/service/attachment/AttachmentDownloadManagerService.kt index 053eb3fab3..4304d62f3c 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/service/attachment/AttachmentDownloadManagerService.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/service/attachment/AttachmentDownloadManagerService.kt @@ -38,7 +38,7 @@ import com.flowcrypt.email.extensions.kotlin.toHex import com.flowcrypt.email.jetpack.viewmodel.AccountViewModel import com.flowcrypt.email.security.KeysStorageImpl import com.flowcrypt.email.security.SecurityUtils -import com.flowcrypt.email.security.pgp.PgpDecrypt +import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify import com.flowcrypt.email.util.FileAndDirectoryUtils import com.flowcrypt.email.util.GeneralUtil import com.flowcrypt.email.util.LogsUtil @@ -534,7 +534,7 @@ class AttachmentDownloadManagerService : Service() { @RequiresApi(Build.VERSION_CODES.Q) private fun storeFileUsingScopedStorage(context: Context, attFile: File): Uri { val resolver = context.contentResolver - val fileExtension = FilenameUtils.getExtension(att.name).toLowerCase(Locale.getDefault()) + val fileExtension = FilenameUtils.getExtension(att.name).lowercase(Locale.getDefault()) val mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtension) val contentValues = ContentValues().apply { @@ -673,10 +673,10 @@ class AttachmentDownloadManagerService : Service() { val protector = KeysStorageImpl.getInstance(context).getSecretKeyRingProtector() try { - val result = PgpDecrypt.decrypt( + val result = PgpDecryptAndOrVerify.decrypt( srcInputStream = inputStream, destOutputStream = decryptedFile.outputStream(), - pgpSecretKeyRingCollection = pgpSecretKeyRingCollection, + secretKeys = pgpSecretKeyRingCollection, protector = protector ) diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/service/attachment/AttachmentNotificationManager.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/service/attachment/AttachmentNotificationManager.kt index c4d7d3c1d2..4be2863203 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/service/attachment/AttachmentNotificationManager.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/service/attachment/AttachmentNotificationManager.kt @@ -17,7 +17,7 @@ import androidx.core.app.NotificationCompat import com.flowcrypt.email.BuildConfig import com.flowcrypt.email.R import com.flowcrypt.email.api.email.model.AttachmentInfo -import com.flowcrypt.email.security.pgp.PgpDecrypt +import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify import com.flowcrypt.email.ui.notifications.CustomNotificationManager import com.flowcrypt.email.ui.notifications.NotificationChannelManager import com.flowcrypt.email.util.GeneralUtil @@ -150,7 +150,7 @@ class AttachmentNotificationManager(context: Context) : CustomNotificationManage } if (e is DecryptionException) { - if (e.decryptionErrorType == PgpDecrypt.DecryptionErrorType.NEED_PASSPHRASE) { + if (e.decryptionErrorType == PgpDecryptAndOrVerify.DecryptionErrorType.NEED_PASSPHRASE) { contentText.clear() contentText.append(context.getString(R.string.provide_passphrase_to_decrypt_file)) val fingerprint = e.fingerprints.firstOrNull() diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/MessageDetailsFragment.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/MessageDetailsFragment.kt index f5298f7d61..801bb78d5f 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/MessageDetailsFragment.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/MessageDetailsFragment.kt @@ -69,13 +69,14 @@ import com.flowcrypt.email.extensions.visible import com.flowcrypt.email.extensions.visibleOrGone import com.flowcrypt.email.jetpack.viewmodel.LabelsViewModel import com.flowcrypt.email.jetpack.viewmodel.MsgDetailsViewModel +import com.flowcrypt.email.jetpack.viewmodel.PgpSignatureHandlerViewModel import com.flowcrypt.email.jetpack.viewmodel.RecipientsViewModel import com.flowcrypt.email.jetpack.viewmodel.factory.MsgDetailsViewModelFactory import com.flowcrypt.email.model.MessageEncryptionType import com.flowcrypt.email.model.MessageType import com.flowcrypt.email.security.SecurityUtils import com.flowcrypt.email.security.model.PgpKeyDetails -import com.flowcrypt.email.security.pgp.PgpDecrypt +import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify import com.flowcrypt.email.service.attachment.AttachmentDownloadManagerService import com.flowcrypt.email.ui.activity.CreateMessageActivity import com.flowcrypt.email.ui.activity.ImportPrivateKeyActivity @@ -87,6 +88,7 @@ import com.flowcrypt.email.ui.activity.fragment.dialog.ChoosePublicKeyDialogFrag import com.flowcrypt.email.ui.activity.fragment.dialog.TwoWayDialogFragment import com.flowcrypt.email.ui.adapter.AttachmentsRecyclerViewAdapter import com.flowcrypt.email.ui.adapter.MsgDetailsRecyclerViewAdapter +import com.flowcrypt.email.ui.adapter.PgpBadgeListAdapter import com.flowcrypt.email.ui.adapter.recyclerview.itemdecoration.MarginItemDecoration import com.flowcrypt.email.ui.adapter.recyclerview.itemdecoration.VerticalSpaceMarginItemDecoration import com.flowcrypt.email.ui.widget.EmailWebView @@ -129,6 +131,7 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi private val msgDetailsViewModel: MsgDetailsViewModel by viewModels { MsgDetailsViewModelFactory(args.localFolder, args.messageEntity, requireActivity().application) } + private val pgpSignatureHandlerViewModel: PgpSignatureHandlerViewModel by viewModels() private val attachmentsRecyclerViewAdapter = AttachmentsRecyclerViewAdapter( object : AttachmentsRecyclerViewAdapter.Listener { @@ -141,7 +144,7 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi if (block.type == MsgBlock.Type.DECRYPT_ERROR) { val decryptErrorMsgBlock = block as? DecryptErrorMsgBlock ?: continue val decryptErrorDetails = decryptErrorMsgBlock.decryptErr?.details ?: continue - if (decryptErrorDetails.type == PgpDecrypt.DecryptionErrorType.NEED_PASSPHRASE) { + if (decryptErrorDetails.type == PgpDecryptAndOrVerify.DecryptionErrorType.NEED_PASSPHRASE) { val fingerprints = decryptErrorMsgBlock.decryptErr.fingerprints ?: continue showNeedPassphraseDialog( fingerprints, @@ -188,12 +191,14 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi private var progressBarActionProgress: ProgressBar? = null private var rVAttachments: RecyclerView? = null private var rVMsgDetails: RecyclerView? = null + private var rVPgpBadges: RecyclerView? = null private var msgInfo: IncomingMessageInfo? = null private var folderType: FoldersManager.FolderType? = null private val labelsViewModel: LabelsViewModel by viewModels() private val recipientsViewModel: RecipientsViewModel by viewModels() private val msgDetailsAdapter = MsgDetailsRecyclerViewAdapter() + private val pgpBadgeListAdapter = PgpBadgeListAdapter() private var isAdditionalActionEnabled: Boolean = false private var isDeleteActionEnabled: Boolean = false @@ -462,10 +467,49 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi private fun updateMsgBody() { if (msgInfo != null) { + updatePgpBadges() updateMsgView() } } + private fun updatePgpBadges() { + msgInfo?.verificationResult?.let { verificationResult -> + val badges = mutableListOf() + + if (msgInfo?.encryptionType == MessageEncryptionType.ENCRYPTED) { + badges.add(PgpBadgeListAdapter.PgpBadge(PgpBadgeListAdapter.PgpBadge.Type.ENCRYPTED)) + } else { + badges.add(PgpBadgeListAdapter.PgpBadge(PgpBadgeListAdapter.PgpBadge.Type.NOT_ENCRYPTED)) + } + + if (verificationResult.isSigned) { + val badge = when { + verificationResult.hasBadSignatures -> { + PgpBadgeListAdapter.PgpBadge(PgpBadgeListAdapter.PgpBadge.Type.BAD_SIGNATURE) + } + + verificationResult.hasUnverifiedSignatures -> { + PgpBadgeListAdapter.PgpBadge(PgpBadgeListAdapter.PgpBadge.Type.CAN_NOT_VERIFY_SIGNATURE) + } + + verificationResult.isPartialSigned -> { + PgpBadgeListAdapter.PgpBadge(PgpBadgeListAdapter.PgpBadge.Type.ONLY_PARTIALLY_SIGNED) + } + + !verificationResult.isPartialSigned && verificationResult.hasMixedSignatures -> { + PgpBadgeListAdapter.PgpBadge(PgpBadgeListAdapter.PgpBadge.Type.MIXED_SIGNED) + } + + else -> PgpBadgeListAdapter.PgpBadge(PgpBadgeListAdapter.PgpBadge.Type.SIGNED) + } + badges.add(badge) + } else { + badges.add(PgpBadgeListAdapter.PgpBadge(PgpBadgeListAdapter.PgpBadge.Type.NOT_SIGNED)) + } + pgpBadgeListAdapter.submitList(badges) + } + } + private fun showConnLostHint() { showSnackbar( requireView(), getString(R.string.failed_load_message_from_email_server), @@ -649,6 +693,7 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi rVAttachments = view.findViewById(R.id.rVAttachments) rVMsgDetails = view.findViewById(R.id.rVMsgDetails) + rVPgpBadges = view.findViewById(R.id.rVPgpBadges) } private fun updateViews() { @@ -703,6 +748,16 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi adapter = msgDetailsAdapter } + rVPgpBadges?.apply { + layoutManager = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false) + addItemDecoration( + MarginItemDecoration( + marginRight = resources.getDimensionPixelSize(R.dimen.default_margin_small) + ) + ) + adapter = pgpBadgeListAdapter + } + tVTo?.text = prepareToText() val headers = mutableListOf().apply { @@ -1105,13 +1160,13 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi val decryptError = block.decryptErr ?: return View(context) when (decryptError.details?.type) { - PgpDecrypt.DecryptionErrorType.KEY_MISMATCH -> return generateMissingPrivateKeyLayout( + PgpDecryptAndOrVerify.DecryptionErrorType.KEY_MISMATCH -> return generateMissingPrivateKeyLayout( clipLargeText( block.content ), layoutInflater ) - PgpDecrypt.DecryptionErrorType.FORMAT -> { + PgpDecryptAndOrVerify.DecryptionErrorType.FORMAT -> { val formatErrorMsg = (getString( R.string.decrypt_error_message_badly_formatted, getString(R.string.app_name) @@ -1120,7 +1175,7 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi return getView(clipLargeText(block.content), formatErrorMsg, layoutInflater) } - PgpDecrypt.DecryptionErrorType.OTHER -> { + PgpDecryptAndOrVerify.DecryptionErrorType.OTHER -> { val otherErrorMsg = getString(R.string.decrypt_error_could_not_open_message, getString(R.string.app_name)) + "\n\n" + getString( @@ -1134,7 +1189,7 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi else -> { var btText: String? = null var onClickListener: View.OnClickListener? = null - if (decryptError.details?.type == PgpDecrypt.DecryptionErrorType.NEED_PASSPHRASE) { + if (decryptError.details?.type == PgpDecryptAndOrVerify.DecryptionErrorType.NEED_PASSPHRASE) { btText = getString(R.string.fix) onClickListener = View.OnClickListener { val fingerprints = decryptError.fingerprints ?: return@OnClickListener @@ -1143,8 +1198,8 @@ class MessageDetailsFragment : BaseFragment(), ProgressBehaviour, View.OnClickLi } val detailedMessage = when (decryptError.details?.type) { - PgpDecrypt.DecryptionErrorType.NO_MDC -> getString(R.string.decrypt_error_message_no_mdc) - PgpDecrypt.DecryptionErrorType.BAD_MDC -> getString(R.string.decrypt_error_message_bad_mdc) + PgpDecryptAndOrVerify.DecryptionErrorType.NO_MDC -> getString(R.string.decrypt_error_message_no_mdc) + PgpDecryptAndOrVerify.DecryptionErrorType.BAD_MDC -> getString(R.string.decrypt_error_message_bad_mdc) else -> decryptError.details?.message } diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/adapter/PgpBadgeListAdapter.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/adapter/PgpBadgeListAdapter.kt new file mode 100644 index 0000000000..666151f36d --- /dev/null +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/adapter/PgpBadgeListAdapter.kt @@ -0,0 +1,91 @@ +/* + * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com + * Contributors: DenBond7 + */ + +package com.flowcrypt.email.ui.adapter + +import android.content.Context +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.ImageView +import android.widget.TextView +import androidx.core.content.ContextCompat +import androidx.recyclerview.widget.DiffUtil +import androidx.recyclerview.widget.ListAdapter +import androidx.recyclerview.widget.RecyclerView +import com.flowcrypt.email.R + +/** + * @author Denis Bondarenko + * Date: 12/10/21 + * Time: 11:41 AM + * E-mail: DenBond7@gmail.com + */ +class PgpBadgeListAdapter : ListAdapter(DiffUtilCallBack()) { + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { + return ViewHolder( + LayoutInflater.from(parent.context).inflate(R.layout.item_pgp_badge, parent, false) + ) + } + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + holder.bindTo(getItem(position)) + } + + inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { + private val imageViewIcon: ImageView = itemView.findViewById(R.id.imageViewIcon) + private val textViewStatus: TextView = itemView.findViewById(R.id.textViewStatus) + var badgeType: PgpBadge.Type? = null + + fun bindTo(item: PgpBadge) { + badgeType = item.type + itemView.backgroundTintList = ContextCompat.getColorStateList( + itemView.context, item.type.backgroundColorId + ) + imageViewIcon.setImageResource(item.type.imageResourceId) + textViewStatus.text = item.getLocalizedText(itemView.context) + } + } + + data class PgpBadge(val type: Type) { + fun getLocalizedText(context: Context): CharSequence { + return when (type) { + Type.ENCRYPTED -> context.getString(R.string.encrypted) + Type.SIGNED -> context.getString(R.string.signed) + Type.NOT_ENCRYPTED -> context.getString(R.string.not_encrypted) + Type.NOT_SIGNED -> context.getString(R.string.not_signed) + Type.BAD_SIGNATURE -> context.getString(R.string.bad_signature) + Type.ONLY_PARTIALLY_SIGNED -> context.getString(R.string.only_partially_signed) + Type.MIXED_SIGNED -> context.getString(R.string.mixed_signed) + Type.CAN_NOT_VERIFY_SIGNATURE -> context.getString(R.string.can_not_verify_signature) + Type.VERIFYING_SIGNATURE -> context.getString(R.string.verifying_signature) + } + } + + enum class Type constructor(val imageResourceId: Int, val backgroundColorId: Int) { + ENCRYPTED(R.drawable.ic_encrypted_badge_white_16, R.color.colorPrimary), + SIGNED(R.drawable.ic_signed_white_16, R.color.colorPrimary), + NOT_ENCRYPTED(R.drawable.ic_not_encrypted_badge_white_16, R.color.red), + NOT_SIGNED(R.drawable.ic_not_signed_white_16, R.color.red), + BAD_SIGNATURE(R.drawable.ic_bad_signature_white_16, R.color.red), + ONLY_PARTIALLY_SIGNED(R.drawable.ic_signing_warning_white_16, R.color.orange), + MIXED_SIGNED(R.drawable.ic_signing_warning_white_16, R.color.orange), + CAN_NOT_VERIFY_SIGNATURE(R.drawable.ic_signing_warning_white_16, R.color.orange), + VERIFYING_SIGNATURE(R.drawable.ic_verifying_signature_white_16, R.color.gray) + } + } + + class DiffUtilCallBack : DiffUtil.ItemCallback() { + override fun areItemsTheSame(oldItem: PgpBadge, newItem: PgpBadge): Boolean { + return oldItem.type == newItem.type + } + + override fun areContentsTheSame(oldItem: PgpBadge, newItem: PgpBadge): Boolean { + return oldItem == newItem + } + } +} diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/util/exception/DecryptionException.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/util/exception/DecryptionException.kt index 05753face1..9f4c7a9e71 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/util/exception/DecryptionException.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/util/exception/DecryptionException.kt @@ -7,7 +7,7 @@ package com.flowcrypt.email.util.exception import com.flowcrypt.email.api.retrofit.response.model.DecryptError import com.flowcrypt.email.api.retrofit.response.model.DecryptErrorDetails -import com.flowcrypt.email.security.pgp.PgpDecrypt +import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify /** * @author Denis Bondarenko @@ -16,7 +16,7 @@ import com.flowcrypt.email.security.pgp.PgpDecrypt * E-mail: DenBond7@gmail.com */ class DecryptionException( - val decryptionErrorType: PgpDecrypt.DecryptionErrorType, + val decryptionErrorType: PgpDecryptAndOrVerify.DecryptionErrorType, val e: Exception, val fingerprints: List = emptyList() ) : FlowCryptException(e) { diff --git a/FlowCrypt/src/main/res/drawable/ic_bad_signature_white_16.xml b/FlowCrypt/src/main/res/drawable/ic_bad_signature_white_16.xml new file mode 100644 index 0000000000..63fb8c9a30 --- /dev/null +++ b/FlowCrypt/src/main/res/drawable/ic_bad_signature_white_16.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/FlowCrypt/src/main/res/drawable/ic_baseline_report_gmailerrorred_24.xml b/FlowCrypt/src/main/res/drawable/ic_baseline_report_gmailerrorred_24.xml new file mode 100644 index 0000000000..63fb8c9a30 --- /dev/null +++ b/FlowCrypt/src/main/res/drawable/ic_baseline_report_gmailerrorred_24.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/FlowCrypt/src/main/res/drawable/ic_encrypted_badge_white_16.xml b/FlowCrypt/src/main/res/drawable/ic_encrypted_badge_white_16.xml new file mode 100644 index 0000000000..0a43b39306 --- /dev/null +++ b/FlowCrypt/src/main/res/drawable/ic_encrypted_badge_white_16.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/FlowCrypt/src/main/res/drawable/ic_not_encrypted_badge_white_16.xml b/FlowCrypt/src/main/res/drawable/ic_not_encrypted_badge_white_16.xml new file mode 100644 index 0000000000..b097b3c0f3 --- /dev/null +++ b/FlowCrypt/src/main/res/drawable/ic_not_encrypted_badge_white_16.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/FlowCrypt/src/main/res/drawable/ic_not_signed_white_16.xml b/FlowCrypt/src/main/res/drawable/ic_not_signed_white_16.xml new file mode 100644 index 0000000000..1bfa82de2d --- /dev/null +++ b/FlowCrypt/src/main/res/drawable/ic_not_signed_white_16.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/FlowCrypt/src/main/res/drawable/ic_signed_white_16.xml b/FlowCrypt/src/main/res/drawable/ic_signed_white_16.xml new file mode 100644 index 0000000000..8c49f61ce0 --- /dev/null +++ b/FlowCrypt/src/main/res/drawable/ic_signed_white_16.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/FlowCrypt/src/main/res/drawable/ic_signing_warning_white_16.xml b/FlowCrypt/src/main/res/drawable/ic_signing_warning_white_16.xml new file mode 100644 index 0000000000..ae56a42a4a --- /dev/null +++ b/FlowCrypt/src/main/res/drawable/ic_signing_warning_white_16.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/FlowCrypt/src/main/res/drawable/ic_verifying_signature_white_16.xml b/FlowCrypt/src/main/res/drawable/ic_verifying_signature_white_16.xml new file mode 100644 index 0000000000..f50fc1a404 --- /dev/null +++ b/FlowCrypt/src/main/res/drawable/ic_verifying_signature_white_16.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/FlowCrypt/src/main/res/layout/fragment_message_details.xml b/FlowCrypt/src/main/res/layout/fragment_message_details.xml index 0858362aa0..197e15e427 100644 --- a/FlowCrypt/src/main/res/layout/fragment_message_details.xml +++ b/FlowCrypt/src/main/res/layout/fragment_message_details.xml @@ -112,22 +112,6 @@ app:layout_constraintTop_toTopOf="@+id/tVTo" tools:text="1:05 PM" /> - - + + + + + + + + + + + diff --git a/FlowCrypt/src/main/res/values/strings.xml b/FlowCrypt/src/main/res/values/strings.xml index 2321a90a81..e3199a6c1e 100644 --- a/FlowCrypt/src/main/res/values/strings.xml +++ b/FlowCrypt/src/main/res/values/strings.xml @@ -546,4 +546,14 @@ Manually importing Public Keys received over email can be dangerous. Contact the sender to verify that the fingerprint matches. Manually importing Public Keys can be dangerous + PGP details badge + encrypted + signed + not encrypted + bad signature + only partially signed + can\'t verify signature + verifying signature… + not signed + mixed signed diff --git a/FlowCrypt/src/test/java/com/flowcrypt/email/ParcelableTest.kt b/FlowCrypt/src/test/java/com/flowcrypt/email/ParcelableTest.kt index f5f964a526..a9fafeee9b 100644 --- a/FlowCrypt/src/test/java/com/flowcrypt/email/ParcelableTest.kt +++ b/FlowCrypt/src/test/java/com/flowcrypt/email/ParcelableTest.kt @@ -10,6 +10,7 @@ import android.os.Parcel import android.os.Parcelable import com.flextrade.jfixture.JFixture import com.flowcrypt.email.api.email.model.OutgoingMessageInfo +import com.flowcrypt.email.api.retrofit.response.model.DecryptedAndOrSignedContentMsgBlock import com.flowcrypt.email.api.retrofit.response.model.GenericMsgBlock import com.flowcrypt.email.api.retrofit.response.model.MsgBlock import com.flowcrypt.email.api.retrofit.response.model.OrgRules @@ -23,6 +24,7 @@ import org.junit.Assert.assertNotNull import org.junit.Before import org.junit.Test import org.junit.runner.RunWith +import org.pgpainless.decryption_verification.OpenPgpMetadata import org.robolectric.ParameterizedRobolectricTestRunner import org.robolectric.annotation.Config import javax.mail.internet.InternetAddress @@ -48,6 +50,7 @@ class ParcelableTest(val name: String, private val currentClass: Class Delivered-To: default@flowcrypt.test Received: from mail.flowcrypt.test by mail.flowcrypt.test with LMTP - id 6c37Fu3MqWFABQAAc/RpdQ + id F6uPOgJos2GyAwAAc/RpdQ (envelope-from ) - for ; Fri, 03 Dec 2021 07:53:17 +0000 + for ; Fri, 10 Dec 2021 14:45:22 +0000 Received: from localhost (localhost [127.0.0.1]) - by mail.flowcrypt.test (Postfix) with ESMTP id 5AAA0445C2 - for ; Fri, 3 Dec 2021 07:53:17 +0000 (UTC) -Date: Fri, 3 Dec 2021 09:53:14 +0200 (GMT+02:00) + by mail.flowcrypt.test (Postfix) with ESMTP id EC1CC6C1E67 + for ; Fri, 10 Dec 2021 14:45:22 +0000 (UTC) +Date: Fri, 10 Dec 2021 16:44:37 +0200 (GMT+02:00) From: denbond7@flowcrypt.test To: default@flowcrypt.test -Message-ID: <433031.2.1638517996358@localhost> -Subject: Message with Pub key(has no suitable encryption subkeys) +Message-ID: <36760296.1.1639147477268@flowcrypt.test> +Subject: Encrypted + NOT signed Mime-Version: 1.0 Content-Type: multipart/mixed; - boundary="----=_Part_0_64286997.1638517994213" + boundary="----=_Part_0_143475953.1639147477209" -------=_Part_0_64286997.1638517994213 +------=_Part_0_143475953.1639147477209 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit -This message has an attached pub key that has no suitable encryption subkeys -------=_Part_0_64286997.1638517994213 -Content-Type: application/pgp-keys; - name=0x58DF2107B952BA3721A6081AA06BBF82A207B21E.asc -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; - filename=0x58DF2107B952BA3721A6081AA06BBF82A207B21E.asc -Content-ID: - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: FlowCrypt 1.2.5_dev_125__2021_12_03 Gmail Encryption -Comment: Seamlessly send and receive encrypted email +-----BEGIN PGP MESSAGE----- +Version: PGPainless -mQGNBGGoseUBDAC+rKhZ8nrDsrKDRh3RfSPywgPk8hnOFPioamZFrn/cySgXAh82 -9gWewD0YezSlnOFd15rf86UovHo0Sk5pVyaeAV04s8Nfc2sZZZDayFr232/mcK6L -IM9I5UxirEzSFSHPdV+zCjr9v/6Yn5m0agc16g6McmHGmSnOLyMjy9Hg9gUCGpMg -ZYXSab8NGEaYy6Z5ChaBjS/l5ZyezBU55/+7cHkIAHYUxmDdY1po+y2U5CTna/Ab -XDnlXCfhtnTDpKI8q72DDINgF9qEyJzWOX3uiwoyWnLUpzmeFGWPR0UsbP4e3UdJ -rqNzbFXNLNJSN/EQ/2TGs1wbyQ20csUoEiuA+Y14vn+Kc1zjo4YRIB861pf7yude -BsNOCy+37Jad71DL7FLYsBp7/fhG8u+9JCA1evDBh7FvXJKma/1tJkD92lWXWVUc -qRRZdO84AQXpgXEsJX7DCwlNy/bBmwDXgK8pdIWfDEcB417eMxC3QiehzIVjsg2Z -DeqgGVBqBZ/4GEcAEQEAAbQkbm9fZW5jcnlwdGlvbl9zdWJrZXlzQGZsb3djcnlw -dC50ZXN0iQHUBBMBCAA+FiEEWN8hB7lSujchpggaoGu/gqIHsh4FAmGoseUCGwMF -CQPCZwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQoGu/gqIHsh4HeAv/eHWD -eaKLHy0W+p34vl7lobZ6ndpZekCdP8ve29Mtdu46CS7W5N2u5lTEcd6ir+tq8WB0 -6MqZ/Kr6o1HsVDrsrDeH4pQxN6FzuIY4uiPbySsIBvy6ZLSxjO7U1dayfA2a9BIG -nJd2W9fYIsyqokUXdX+0m+SoYIVglLUvEJZbZNKI4oNepRU73gyKMbU9HQN9mvPR -fCpigPh+xPoiafgwF1cPDl2drGcBZOE5H7LTcyIFKqH8sFMDiZRB7Werq/uFEx5v -k2iu0D9a/cZGE+UVtoVok0rAFGi2QtRixDcfe+wq60UfjCRBObFlBUgvl1HISlWE -0C5P6HClHqqzhbr8ZbkTvNqeR3ae2Nbiy1ImV8uLdRNZFrtOgvtFa6gjszsGE0FX -wRtJP9ayy02yPrpMzMkv34ApEy5+07wORTbaCsaWdzKsYOJIxlmx3eBATrgNjVSo -Rt0qgcuC6CEmV+jmAWurIFndYlp/AJYyJZ9JYm8JlBJhltkcDSxyhZrUYof4 -=0YiW ------END PGP PUBLIC KEY BLOCK----- +hF4D16Pe22XLHvsSAQdApkbDtf6GMhbUdIG8lbA1xVidfOw1xw90yYMKSeUd1lMw +HIPCm32G4OnJFEgSodLZGIjLXAR98YlPANHx8CI12avC5FzWQrbhegmdhnHzw/Ti +hF4DTxRYvSK3u1MSAQdAur1cw4tCsoeoQm4vzslmw+Nr57fIj0rkhhzVnaM/IBYw +MGUnTXLXmjvVnGKb5XZHmpkybOFMtXrZKvddQfJ+uY5BAevGDCCLeJySGceMbDta +0k0B7jC+C2ZeZdJzFcvzhotQDWSM2YOvRNKA0BkMyVsJabUKY1xExidzBQnK5HSp +Ru9HZjZJZTsBnbji9GwvfvgMXlc9LxP53hLdW6lszA== +=xJjg +-----END PGP MESSAGE----- -------=_Part_0_64286997.1638517994213-- +------=_Part_0_143475953.1639147477209--  -R61a9cced -Vaf2 -Ga16d0d17edcca9614005000073f46975 +R61b36802 +V571 +G892aa93a0268b361b203000073f46975 diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.31 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.31 new file mode 100644 index 0000000000..454af1b80e --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.31 @@ -0,0 +1,42 @@ +2 M1e C61b368df +N 00000000000004CC +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id Mv2+B99os2GuBwAAc/RpdQ + (envelope-from ) + for ; Fri, 10 Dec 2021 14:49:03 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 1C4DA6C1E68 + for ; Fri, 10 Dec 2021 14:49:03 +0000 (UTC) +Date: Fri, 10 Dec 2021 16:49:00 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <124374216.1.1639147740952@flowcrypt.test> +Subject: NOT encrypted + signed(Inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_176969482.1639147740896" + +------=_Part_0_176969482.1639147740896 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCV2WKHzbNaPa+cYT2skMYCAZ4l6sUJxZnpeaoqChmdeUmJeiqZCfl5O +pUJuanFxYnqqXkcpC4MYFwMbK1Pi5ow7DIqcAjBDxBRZDqZoXGM8bWneeT7xCkz4 +7ENGhitGLy5tuiSTY85ues+ItWT7wT2CITKucV8OHVkQ9ePp+xSG/2W/Nm2fzvZ0 ++k4VL8PMqSYF12u0TkrKFsRfvRAooudkzgQA +=c6F0 +-----END PGP MESSAGE----- + +------=_Part_0_176969482.1639147740896-- + + +R61b368df +V4ee +G195bd507df68b361ae07000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.32 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.32 new file mode 100644 index 0000000000..4628cade32 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.32 @@ -0,0 +1,47 @@ +2 M1e C61b3691f +N 0000000000000601 +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id 7exvFh9ps2HaCAAAc/RpdQ + (envelope-from ) + for ; Fri, 10 Dec 2021 14:50:07 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 593256C1E68 + for ; Fri, 10 Dec 2021 14:50:07 +0000 (UTC) +Date: Fri, 10 Dec 2021 16:50:05 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <80534408.1.1639147805211@flowcrypt.test> +Subject: Encrypted + signed(Inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_85360913.1639147805127" + +------=_Part_0_85360913.1639147805127 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdA3AUBbNBYHs7uBkHYPB2MScrOjyjr8H3uUHD/oV66NRUw +QwHSwqj/w5Zh1TIyCNPrL+5CHKw6AWoxf/tueiN7k18lxhrrrK2G4YcmW2IxhAD0 +hF4D16Pe22XLHvsSAQdADdHH+j+A9Vl8dYDlQLewJrBsDqoLXtL3C9qvSVBXo0Aw +zxk+hWPctb9Zuu9kexEZao2sA7CkyQIVuoX++toxpuUH2cnM2tMx2wdOsqk/b80u +0sASASXoL13FL1aRfUmJti8FXjwK7pu7sR7EOXq1dqVfuDRWT1PICa3cJRvTZbe1 +jsePedNvt74GsllnaoZykqcWoEfiEL0CvU796P60+CBpsxQ304rO9G41P1a9CtvR +OTAwOd+ZcfypPoNGQuw90TY/678yq03RROZMiZvHa96UqYPHjdo5q/7RjZVVde7k +JGplAW7C9+93vjJ8tl328hYItBpPF26dQB+AHMIz/AND0MwbnUEdJyPs9AGoVeak +xjaRjpUqh3BDc+mdxXlztNVdmRFQ +=YZEj +-----END PGP MESSAGE----- + +------=_Part_0_85360913.1639147805127-- + + +R61b3691f +V628 +G79aa80161f69b361da08000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.33 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.33 new file mode 100644 index 0000000000..fda31d5979 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.33 @@ -0,0 +1,48 @@ +2 M1e C61b4823b +N 0000000000000666 +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id UYGVDjuCtGHuDQAAc/RpdQ + (envelope-from ) + for ; Sat, 11 Dec 2021 10:49:31 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 382AC7E0A60 + for ; Sat, 11 Dec 2021 10:49:31 +0000 (UTC) +Date: Sat, 11 Dec 2021 12:49:28 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <83587077.1.1639219768957@flowcrypt.test> +Subject: Encrypted + signed(inband) + bad signature +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_10768010.1639219768882" + +------=_Part_0_10768010.1639219768882 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAtdnv+F2LD9GVA09dGxdtNXp9XOUNildn0KoRRyfS71Yw +oz40WsLIOFiq24WAnkZaig3mh3ZIZPH30CpNG6D50xJgH87vhlHr8KMc/UKCD8HT +hF4D16Pe22XLHvsSAQdAdmfEzaR46pX8T/DSVrKmGPlxKWaS/GYPCJbHwa1/8hsw +QpKP7zTwoRGg+OC01wgviQjaHehQ5PHCcgF92js19ipqeK0nZ6NumYBhuReeTn0j +0sBPATC6XlUcftJVv3oydls4C8Mpu+KK+fFvsgaZY5QeoLttl07GfRQMqPhpb6wb +5sEKrS0QTpxzAth07Ow22cETz+BYbxkVmbube82CBNwkiv8jF05expxtLdAUTSc4 +p9/hKUSFAXP/a4x5ce7ImZ8IeBftDfD1UjCvL/vPqhGfuPg/ObAPAIk4vs6K8yGW +0ub67smJCF6x3rTeYWJHtZA2w3aYX332klhyWWyyvq4EhfkViNCbch0gkBvrqxd0 +hIoSRW4Tg/SzbTNbwvoojwB4Qn/NKj6tG+/NCXsNoCaAW24oCpJC+J5CUUbHVH3O +Ru2kYMZ0/G0F3zplBJ+UdNl3edCVuOsYKosqA251SpbBhw== +=52uO +-----END PGP MESSAGE----- + +------=_Part_0_10768010.1639219768882-- + + +R61b4823b +V68e +G9916ac0e3b82b461ee0d000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.34 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.34 new file mode 100644 index 0000000000..163bb04c2f --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.34 @@ -0,0 +1,43 @@ +2 M1e C61b483d4 +N 0000000000000529 +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id DceBDNSDtGElFQAAc/RpdQ + (envelope-from ) + for ; Sat, 11 Dec 2021 10:56:20 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 2FF697E0A63 + for ; Sat, 11 Dec 2021 10:56:20 +0000 (UTC) +Date: Sat, 11 Dec 2021 12:56:17 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <106293212.1.1639220177972@flowcrypt.test> +Subject: NOT encrypted + signed(inband) + bad signature +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_141207675.1639220177900" + +------=_Part_0_141207675.1639220177900 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCX2jaFz8aOWw08ZT6cnMYCAZ4l6sUKiQlFqemlOYpFCbmpxcWJ6qkJJ +RmKJQnlisUJxZnpeaopCeWZJBlBZeVF+XrpCQVFmWWJJqkJ2aqWeQnBqXkpqkUJi +XgpELZBZlKqQkpmWllqUmlei11HKwiDGxcDGypS4pfkigyKnAMwNYoosHXsObGz8 +luG6RyfyAkx4oz8jw8yK2S9W5S19cGL2MsGt7+3eVS0MPiv4Zp367xdLbDUKb0xn ++O+T+pZxU/QMpfK1GqsbxbL2eXkEq9kvZjlr4FvM3tH7kBEA +=BWVd +-----END PGP MESSAGE----- + +------=_Part_0_141207675.1639220177900-- + + +R61b483d4 +V54c +G01c0920cd483b4612515000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.35 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.35 new file mode 100644 index 0000000000..c3acda2d89 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.35 @@ -0,0 +1,59 @@ +2 M1e C61b48f10 +N 00000000000007CE +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id U5V7IRCPtGGABQAAc/RpdQ + (envelope-from ) + for ; Sat, 11 Dec 2021 11:44:16 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 85B8C7E0A66 + for ; Sat, 11 Dec 2021 11:44:16 +0000 (UTC) +Date: Sat, 11 Dec 2021 13:44:14 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <18216133.1.1639223054277@flowcrypt.test> +Subject: Encrypted + signed partially(inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_233169424.1639223054262" + +------=_Part_0_233169424.1639223054262 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAk9cJSvMdCEy720HDusXhkyPPueKN/lCJs7a+9ZipNkMw +t7kWnNV1GPawCh2AO4tsQAglt05gXfMVp6KZuobhOzAo8ejsFZ8l6NrmD9GkSKgk +hF4D16Pe22XLHvsSAQdAYZljKw41PYIeGNnPxbXXj+fMEVZ7r95/jGx24PiL2nsw +2mxZJ0IFqejwD1EtWWHGdCvQJq9hRE3xGUqG5KutLvFP70rZr7ohNzEZW3g8hIl7 +0sAOAZdOkq7hFd+2edSp6QoBo08lCtGPZ99uWjZMJ2O0xlrzXQHHfiKo29jLE4dd +QSLDkAEe6NFeGxFFtETWipOL/a7spfrSuGhC6irfR6kVVlvloMDGJQqdMyaJx/6r +JA68fo+lcMeN198b471AMPnMfzuhh5UnudeKfTsP4G/phi+PFPdVCyvbCPVCfzC/ +1SwnbFOfc3HzjDqy61i1L44qDuEIXe2DKQqRvKOcWcUjiHM5/v+oGaqTrzINmvMA +XoGVOoniX+yu/7XfbhKbybw= +=SzXS +-----END PGP MESSAGE----- + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4D16Pe22XLHvsSAQdALlp3UOL9wBsSRF3uIEH5imchVNuITE2KqoJdMtKRq1Ew ++1jecnPqy2r3gsk2ixXt53R/oqyleCaCa05WwQH2jvOlJBLYDSaG0nvPTXGYhFD1 +hF4DTxRYvSK3u1MSAQdAxmUBg1MOvPSKFfVE5UraFUX5hzEIOo/IBxoGt6mfTC4w +DihowFXP5XlePFtr3z7M/R00Wkmw/TAa+fukqjLTFrYIuacQW1gTiEYfOOif8V4d +0k0BBHpU9I+AK/yYkkSdhW3C4JowbvOYvOFFtq5z+2/4jrZGgGmiydLBQ+ASCJTW +5LoxisOo1ZWXU5GyhEsUfGWomTmIqdHPr6QOxEZmDw== +=jl09 +-----END PGP MESSAGE----- + +------=_Part_0_233169424.1639223054262-- + + +R61b48f10 +V801 +Gd1688c21108fb4618005000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.36 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.36 new file mode 100644 index 0000000000..9f186e92c0 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.36 @@ -0,0 +1,44 @@ +2 M1e C61b48fc7 +N 00000000000004D3 +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id bfJgJ8ePtGHDCAAAc/RpdQ + (envelope-from ) + for ; Sat, 11 Dec 2021 11:47:19 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 9DF3F7E0A69 + for ; Sat, 11 Dec 2021 11:47:19 +0000 (UTC) +Date: Sat, 11 Dec 2021 13:47:17 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <134516345.1.1639223237410@flowcrypt.test> +Subject: NOT encrypted + signed partially(inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_104860116.1639223237396" + +------=_Part_0_104860116.1639223237396 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +Some plain text + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCV2WKHzbNaPa+cYT0smMYCAf15OpUJxZnpeaopCbmpxcWJ6akcpC4MY +FwMbK1Pilt7tDIqcAjBdYoosB1M0rjGetjTvPJ94BSZ8iZmR4cTMG9aGhvM/T7z3 +ceaf7VPS4l55x0m3eXiIXqm71HX8sQcjw7/JfNKsbvpM+sH6siuTFmrfPrjCsp+J +VTNI6HmdjMpMVgA= +=4Gih +-----END PGP MESSAGE----- + +------=_Part_0_104860116.1639223237396-- + + +R61b48fc7 +V4f7 +G317c7727c78fb461c308000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.37 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.37 new file mode 100644 index 0000000000..4c03f69d4a --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.37 @@ -0,0 +1,61 @@ +2 M1e C61b6e8eb +N 0000000000000891 +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id hynLJ+votmFNBwAAc/RpdQ + (envelope-from ) + for ; Mon, 13 Dec 2021 06:32:11 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 9F6B67E0E3C + for ; Mon, 13 Dec 2021 06:32:11 +0000 (UTC) +Date: Sat, 11 Dec 2021 14:47:14 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <110314482.1.1639226834163@flowcrypt.test> +Subject: Encrypted + signed mixed(inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_150365359.1639226834147" + +------=_Part_0_150365359.1639226834147 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAyDv4lT7yZwY+k7XTngGbM9R3TSIDfJ05jjPtP1tgVhww +Ow986yKDq8RwNwRuOP+Zetgzv3Rueds53oH6WubsfFbkfqDddSuxbivSPMaJrsEa +hF4D16Pe22XLHvsSAQdAm0JxdCnyvGhOwCeljYCmXnnR6bd7sfxTpHbiBN5eiUYw +vXWpjLvybfnbIwMFOkYJY7xLi0nbiMG4GYKTUzy1UZYezPlig0CN65zXmQtwSX+I +0sAXAXZTOnpBBAC7adCCn98X8ym6EhabfV/Kxtk54zNP4/E2tEs88G3eKRHAcFYA +dsSRpd6fbQ+Od+2MxRr29gKdH/IMk+zuhg4K45HEu24039/1KyV31g+L35A9764A +yxGwyMw816TcSK4Rfx3ZdRc4gxRy1chCLf9QDlTowDiaiAk14ntfqqUOZTUj+OcV +80bEHI8VxTs1KPgqHvt0dOkSQBJzLk/4OlqOhoRBTJq2TBaP2iBlO4/MMKlhG4NG +ubaIKDKh/tfhMteAfWE52yiz3htm980akzc= +=rudy +-----END PGP MESSAGE----- + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdArBX9SbPgfhP9wqWOBFvkfDKBxszXMVfDrmKr31dNOh8w +tOprLXmSEJw6YwEIqAXByU/olv90UG7sEmIkI7J6AEmyFOkSDokJPAQrpU9Umcum +hF4DdhH7TgaiP74SAQdANFfZyN86QhSBkh5ywThUC/nNmQlkIUJ2pEuCF7IEKAIw +4xVCdmdRlEltVVP4K7OnGme3nQEmnANDXdZ69HQJYUSMsgFWB3HkFJ/iqM4b3TNe +0sAXATT2v+7RWASJS/tLN1a2XEMy+ybwNremGO0IPo8ji9EQOcFaD029OvMdq2C+ +AHXxBqmi1hcnn2CuLVyAOWh5bj0VJSKuMsgx1yDMpYItfuhTLs0dQ1JA93dJCfi2 +7r6ueKx5eDv5y6hr3thNn+ctOF0r7CDOZWtE5oznOErmmg05Q+nGMJzN85kGV6mj +1cmYEq6/sVjYf6J+iYFVkywdY7ne+FBHjJ0cX4JEmvy4SCfO51cM+cGzFtup+a6P +afd0d2jaJS9rkgbmS4VMtGIlfrCMIOhl6ws= +=1cM4 +-----END PGP MESSAGE----- +------=_Part_0_150365359.1639226834147-- + + +R61b6e8eb +V8c6 +G411be127ebe8b6614d07000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.38 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.38 new file mode 100644 index 0000000000..2ff30ba582 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.38 @@ -0,0 +1,51 @@ +2 M1e C61b6ea94 +N 00000000000005F3 +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id Q6lDHJTqtmGyDgAAc/RpdQ + (envelope-from ) + for ; Mon, 13 Dec 2021 06:39:16 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 708E07E22DC + for ; Mon, 13 Dec 2021 06:39:16 +0000 (UTC) +Date: Sat, 11 Dec 2021 14:54:18 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <178316538.1.1639227258998@flowcrypt.test> +Subject: NOT encrypted + signed mixed(inband) +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_254081431.1639227258976" + +------=_Part_0_254081431.1639227258976 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCV2WKHzbNaPa+cYT8snMYBAcGZ6XmqKQnlmSYZCokJBUWZuYlGlQnZq +ZUcpC4MYFwMbK1Pi1uf+DIqcAjC9YoosB1M0rjGetjTvPJ94BSZsw8vwV2r5jx3K +D09YX2YxmXdpntcL7iO8J4vT5asfPUv6f+iMRDojwyG9s+lHxOMUJ60VP6tl/sjr +Kedlni+bmO2MptWmXQj0YQMA +=usCN +-----END PGP MESSAGE----- + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCXWaL/vvdiErcGMpxWSGEAgODM9LzVFoTyzJEOhJCNVoTg1OT8vRSE7 +tbKjlIVBjIuBjZUpcevzDwyKnAIwzWKKLHfMHwmFMAmaprieNocJp/Uy/A/MjTzK +N9UkpXLTg0dXFFasM5wQxT93ufHj+o9hhzuO97YxMlwwsG+6lNHn4xkilcwbmmhx +/ernRzJH7rFaPLM7d/zlHj4A +=Yz2p +-----END PGP MESSAGE----- +------=_Part_0_254081431.1639227258976-- + + +R61b6ea94 +V61e +G410d551c94eab661b20e000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.39 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.39 new file mode 100644 index 0000000000..fbcf748415 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.39 @@ -0,0 +1,47 @@ +2 M1e C61b74bd8 +N 0000000000000666 +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id KrPbA9hLt2FtDgAAc/RpdQ + (envelope-from ) + for ; Mon, 13 Dec 2021 13:34:16 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id 0C05F84061C + for ; Mon, 13 Dec 2021 13:34:16 +0000 (UTC) +Date: Mon, 13 Dec 2021 15:34:13 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <176319358.1.1639402453750@flowcrypt.test> +Subject: Encrypted + signed(inband) + no pub key +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_123085323.1639402453729" + +------=_Part_0_123085323.1639402453729 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAtdnv+F2LD9GVA09dGxdtNXp9XOUNildn0KoRRyfS71Yw +oz40WsLIOFiq24WAnkZaig3mh3ZIZPH30CpNG6D50xJgH87vhlHr8KMc/UKCD8HT +hF4D16Pe22XLHvsSAQdAdmfEzaR46pX8T/DSVrKmGPlxKWaS/GYPCJbHwa1/8hsw +QpKP7zTwoRGg+OC01wgviQjaHehQ5PHCcgF92js19ipqeK0nZ6NumYBhuReeTn0j +0sBPATC6XlUcftJVv3oydls4C8Mpu+KK+fFvsgaZY5QeoLttl07GfRQMqPhpb6wb +5sEKrS0QTpxzAth07Ow22cETz+BYbxkVmbube82CBNwkiv8jF05expxtLdAUTSc4 +p9/hKUSFAXP/a4x5ce7ImZ8IeBftDfD1UjCvL/vPqhGfuPg/ObAPAIk4vs6K8yGW +0ub67smJCF6x3rTeYWJHtZA2w3aYX332klhyWWyyvq4EhfkViNCbch0gkBvrqxd0 +hIoSRW4Tg/SzbTNbwvoojwB4Qn/NKj6tG+/NCXsNoCaAW24oCpJC+J5CUUbHVH3O +Ru2kYMZ0/G0F3zplBJ+UdNl3edCVuOsYKosqA251SpbBhw== +=52uO +-----END PGP MESSAGE----- +------=_Part_0_123085323.1639402453729-- + + +R61b74bd8 +V68d +G4994f703d84bb7616d0e000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.40 b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.40 new file mode 100644 index 0000000000..af48e13dec --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/INBOX/dbox-Mails/u.40 @@ -0,0 +1,42 @@ +2 M1e C61b74c72 +N 0000000000000520 +Return-Path: +Delivered-To: default@flowcrypt.test +Received: from mail.flowcrypt.test + by mail.flowcrypt.test with LMTP + id 7nTaL3JMt2EwEQAAc/RpdQ + (envelope-from ) + for ; Mon, 13 Dec 2021 13:36:50 +0000 +Received: from localhost (localhost [127.0.0.1]) + by mail.flowcrypt.test (Postfix) with ESMTP id C0AAD84061F + for ; Mon, 13 Dec 2021 13:36:50 +0000 (UTC) +Date: Mon, 13 Dec 2021 15:36:48 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <2967984.1.1639402608568@flowcrypt.test> +Subject: NOT encrypted + signed(inband) + no pub key +Mime-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_15474263.1639402608553" + +------=_Part_0_15474263.1639402608553 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCX2jaFz8aOWw08ZT6cnMYCAZ4l6sUKiQlFqemlOYpFCbmpxcWJ6qkJJ +RmKJQnlisUJxZnpeaopCeWZJBlBZeVF+XrpCQVFmWWJJqkJ2aqWeQnBqXkpqkUJi +XgpELZBZlKqQkpmWllqUmlei11HKwiDGxcDGypS4pfkigyKnAMwNYoosHXsObGz8 +luG6RyfyAkx4oz8jw8yK2S9W5S19cGL2MsGt7+3eVS0MPiv4Zp367xdLbDUKb0xn ++O+T+pZxU/QMpfK1GqsbxbL2eXkEq9kvZjlr4FvM3tH7kBEA +=BWVd +-----END PGP MESSAGE----- +------=_Part_0_15474263.1639402608553-- + + +R61b74c72 +V542 +G71a5ec2f724cb7613011000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Junk/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Junk/dbox-Mails/dovecot.index.log index 75524163a0..194df4c091 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Junk/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Junk/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Sent/dbox-Mails/dovecot.index.cache b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Sent/dbox-Mails/dovecot.index.cache index 08d49b6cfc..373096aabf 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Sent/dbox-Mails/dovecot.index.cache and b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Sent/dbox-Mails/dovecot.index.cache differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Sent/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Sent/dbox-Mails/dovecot.index.log index 533f0ed155..f00458d855 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Sent/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Sent/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Trash/dbox-Mails/dovecot.index.cache b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Trash/dbox-Mails/dovecot.index.cache index 4534e445b4..482b07aaa3 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Trash/dbox-Mails/dovecot.index.cache and b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Trash/dbox-Mails/dovecot.index.cache differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Trash/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Trash/dbox-Mails/dovecot.index.log index 90cffb560f..88503ee780 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Trash/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/default/mailboxes/Trash/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index index 063a887e8d..a4d457df1c 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index.log b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index.log index 9fbdd733c1..4bb6f6e1db 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index.log.2 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index.log.2 index e07944ced9..4ec3c2d147 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index.log.2 and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/dovecot.list.index.log.2 differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Drafts/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Drafts/dbox-Mails/dovecot.index.log index 3e51a572fc..fe6782230a 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Drafts/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Drafts/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/INBOX/dbox-Mails/dovecot.index.cache b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/INBOX/dbox-Mails/dovecot.index.cache index 30672ca87e..6adef98865 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/INBOX/dbox-Mails/dovecot.index.cache and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/INBOX/dbox-Mails/dovecot.index.cache differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/INBOX/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/INBOX/dbox-Mails/dovecot.index.log index 70c8898066..43603bcba6 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/INBOX/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/INBOX/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Junk/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Junk/dbox-Mails/dovecot.index.log index d4bea6f296..cc2712859c 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Junk/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Junk/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index index 9982556eac..4f2227d5dc 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index.cache b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index.cache index 9bf2a1d813..ed153c7d92 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index.cache and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index.cache differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index.log index 0a31c77b8a..3c2fbb86b5 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.27 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.27 index 6d23aba770..f44829fd2b 100644 --- a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.27 +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.27 @@ -1,58 +1,35 @@ -2 M1e C61a9cced -N 0000000000000928 -Date: Fri, 3 Dec 2021 09:53:14 +0200 (GMT+02:00) +2 M1e C61b36802 +N 00000000000003BD +Date: Fri, 10 Dec 2021 16:44:37 +0200 (GMT+02:00) From: denbond7@flowcrypt.test To: default@flowcrypt.test -Message-ID: <433031.2.1638517996358@localhost> -Subject: Message with Pub key(has no suitable encryption subkeys) +Message-ID: <36760296.1.1639147477268@flowcrypt.test> +Subject: Encrypted + NOT signed MIME-Version: 1.0 Content-Type: multipart/mixed; - boundary="----=_Part_0_64286997.1638517994213" -User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_03 + boundary="----=_Part_0_143475953.1639147477209" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_10 -------=_Part_0_64286997.1638517994213 +------=_Part_0_143475953.1639147477209 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit -This message has an attached pub key that has no suitable encryption subkeys -------=_Part_0_64286997.1638517994213 -Content-Type: application/pgp-keys; - name=0x58DF2107B952BA3721A6081AA06BBF82A207B21E.asc -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; - filename=0x58DF2107B952BA3721A6081AA06BBF82A207B21E.asc -Content-ID: - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: FlowCrypt 1.2.5_dev_125__2021_12_03 Gmail Encryption -Comment: Seamlessly send and receive encrypted email +-----BEGIN PGP MESSAGE----- +Version: PGPainless -mQGNBGGoseUBDAC+rKhZ8nrDsrKDRh3RfSPywgPk8hnOFPioamZFrn/cySgXAh82 -9gWewD0YezSlnOFd15rf86UovHo0Sk5pVyaeAV04s8Nfc2sZZZDayFr232/mcK6L -IM9I5UxirEzSFSHPdV+zCjr9v/6Yn5m0agc16g6McmHGmSnOLyMjy9Hg9gUCGpMg -ZYXSab8NGEaYy6Z5ChaBjS/l5ZyezBU55/+7cHkIAHYUxmDdY1po+y2U5CTna/Ab -XDnlXCfhtnTDpKI8q72DDINgF9qEyJzWOX3uiwoyWnLUpzmeFGWPR0UsbP4e3UdJ -rqNzbFXNLNJSN/EQ/2TGs1wbyQ20csUoEiuA+Y14vn+Kc1zjo4YRIB861pf7yude -BsNOCy+37Jad71DL7FLYsBp7/fhG8u+9JCA1evDBh7FvXJKma/1tJkD92lWXWVUc -qRRZdO84AQXpgXEsJX7DCwlNy/bBmwDXgK8pdIWfDEcB417eMxC3QiehzIVjsg2Z -DeqgGVBqBZ/4GEcAEQEAAbQkbm9fZW5jcnlwdGlvbl9zdWJrZXlzQGZsb3djcnlw -dC50ZXN0iQHUBBMBCAA+FiEEWN8hB7lSujchpggaoGu/gqIHsh4FAmGoseUCGwMF -CQPCZwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQoGu/gqIHsh4HeAv/eHWD -eaKLHy0W+p34vl7lobZ6ndpZekCdP8ve29Mtdu46CS7W5N2u5lTEcd6ir+tq8WB0 -6MqZ/Kr6o1HsVDrsrDeH4pQxN6FzuIY4uiPbySsIBvy6ZLSxjO7U1dayfA2a9BIG -nJd2W9fYIsyqokUXdX+0m+SoYIVglLUvEJZbZNKI4oNepRU73gyKMbU9HQN9mvPR -fCpigPh+xPoiafgwF1cPDl2drGcBZOE5H7LTcyIFKqH8sFMDiZRB7Werq/uFEx5v -k2iu0D9a/cZGE+UVtoVok0rAFGi2QtRixDcfe+wq60UfjCRBObFlBUgvl1HISlWE -0C5P6HClHqqzhbr8ZbkTvNqeR3ae2Nbiy1ImV8uLdRNZFrtOgvtFa6gjszsGE0FX -wRtJP9ayy02yPrpMzMkv34ApEy5+07wORTbaCsaWdzKsYOJIxlmx3eBATrgNjVSo -Rt0qgcuC6CEmV+jmAWurIFndYlp/AJYyJZ9JYm8JlBJhltkcDSxyhZrUYof4 -=0YiW ------END PGP PUBLIC KEY BLOCK----- +hF4D16Pe22XLHvsSAQdApkbDtf6GMhbUdIG8lbA1xVidfOw1xw90yYMKSeUd1lMw +HIPCm32G4OnJFEgSodLZGIjLXAR98YlPANHx8CI12avC5FzWQrbhegmdhnHzw/Ti +hF4DTxRYvSK3u1MSAQdAur1cw4tCsoeoQm4vzslmw+Nr57fIj0rkhhzVnaM/IBYw +MGUnTXLXmjvVnGKb5XZHmpkybOFMtXrZKvddQfJ+uY5BAevGDCCLeJySGceMbDta +0k0B7jC+C2ZeZdJzFcvzhotQDWSM2YOvRNKA0BkMyVsJabUKY1xExidzBQnK5HSp +Ru9HZjZJZTsBnbji9GwvfvgMXlc9LxP53hLdW6lszA== +=xJjg +-----END PGP MESSAGE----- -------=_Part_0_64286997.1638517994213-- +------=_Part_0_143475953.1639147477209--  -R61a9ccea -V95a -G98fc3814edcca9612c05000073f46975 +R61b367d5 +V3d8 +Gb04310380268b3619e03000073f46975 diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.29 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.29 new file mode 100644 index 0000000000..8e7e249bd0 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.29 @@ -0,0 +1,33 @@ +2 M1e C61b368df +N 000000000000033C +Date: Fri, 10 Dec 2021 16:49:00 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <124374216.1.1639147740952@flowcrypt.test> +Subject: NOT encrypted + signed(Inband) +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_176969482.1639147740896" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_10 + +------=_Part_0_176969482.1639147740896 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCV2WKHzbNaPa+cYT2skMYCAZ4l6sUJxZnpeaoqChmdeUmJeiqZCfl5O +pUJuanFxYnqqXkcpC4MYFwMbK1Pi5ow7DIqcAjBDxBRZDqZoXGM8bWneeT7xCkz4 +7ENGhitGLy5tuiSTY85ues+ItWT7wT2CITKucV8OHVkQ9ePp+xSG/2W/Nm2fzvZ0 ++k4VL8PMqSYF12u0TkrKFsRfvRAooudkzgQA +=c6F0 +-----END PGP MESSAGE----- + +------=_Part_0_176969482.1639147740896-- + + +R61b368dc +V355 +Ge8d44b06df68b3619e07000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.30 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.30 new file mode 100644 index 0000000000..dcd3d85943 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.30 @@ -0,0 +1,38 @@ +2 M1e C61b3691f +N 0000000000000471 +Date: Fri, 10 Dec 2021 16:50:05 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <80534408.1.1639147805211@flowcrypt.test> +Subject: Encrypted + signed(Inband) +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_85360913.1639147805127" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_10 + +------=_Part_0_85360913.1639147805127 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdA3AUBbNBYHs7uBkHYPB2MScrOjyjr8H3uUHD/oV66NRUw +QwHSwqj/w5Zh1TIyCNPrL+5CHKw6AWoxf/tueiN7k18lxhrrrK2G4YcmW2IxhAD0 +hF4D16Pe22XLHvsSAQdADdHH+j+A9Vl8dYDlQLewJrBsDqoLXtL3C9qvSVBXo0Aw +zxk+hWPctb9Zuu9kexEZao2sA7CkyQIVuoX++toxpuUH2cnM2tMx2wdOsqk/b80u +0sASASXoL13FL1aRfUmJti8FXjwK7pu7sR7EOXq1dqVfuDRWT1PICa3cJRvTZbe1 +jsePedNvt74GsllnaoZykqcWoEfiEL0CvU796P60+CBpsxQ304rO9G41P1a9CtvR +OTAwOd+ZcfypPoNGQuw90TY/678yq03RROZMiZvHa96UqYPHjdo5q/7RjZVVde7k +JGplAW7C9+93vjJ8tl328hYItBpPF26dQB+AHMIz/AND0MwbnUEdJyPs9AGoVeak +xjaRjpUqh3BDc+mdxXlztNVdmRFQ +=YZEj +-----END PGP MESSAGE----- + +------=_Part_0_85360913.1639147805127-- + + +R61b3691d +V48f +Gf064b8151f69b361ce08000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.31 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.31 new file mode 100644 index 0000000000..088ea01539 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.31 @@ -0,0 +1,39 @@ +2 M1e C61b4823b +N 00000000000004D6 +Date: Sat, 11 Dec 2021 12:49:28 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <83587077.1.1639219768957@flowcrypt.test> +Subject: Encrypted + signed(inband) + bad signature +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_10768010.1639219768882" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_11 + +------=_Part_0_10768010.1639219768882 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAtdnv+F2LD9GVA09dGxdtNXp9XOUNildn0KoRRyfS71Yw +oz40WsLIOFiq24WAnkZaig3mh3ZIZPH30CpNG6D50xJgH87vhlHr8KMc/UKCD8HT +hF4D16Pe22XLHvsSAQdAdmfEzaR46pX8T/DSVrKmGPlxKWaS/GYPCJbHwa1/8hsw +QpKP7zTwoRGg+OC01wgviQjaHehQ5PHCcgF92js19ipqeK0nZ6NumYBhuReeTn0j +0sBPATC6XlUcftJVv3oydls4C8Mpu+KK+fFvsgaZY5QeoLttl07GfRQMqPhpb6wb +5sEKrS0QTpxzAth07Ow22cETz+BYbxkVmbube82CBNwkiv8jF05expxtLdAUTSc4 +p9/hKUSFAXP/a4x5ce7ImZ8IeBftDfD1UjCvL/vPqhGfuPg/ObAPAIk4vs6K8yGW +0ub67smJCF6x3rTeYWJHtZA2w3aYX332klhyWWyyvq4EhfkViNCbch0gkBvrqxd0 +hIoSRW4Tg/SzbTNbwvoojwB4Qn/NKj6tG+/NCXsNoCaAW24oCpJC+J5CUUbHVH3O +Ru2kYMZ0/G0F3zplBJ+UdNl3edCVuOsYKosqA251SpbBhw== +=52uO +-----END PGP MESSAGE----- + +------=_Part_0_10768010.1639219768882-- + + +R61b48238 +V4f5 +G8086ac0b3b82b461d80d000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.32 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.32 new file mode 100644 index 0000000000..d804160bc5 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.32 @@ -0,0 +1,34 @@ +2 M1e C61b483d4 +N 0000000000000399 +Date: Sat, 11 Dec 2021 12:56:17 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <106293212.1.1639220177972@flowcrypt.test> +Subject: NOT encrypted + signed(inband) + bad signature +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_141207675.1639220177900" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_11 + +------=_Part_0_141207675.1639220177900 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCX2jaFz8aOWw08ZT6cnMYCAZ4l6sUKiQlFqemlOYpFCbmpxcWJ6qkJJ +RmKJQnlisUJxZnpeaopCeWZJBlBZeVF+XrpCQVFmWWJJqkJ2aqWeQnBqXkpqkUJi +XgpELZBZlKqQkpmWllqUmlei11HKwiDGxcDGypS4pfkigyKnAMwNYoosHXsObGz8 +luG6RyfyAkx4oz8jw8yK2S9W5S19cGL2MsGt7+3eVS0MPiv4Zp367xdLbDUKb0xn ++O+T+pZxU/QMpfK1GqsbxbL2eXkEq9kvZjlr4FvM3tH7kBEA +=BWVd +-----END PGP MESSAGE----- + +------=_Part_0_141207675.1639220177900-- + + +R61b483d1 +V3b3 +G60ad600ad483b4611015000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.33 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.33 new file mode 100644 index 0000000000..b025d5f22d --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.33 @@ -0,0 +1,50 @@ +2 M1e C61b48f10 +N 000000000000063E +Date: Sat, 11 Dec 2021 13:44:14 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <18216133.1.1639223054277@flowcrypt.test> +Subject: Encrypted + signed partially(inband) +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_233169424.1639223054262" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_11 + +------=_Part_0_233169424.1639223054262 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAk9cJSvMdCEy720HDusXhkyPPueKN/lCJs7a+9ZipNkMw +t7kWnNV1GPawCh2AO4tsQAglt05gXfMVp6KZuobhOzAo8ejsFZ8l6NrmD9GkSKgk +hF4D16Pe22XLHvsSAQdAYZljKw41PYIeGNnPxbXXj+fMEVZ7r95/jGx24PiL2nsw +2mxZJ0IFqejwD1EtWWHGdCvQJq9hRE3xGUqG5KutLvFP70rZr7ohNzEZW3g8hIl7 +0sAOAZdOkq7hFd+2edSp6QoBo08lCtGPZ99uWjZMJ2O0xlrzXQHHfiKo29jLE4dd +QSLDkAEe6NFeGxFFtETWipOL/a7spfrSuGhC6irfR6kVVlvloMDGJQqdMyaJx/6r +JA68fo+lcMeN198b471AMPnMfzuhh5UnudeKfTsP4G/phi+PFPdVCyvbCPVCfzC/ +1SwnbFOfc3HzjDqy61i1L44qDuEIXe2DKQqRvKOcWcUjiHM5/v+oGaqTrzINmvMA +XoGVOoniX+yu/7XfbhKbybw= +=SzXS +-----END PGP MESSAGE----- + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4D16Pe22XLHvsSAQdALlp3UOL9wBsSRF3uIEH5imchVNuITE2KqoJdMtKRq1Ew ++1jecnPqy2r3gsk2ixXt53R/oqyleCaCa05WwQH2jvOlJBLYDSaG0nvPTXGYhFD1 +hF4DTxRYvSK3u1MSAQdAxmUBg1MOvPSKFfVE5UraFUX5hzEIOo/IBxoGt6mfTC4w +DihowFXP5XlePFtr3z7M/R00Wkmw/TAa+fukqjLTFrYIuacQW1gTiEYfOOif8V4d +0k0BBHpU9I+AK/yYkkSdhW3C4JowbvOYvOFFtq5z+2/4jrZGgGmiydLBQ+ASCJTW +5LoxisOo1ZWXU5GyhEsUfGWomTmIqdHPr6QOxEZmDw== +=jl09 +-----END PGP MESSAGE----- + +------=_Part_0_233169424.1639223054262-- + + +R61b48f0e +V668 +Gc848661f108fb4616c05000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.34 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.34 new file mode 100644 index 0000000000..c24e8c0090 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.34 @@ -0,0 +1,35 @@ +2 M1e C61b48fc7 +N 0000000000000343 +Date: Sat, 11 Dec 2021 13:47:17 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <134516345.1.1639223237410@flowcrypt.test> +Subject: NOT encrypted + signed partially(inband) +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_104860116.1639223237396" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_11 + +------=_Part_0_104860116.1639223237396 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +Some plain text + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCV2WKHzbNaPa+cYT0smMYCAf15OpUJxZnpeaopCbmpxcWJ6akcpC4MY +FwMbK1Pilt7tDIqcAjBdYoosB1M0rjGetjTvPJ94BSZ8iZmR4cTMG9aGhvM/T7z3 +ceaf7VPS4l55x0m3eXiIXqm71HX8sQcjw7/JfNKsbvpM+sH6siuTFmrfPrjCsp+J +VTNI6HmdjMpMVgA= +=4Gih +-----END PGP MESSAGE----- + +------=_Part_0_104860116.1639223237396-- + + +R61b48fc5 +V35e +G50b4e024c78fb461b008000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.35 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.35 new file mode 100644 index 0000000000..6d16a46524 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.35 @@ -0,0 +1,52 @@ +2 M1e C61b6e8eb +N 0000000000000701 +Date: Sat, 11 Dec 2021 14:47:14 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <110314482.1.1639226834163@flowcrypt.test> +Subject: Encrypted + signed mixed(inband) +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_150365359.1639226834147" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_13 + +------=_Part_0_150365359.1639226834147 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAyDv4lT7yZwY+k7XTngGbM9R3TSIDfJ05jjPtP1tgVhww +Ow986yKDq8RwNwRuOP+Zetgzv3Rueds53oH6WubsfFbkfqDddSuxbivSPMaJrsEa +hF4D16Pe22XLHvsSAQdAm0JxdCnyvGhOwCeljYCmXnnR6bd7sfxTpHbiBN5eiUYw +vXWpjLvybfnbIwMFOkYJY7xLi0nbiMG4GYKTUzy1UZYezPlig0CN65zXmQtwSX+I +0sAXAXZTOnpBBAC7adCCn98X8ym6EhabfV/Kxtk54zNP4/E2tEs88G3eKRHAcFYA +dsSRpd6fbQ+Od+2MxRr29gKdH/IMk+zuhg4K45HEu24039/1KyV31g+L35A9764A +yxGwyMw816TcSK4Rfx3ZdRc4gxRy1chCLf9QDlTowDiaiAk14ntfqqUOZTUj+OcV +80bEHI8VxTs1KPgqHvt0dOkSQBJzLk/4OlqOhoRBTJq2TBaP2iBlO4/MMKlhG4NG +ubaIKDKh/tfhMteAfWE52yiz3htm980akzc= +=rudy +-----END PGP MESSAGE----- + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdArBX9SbPgfhP9wqWOBFvkfDKBxszXMVfDrmKr31dNOh8w +tOprLXmSEJw6YwEIqAXByU/olv90UG7sEmIkI7J6AEmyFOkSDokJPAQrpU9Umcum +hF4DdhH7TgaiP74SAQdANFfZyN86QhSBkh5ywThUC/nNmQlkIUJ2pEuCF7IEKAIw +4xVCdmdRlEltVVP4K7OnGme3nQEmnANDXdZ69HQJYUSMsgFWB3HkFJ/iqM4b3TNe +0sAXATT2v+7RWASJS/tLN1a2XEMy+ybwNremGO0IPo8ji9EQOcFaD029OvMdq2C+ +AHXxBqmi1hcnn2CuLVyAOWh5bj0VJSKuMsgx1yDMpYItfuhTLs0dQ1JA93dJCfi2 +7r6ueKx5eDv5y6hr3thNn+ctOF0r7CDOZWtE5oznOErmmg05Q+nGMJzN85kGV6mj +1cmYEq6/sVjYf6J+iYFVkywdY7ne+FBHjJ0cX4JEmvy4SCfO51cM+cGzFtup+a6P +afd0d2jaJS9rkgbmS4VMtGIlfrCMIOhl6ws= +=1cM4 +-----END PGP MESSAGE----- +------=_Part_0_150365359.1639226834147-- + + +R61b49dd2 +V72d +G80269d25ebe8b6613507000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.36 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.36 new file mode 100644 index 0000000000..f621fac22a --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.36 @@ -0,0 +1,42 @@ +2 M1e C61b6ea94 +N 0000000000000463 +Date: Sat, 11 Dec 2021 14:54:18 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <178316538.1.1639227258998@flowcrypt.test> +Subject: NOT encrypted + signed mixed(inband) +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_254081431.1639227258976" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_13 + +------=_Part_0_254081431.1639227258976 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCV2WKHzbNaPa+cYT8snMYBAcGZ6XmqKQnlmSYZCokJBUWZuYlGlQnZq +ZUcpC4MYFwMbK1Pi1uf+DIqcAjC9YoosB1M0rjGetjTvPJ94BSZsw8vwV2r5jx3K +D09YX2YxmXdpntcL7iO8J4vT5asfPUv6f+iMRDojwyG9s+lHxOMUJ60VP6tl/sjr +Kedlni+bmO2MptWmXQj0YQMA +=usCN +-----END PGP MESSAGE----- + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCXWaL/vvdiErcGMpxWSGEAgODM9LzVFoTyzJEOhJCNVoTg1OT8vRSE7 +tbKjlIVBjIuBjZUpcevzDwyKnAIwzWKKLHfMHwmFMAmaprieNocJp/Uy/A/MjTzK +N9UkpXLTg0dXFFasM5wQxT93ufHj+o9hhzuO97YxMlwwsG+6lNHn4xkilcwbmmhx +/ernRzJH7rFaPLM7d/zlHj4A +=Yz2p +-----END PGP MESSAGE----- +------=_Part_0_254081431.1639227258976-- + + +R61b49f7a +V485 +G18a1fe1a94eab6619d0e000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.37 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.37 new file mode 100644 index 0000000000..b9435280e5 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.37 @@ -0,0 +1,38 @@ +2 M1e C61b74bd8 +N 00000000000004D6 +Date: Mon, 13 Dec 2021 15:34:13 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <176319358.1.1639402453750@flowcrypt.test> +Subject: Encrypted + signed(inband) + no pub key +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_123085323.1639402453729" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_13 + +------=_Part_0_123085323.1639402453729 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +hF4DTxRYvSK3u1MSAQdAtdnv+F2LD9GVA09dGxdtNXp9XOUNildn0KoRRyfS71Yw +oz40WsLIOFiq24WAnkZaig3mh3ZIZPH30CpNG6D50xJgH87vhlHr8KMc/UKCD8HT +hF4D16Pe22XLHvsSAQdAdmfEzaR46pX8T/DSVrKmGPlxKWaS/GYPCJbHwa1/8hsw +QpKP7zTwoRGg+OC01wgviQjaHehQ5PHCcgF92js19ipqeK0nZ6NumYBhuReeTn0j +0sBPATC6XlUcftJVv3oydls4C8Mpu+KK+fFvsgaZY5QeoLttl07GfRQMqPhpb6wb +5sEKrS0QTpxzAth07Ow22cETz+BYbxkVmbube82CBNwkiv8jF05expxtLdAUTSc4 +p9/hKUSFAXP/a4x5ce7ImZ8IeBftDfD1UjCvL/vPqhGfuPg/ObAPAIk4vs6K8yGW +0ub67smJCF6x3rTeYWJHtZA2w3aYX332klhyWWyyvq4EhfkViNCbch0gkBvrqxd0 +hIoSRW4Tg/SzbTNbwvoojwB4Qn/NKj6tG+/NCXsNoCaAW24oCpJC+J5CUUbHVH3O +Ru2kYMZ0/G0F3zplBJ+UdNl3edCVuOsYKosqA251SpbBhw== +=52uO +-----END PGP MESSAGE----- +------=_Part_0_123085323.1639402453729-- + + +R61b74bd5 +V4f4 +G48bd9401d84bb761590e000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.38 b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.38 new file mode 100644 index 0000000000..f50174e3e1 --- /dev/null +++ b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Sent/dbox-Mails/u.38 @@ -0,0 +1,33 @@ +2 M1e C61b74c72 +N 0000000000000390 +Date: Mon, 13 Dec 2021 15:36:48 +0200 (GMT+02:00) +From: denbond7@flowcrypt.test +To: default@flowcrypt.test +Message-ID: <2967984.1.1639402608568@flowcrypt.test> +Subject: NOT encrypted + signed(inband) + no pub key +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_0_15474263.1639402608553" +User-Agent: FlowCrypt_Android_1.2.5_dev_125__2021_12_13 + +------=_Part_0_15474263.1639402608553 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +-----BEGIN PGP MESSAGE----- +Version: PGPainless + +owGbwMvMwCX2jaFz8aOWw08ZT6cnMYCAZ4l6sUKiQlFqemlOYpFCbmpxcWJ6qkJJ +RmKJQnlisUJxZnpeaopCeWZJBlBZeVF+XrpCQVFmWWJJqkJ2aqWeQnBqXkpqkUJi +XgpELZBZlKqQkpmWllqUmlei11HKwiDGxcDGypS4pfkigyKnAMwNYoosHXsObGz8 +luG6RyfyAkx4oz8jw8yK2S9W5S19cGL2MsGt7+3eVS0MPiv4Zp367xdLbDUKb0xn ++O+T+pZxU/QMpfK1GqsbxbL2eXkEq9kvZjlr4FvM3tH7kBEA +=BWVd +-----END PGP MESSAGE----- +------=_Part_0_15474263.1639402608553-- + + +R61b74c70 +V3a9 +G9860b62d724cb7611b11000073f46975 + diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Trash/dbox-Mails/dovecot.index.cache b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Trash/dbox-Mails/dovecot.index.cache index 148f422493..7a9ab4b674 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Trash/dbox-Mails/dovecot.index.cache and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Trash/dbox-Mails/dovecot.index.cache differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Trash/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Trash/dbox-Mails/dovecot.index.log index 8c825eb3a2..225d95de78 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Trash/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/denbond7/mailboxes/Trash/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/has_msgs_no_backups/mailboxes/INBOX/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/has_msgs_no_backups/mailboxes/INBOX/dbox-Mails/dovecot.index.log index eecf140e3a..59dcf341a0 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/has_msgs_no_backups/mailboxes/INBOX/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/has_msgs_no_backups/mailboxes/INBOX/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/dovecot.list.index.log b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/dovecot.list.index.log index 4d107cb818..25116447c8 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/dovecot.list.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/dovecot.list.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Drafts/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Drafts/dbox-Mails/dovecot.index.log index 2e3bff655a..963544bfd3 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Drafts/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Drafts/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/INBOX/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/INBOX/dbox-Mails/dovecot.index.log index 8b8edf9efd..9807dfa81d 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/INBOX/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/INBOX/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Junk/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Junk/dbox-Mails/dovecot.index.log index 81f4474f3c..e8df0fecc6 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Junk/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Junk/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Sent/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Sent/dbox-Mails/dovecot.index.log index 8e3101f0f4..4d532b698b 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Sent/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Sent/dbox-Mails/dovecot.index.log differ diff --git a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Trash/dbox-Mails/dovecot.index.log b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Trash/dbox-Mails/dovecot.index.log index 7fdd5444bb..353ba6f072 100644 Binary files a/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Trash/dbox-Mails/dovecot.index.log and b/docker-mailserver/maildata_source/flowcrypt.test/user_with_more_than_21_letters/mailboxes/Trash/dbox-Mails/dovecot.index.log differ