Skip to content

Commit

Permalink
Added tests for cleartext signatures.| #1603
Browse files Browse the repository at this point in the history
  • Loading branch information
DenBond7 committed Aug 5, 2022
1 parent c372899 commit 1aa5f3a
Show file tree
Hide file tree
Showing 9 changed files with 448 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"encryptionType": "STANDARD",
"msgBlocks": [
{
"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\"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 cleartext signed message. It was signed with a wrong private key.\nSender 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",
"isOpenPGPMimeSigned": false,
"type": "plainHtml"
}
],
"msgEntity": {
"cc": [],
"email": "[email protected]",
"flags": "\\SEEN ",
"folder": "INBOX",
"from": [
{
"address": "[email protected]",
"encodedPersonal": "DenBond7",
"personal": "DenBond7"
}
],
"fromAddress": "DenBond7 \u003c[email protected]\u003e",
"hasAttachments": false,
"id": 40,
"isNew": false,
"isPasswordProtected": false,
"isSeen": true,
"msgState": "NONE",
"receivedDate": 1659711309000,
"replyTo": "DenBond7 \u003c[email protected]\u003e",
"replyToAddress": [
{
"address": "[email protected]",
"encodedPersonal": "DenBond7",
"personal": "DenBond7"
}
],
"sentDate": 1659711309000,
"state": -1,
"subject": "NOT encrypted + signed(cleartext) + no pub key",
"to": [
{
"address": "[email protected]"
}
],
"toAddress": "[email protected]",
"uid": 48,
"uidAsHEX": "30"
},
"text": "It\u0026#39;s a cleartext signed message. It was signed with a wrong private key.Sender and signer are different.",
"verificationResult": {
"hasBadSignatures": false,
"hasEncryptedParts": false,
"hasMixedSignatures": false,
"hasSignedParts": true,
"hasUnverifiedSignatures": true,
"isPartialSigned": false,
"keyIdOfSigningKeys": [
-5209761791998677675
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"encryptionType": "STANDARD",
"msgBlocks": [
{
"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\"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 cleartext signed message\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e",
"isOpenPGPMimeSigned": false,
"type": "plainHtml"
}
],
"msgEntity": {
"cc": [],
"email": "[email protected]",
"flags": "\\SEEN",
"folder": "INBOX",
"from": [
{
"address": "[email protected]",
"encodedPersonal": "DenBond7",
"personal": "DenBond7"
}
],
"fromAddress": "DenBond7 \u003c[email protected]\u003e",
"hasAttachments": false,
"id": 119,
"isPasswordProtected": false,
"isSeen": true,
"msgState": "NONE",
"receivedDate": 1659688734000,
"replyTo": "DenBond7 \u003c[email protected]\u003e",
"replyToAddress": [
{
"address": "[email protected]",
"encodedPersonal": "DenBond7",
"personal": "DenBond7"
}
],
"sentDate": 1659688734000,
"subject": "Not encrypted + signed(cleartext)",
"to": [
{
"address": "[email protected]"
}
],
"toAddress": "[email protected]",
"uid": 45,
"uidAsHEX": "2d"
},
"text": "It\u0026#39;s a cleartext signed message",
"verificationResult": {
"hasBadSignatures": false,
"hasEncryptedParts": false,
"hasMixedSignatures": false,
"hasSignedParts": true,
"hasUnverifiedSignatures": false,
"isPartialSigned": false,
"keyIdOfSigningKeys": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"encryptionType": "STANDARD",
"msgBlocks": [
{
"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\"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 cleartext signed with the first key\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003cdiv class\u003d\"MsgBlock GRAY\" style\u003d\"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 cleartext 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",
"isOpenPGPMimeSigned": false,
"type": "plainHtml"
}
],
"msgEntity": {
"cc": [],
"email": "[email protected]",
"flags": "\\SEEN",
"folder": "INBOX",
"from": [
{
"address": "[email protected]",
"encodedPersonal": "DenBond7",
"personal": "DenBond7"
}
],
"fromAddress": "DenBond7 \u003c[email protected]\u003e",
"hasAttachments": false,
"id": 39,
"isPasswordProtected": false,
"isSeen": true,
"msgState": "NONE",
"receivedDate": 1659708219000,
"replyTo": "DenBond7 \u003c[email protected]\u003e",
"replyToAddress": [
{
"address": "[email protected]",
"encodedPersonal": "DenBond7",
"personal": "DenBond7"
}
],
"sentDate": 1659708219000,
"subject": "NOT encrypted + signed mixed(cleartext)",
"to": [
{
"address": "[email protected]"
}
],
"toAddress": "[email protected]",
"uid": 47,
"uidAsHEX": "2f"
},
"text": "It\u0026#39;s a cleartext signed with the first key\nIt\u0026#39;s a cleartext signed with the second key",
"verificationResult": {
"hasBadSignatures": false,
"hasEncryptedParts": false,
"hasMixedSignatures": true,
"hasSignedParts": true,
"hasUnverifiedSignatures": false,
"isPartialSigned": false,
"keyIdOfSigningKeys": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"encryptionType": "STANDARD",
"msgBlocks": [
{
"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\"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\u003eIt\u0027s a regular unsigned and unencrypted text.\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003cdiv class\u003d\"MsgBlock GRAY\" style\u003d\"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 cleartext signed message\u003c/body\u003e\u003c/html\u003e\u003c/div\u003e\u003c!-- next MsgBlock --\u003e\n\u003c/body\u003e\n \u003c/html\u003e",
"isOpenPGPMimeSigned": false,
"type": "plainHtml"
}
],
"msgEntity": {
"cc": [],
"email": "[email protected]",
"flags": "\\SEEN",
"folder": "INBOX",
"from": [
{
"address": "[email protected]",
"encodedPersonal": "DenBond7",
"personal": "DenBond7"
}
],
"fromAddress": "DenBond7 \u003c[email protected]\u003e",
"hasAttachments": false,
"id": 38,
"isPasswordProtected": false,
"isSeen": true,
"msgState": "NONE",
"receivedDate": 1659689377000,
"replyTo": "DenBond7 \u003c[email protected]\u003e",
"replyToAddress": [
{
"address": "[email protected]",
"encodedPersonal": "DenBond7",
"personal": "DenBond7"
}
],
"sentDate": 1659689377000,
"subject": "NOT encrypted + signed partially(cleartext)",
"to": [
{
"address": "[email protected]"
}
],
"toAddress": "[email protected]",
"uid": 46,
"uidAsHEX": "2e"
},
"text": "It\u0027s a regular unsigned and unencrypted text.\nIt\u0026#39;s a cleartext signed message",
"verificationResult": {
"hasBadSignatures": false,
"hasEncryptedParts": false,
"hasMixedSignatures": false,
"hasSignedParts": true,
"hasUnverifiedSignatures": false,
"isPartialSigned": true,
"keyIdOfSigningKeys": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.flowcrypt.test
by mail.flowcrypt.test with LMTP
id 3c1FKE0v7WJ6BAAAc/RpdQ
(envelope-from <[email protected]>)
for <[email protected]>; Fri, 05 Aug 2022 14:55:09 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.flowcrypt.test (Postfix) with ESMTP id A1B46D01019
for <[email protected]>; Fri, 5 Aug 2022 14:55:09 +0000 (UTC)
Message-ID: <[email protected]>
Date: Fri, 5 Aug 2022 17:55:09 +0300
Mime-Version: 1.0
Content-Language: en-US
To: [email protected]
From: DenBond7 <[email protected]>
Subject: NOT encrypted + signed(cleartext) + no pub key
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

It's a cleartext signed message. It was signed with a wrong private key.
Sender and signer are different.
-----BEGIN PGP SIGNATURE-----
Version: PGPainless

iHUEARYKACcFAmLtLrwJELezNUCvhC1VFiEED71bYqIRzMkWaNgdt7M1QK+ELVUA
AEI0AQCEPc3Fmkf6HKbVvBe4Y++9OOvARgEvihH2ACBXqCfJnwEAsAfvi1lVNaXl
1fV6QFeCJovTxiMSqGUnijVyG2kHAwM=
=z/Xr
-----END PGP SIGNATURE-----

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.flowcrypt.test
by mail.flowcrypt.test with LMTP
id JqcgIx7X7GL6BAAAc/RpdQ
(envelope-from <[email protected]>)
for <[email protected]>; Fri, 05 Aug 2022 08:38:54 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.flowcrypt.test (Postfix) with ESMTP id 8C816D00F3E
for <[email protected]>; Fri, 5 Aug 2022 08:38:54 +0000 (UTC)
Message-ID: <[email protected]>
Date: Fri, 5 Aug 2022 11:38:54 +0300
Mime-Version: 1.0
Content-Language: en-US
To: [email protected]
From: DenBond7 <[email protected]>
Subject: Not encrypted + signed(cleartext)
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

It's a cleartext signed message
-----BEGIN PGP SIGNATURE-----
Version: PGPainless

iHUEARYKACcFAmLs1kUJEMMgic1q+NbOFiEEwWQo1gHLOTeJz2HUwyCJzWr41s4A
AG8wAP44Q3Zzr7sDM9V34A3CdDxMjUFSJcOsPZUuUi1kIZzv6wD/cxdthjQpC7uN
Hwvo1OGuQBE7TENCj1cW4P9AdOFxSAQ=
=McWq
-----END PGP SIGNATURE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.flowcrypt.test
by mail.flowcrypt.test with LMTP
id 1iRWDzsj7WK+BAAAc/RpdQ
(envelope-from <[email protected]>)
for <[email protected]>; Fri, 05 Aug 2022 14:03:39 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.flowcrypt.test (Postfix) with ESMTP id 3B997D01018
for <[email protected]>; Fri, 5 Aug 2022 14:03:39 +0000 (UTC)
Message-ID: <[email protected]>
Date: Fri, 5 Aug 2022 17:03:39 +0300
Mime-Version: 1.0
Content-Language: en-US
To: [email protected]
From: DenBond7 <[email protected]>
Subject: NOT encrypted + signed mixed(cleartext)
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

It's a cleartext signed with the first key
-----BEGIN PGP SIGNATURE-----
Version: PGPainless

iHUEARYKACcFAmLtIhoJEMMgic1q+NbOFiEEwWQo1gHLOTeJz2HUwyCJzWr41s4A
AGbhAQCjeeeTorr1KoSke1EbWfizp+eg13I23zSZQ3MeDOTa0AD/QzK0illvrpZK
KeXwpfKtlJdcWpzdL5MvbQz6tH6lkAU=
=S5jc
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

It's a cleartext signed with the second key
-----BEGIN PGP SIGNATURE-----
Version: PGPainless

iHUEARYKACcFAmLtIncJEIE/vu8WkLVTFiEE3DfiElQCETVkRcs3gT++7xaQtVMA
AM79AQDlj5w/Q+yjUXA6MwsFPBLaun3rxZ7pEy2UyC9nlXewhwD/RsjGvq+VujMl
B/+xFWaGiGZfim6Ay340/19fJRq46AY=
=nI+g
-----END PGP SIGNATURE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.flowcrypt.test
by mail.flowcrypt.test with LMTP
id O3+GD6HZ7GJVBgAAc/RpdQ
(envelope-from <[email protected]>)
for <[email protected]>; Fri, 05 Aug 2022 08:49:37 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.flowcrypt.test (Postfix) with ESMTP id 3C881D00F68
for <[email protected]>; Fri, 5 Aug 2022 08:49:37 +0000 (UTC)
Message-ID: <[email protected]>
Date: Fri, 5 Aug 2022 11:49:37 +0300
Mime-Version: 1.0
Content-Language: en-US
To: [email protected]
From: DenBond7 <[email protected]>
Subject: NOT encrypted + signed partially(cleartext)
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

It's a regular unsigned and unencrypted text.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

It's a cleartext signed message
-----BEGIN PGP SIGNATURE-----
Version: PGPainless

iHUEARYKACcFAmLs1kUJEMMgic1q+NbOFiEEwWQo1gHLOTeJz2HUwyCJzWr41s4A
AG8wAP44Q3Zzr7sDM9V34A3CdDxMjUFSJcOsPZUuUi1kIZzv6wD/cxdthjQpC7uN
Hwvo1OGuQBE7TENCj1cW4P9AdOFxSAQ=
=McWq
-----END PGP SIGNATURE-----
Loading

0 comments on commit 1aa5f3a

Please sign in to comment.