crypto: Testing PGP/MIME signature verification and decryption
PASS emacs delivery of signed message
FAIL signature verification
--- crypto.2.expected 2011-06-02 16:46:27.000000000 +0000
+++ crypto.2.output 2011-06-02 16:46:27.000000000 +0000
@@ -1,23 +1 @@
-[[[{"id": "XXXXX",
- "match": true,
- "filename": "YYYYY",
- "timestamp": 946728000,
- "date_relative": "2000-01-01",
- "tags": ["inbox","signed"],
- "headers": {"Subject": "test signed message 001",
- "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
- "To": "test_suite@notmuchmail.org",
- "Cc": "",
- "Bcc": "",
- "Date": "01 Jan 2000 12:00:00 -0000"},
- "body": [{"id": 1,
- "sigstatus": [{"status": "good",
- "fingerprint": "5AEAB11F5E33DCE875DDB75B6D92612D94E46381",
- "created": 946728000}],
- "content-type": "multipart/signed",
- "content": [{"id": 2,
- "content-type": "text/plain",
- "content": "This is a test signed message.\n"},
- {"id": 3,
- "content-type": "application/pgp-signature"}]}]},
- []]]]
+[[[{"id": "XXXXX",n "match": true,n "filename": "YYYYY",n "timestamp": 946728000,n "date_relative": "2000-01-01",n "tags": ["inbox","signed"],n "headers": {"Subject": "test signed message 001",n "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",n "To": "test_suite@notmuchmail.org",n "Cc": "",n "Bcc": "",n "Date": "01 Jan 2000 12:00:00 -0000"},n "body": [{"id": 1,n "sigstatus": [{"status": "good",n "fingerprint": "5AEAB11F5E33DCE875DDB75B6D92612D94E46381",n "created": 946728000}],n "content-type": "multipart/signed",n "content": [{"id": 2,n "content-type": "text/plain",n "content": "This is a test signed message.\n"},n {"id": 3,n "content-type": "application/pgp-signature"}]}]},n []]]]
FAIL signature verification with full owner trust
--- crypto.3.expected 2011-06-02 16:46:27.000000000 +0000
+++ crypto.3.output 2011-06-02 16:46:27.000000000 +0000
@@ -1,24 +1 @@
-[[[{"id": "XXXXX",
- "match": true,
- "filename": "YYYYY",
- "timestamp": 946728000,
- "date_relative": "2000-01-01",
- "tags": ["inbox","signed"],
- "headers": {"Subject": "test signed message 001",
- "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
- "To": "test_suite@notmuchmail.org",
- "Cc": "",
- "Bcc": "",
- "Date": "01 Jan 2000 12:00:00 -0000"},
- "body": [{"id": 1,
- "sigstatus": [{"status": "good",
- "fingerprint": "5AEAB11F5E33DCE875DDB75B6D92612D94E46381",
- "created": 946728000,
- "userid": " Notmuch Test Suite <test_suite@notmuchmail.org> (INSECURE!)"}],
- "content-type": "multipart/signed",
- "content": [{"id": 2,
- "content-type": "text/plain",
- "content": "This is a test signed message.\n"},
- {"id": 3,
- "content-type": "application/pgp-signature"}]}]},
- []]]]
+[[[{"id": "XXXXX",n "match": true,n "filename": "YYYYY",n "timestamp": 946728000,n "date_relative": "2000-01-01",n "tags": ["inbox","signed"],n "headers": {"Subject": "test signed message 001",n "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",n "To": "test_suite@notmuchmail.org",n "Cc": "",n "Bcc": "",n "Date": "01 Jan 2000 12:00:00 -0000"},n "body": [{"id": 1,n "sigstatus": [{"status": "good",n "fingerprint": "5AEAB11F5E33DCE875DDB75B6D92612D94E46381",n "created": 946728000,n "userid": " Notmuch Test Suite <test_suite@notmuchmail.org> (INSECURE!)"}],n "content-type": "multipart/signed",n "content": [{"id": 2,n "content-type": "text/plain",n "content": "This is a test signed message.\n"},n {"id": 3,n "content-type": "application/pgp-signature"}]}]},n []]]]
FAIL signature verification with signer key unavailable
--- crypto.4.expected 2011-06-02 16:46:28.000000000 +0000
+++ crypto.4.output 2011-06-02 16:46:28.000000000 +0000
@@ -1,23 +1 @@
-[[[{"id": "XXXXX",
- "match": true,
- "filename": "YYYYY",
- "timestamp": 946728000,
- "date_relative": "2000-01-01",
- "tags": ["inbox","signed"],
- "headers": {"Subject": "test signed message 001",
- "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
- "To": "test_suite@notmuchmail.org",
- "Cc": "",
- "Bcc": "",
- "Date": "01 Jan 2000 12:00:00 -0000"},
- "body": [{"id": 1,
- "sigstatus": [{"status": "error",
- "keyid": "6D92612D94E46381",
- "errors": 2}],
- "content-type": "multipart/signed",
- "content": [{"id": 2,
- "content-type": "text/plain",
- "content": "This is a test signed message.\n"},
- {"id": 3,
- "content-type": "application/pgp-signature"}]}]},
- []]]]
+[[[{"id": "XXXXX",n "match": true,n "filename": "YYYYY",n "timestamp": 946728000,n "date_relative": "2000-01-01",n "tags": ["inbox","signed"],n "headers": {"Subject": "test signed message 001",n "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",n "To": "test_suite@notmuchmail.org",n "Cc": "",n "Bcc": "",n "Date": "01 Jan 2000 12:00:00 -0000"},n "body": [{"id": 1,n "sigstatus": [{"status": "error",n "keyid": "6D92612D94E46381",n "errors": 2}],n "content-type": "multipart/signed",n "content": [{"id": 2,n "content-type": "text/plain",n "content": "This is a test signed message.\n"},n {"id": 3,n "content-type": "application/pgp-signature"}]}]},n []]]]
PASS emacs delivery of encrypted message with attachment
PASS decryption, --format=text
FAIL decryption, --format=json
--- crypto.7.expected 2011-06-02 16:46:29.000000000 +0000
+++ crypto.7.output 2011-06-02 16:46:29.000000000 +0000
@@ -1,27 +1 @@
-[[[{"id": "XXXXX",
- "match": true,
- "filename": "YYYYY",
- "timestamp": 946728000,
- "date_relative": "2000-01-01",
- "tags": ["encrypted","inbox"],
- "headers": {"Subject": "test encrypted message 001",
- "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
- "To": "test_suite@notmuchmail.org",
- "Cc": "",
- "Bcc": "",
- "Date": "01 Jan 2000 12:00:00 -0000"},
- "body": [{"id": 1,
- "encstatus": [{"status": "good"}],
- "sigstatus": [],
- "content-type": "multipart/encrypted",
- "content": [{"id": 2,
- "content-type": "application/pgp-encrypted"},
- {"id": 3,
- "content-type": "multipart/mixed",
- "content": [{"id": 4,
- "content-type": "text/plain",
- "content": "This is a test encrypted message.\n"},
- {"id": 5,
- "content-type": "application/octet-stream",
- "filename": "TESTATTACHMENT"}]}]}]},
- []]]]
+[[[{"id": "XXXXX",n "match": true,n "filename": "YYYYY",n "timestamp": 946728000,n "date_relative": "2000-01-01",n "tags": ["encrypted","inbox"],n "headers": {"Subject": "test encrypted message 001",n "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",n "To": "test_suite@notmuchmail.org",n "Cc": "",n "Bcc": "",n "Date": "01 Jan 2000 12:00:00 -0000"},n "body": [{"id": 1,n "encstatus": [{"status": "good"}],n "sigstatus": [],n "content-type": "multipart/encrypted",n "content": [{"id": 2,n "content-type": "application/pgp-encrypted"},n {"id": 3,n "content-type": "multipart/mixed",n "content": [{"id": 4,n "content-type": "text/plain",n "content": "This is a test encrypted message.\n"},n {"id": 5,n "content-type": "application/octet-stream",n "filename": "TESTATTACHMENT"}]}]}]},n []]]]
FAIL decryption, --format=json, --part=4
--- crypto.8.expected 2011-06-02 16:46:29.000000000 +0000
+++ crypto.8.output 2011-06-02 16:46:29.000000000 +0000
@@ -1,3 +1 @@
-{"id": 4,
- "content-type": "text/plain",
- "content": "This is a test encrypted message.\n"}
+{"id": 4,n "content-type": "text/plain",n "content": "This is a test encrypted message.\n"}
PASS decrypt attachment (--part=5 --format=raw)
FAIL decryption failure with missing key
--- crypto.10.expected 2011-06-02 16:46:30.000000000 +0000
+++ crypto.10.output 2011-06-02 16:46:30.000000000 +0000
@@ -1,20 +1 @@
-[[[{"id": "XXXXX",
- "match": true,
- "filename": "YYYYY",
- "timestamp": 946728000,
- "date_relative": "2000-01-01",
- "tags": ["encrypted","inbox"],
- "headers": {"Subject": "test encrypted message 001",
- "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
- "To": "test_suite@notmuchmail.org",
- "Cc": "",
- "Bcc": "",
- "Date": "01 Jan 2000 12:00:00 -0000"},
- "body": [{"id": 1,
- "encstatus": [{"status": "bad"}],
- "content-type": "multipart/encrypted",
- "content": [{"id": 2,
- "content-type": "application/pgp-encrypted"},
- {"id": 3,
- "content-type": "application/octet-stream"}]}]},
- []]]]
+[[[{"id": "XXXXX",n "match": true,n "filename": "YYYYY",n "timestamp": 946728000,n "date_relative": "2000-01-01",n "tags": ["encrypted","inbox"],n "headers": {"Subject": "test encrypted message 001",n "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",n "To": "test_suite@notmuchmail.org",n "Cc": "",n "Bcc": "",n "Date": "01 Jan 2000 12:00:00 -0000"},n "body": [{"id": 1,n "encstatus": [{"status": "bad"}],n "content-type": "multipart/encrypted",n "content": [{"id": 2,n "content-type": "application/pgp-encrypted"},n {"id": 3,n "content-type": "application/octet-stream"}]}]},n []]]]
Failed to decrypt part: gpg: keyblock resource `/Users/fgeller/Devel/repos/notmuch/test/tmp.crypto/gnupg/secring.gpg': No such file or directory
gpg: keyblock resource `/Users/fgeller/Devel/repos/notmuch/test/tmp.crypto/gnupg/pubring.gpg': No such file or directory
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
gpg: armor header:
gpg: public key is AD54AB16
gpg: encrypted with RSA key, ID AD54AB16
gpg: decryption failed: No secret key
PASS emacs delivery of encrypted + signed message
FAIL decryption + signature verification
--- crypto.12.expected 2011-06-02 16:46:31.000000000 +0000
+++ crypto.12.output 2011-06-02 16:46:31.000000000 +0000
@@ -1,25 +1 @@
-[[[{"id": "XXXXX",
- "match": true,
- "filename": "YYYYY",
- "timestamp": 946728000,
- "date_relative": "2000-01-01",
- "tags": ["encrypted","inbox"],
- "headers": {"Subject": "test encrypted message 002",
- "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
- "To": "test_suite@notmuchmail.org",
- "Cc": "",
- "Bcc": "",
- "Date": "01 Jan 2000 12:00:00 -0000"},
- "body": [{"id": 1,
- "encstatus": [{"status": "good"}],
- "sigstatus": [{"status": "good",
- "fingerprint": "5AEAB11F5E33DCE875DDB75B6D92612D94E46381",
- "created": 946728000,
- "userid": " Notmuch Test Suite <test_suite@notmuchmail.org> (INSECURE!)"}],
- "content-type": "multipart/encrypted",
- "content": [{"id": 2,
- "content-type": "application/pgp-encrypted"},
- {"id": 3,
- "content-type": "text/plain",
- "content": "This is another test encrypted message.\n"}]}]},
- []]]]
+[[[{"id": "XXXXX",n "match": true,n "filename": "YYYYY",n "timestamp": 946728000,n "date_relative": "2000-01-01",n "tags": ["encrypted","inbox"],n "headers": {"Subject": "test encrypted message 002",n "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",n "To": "test_suite@notmuchmail.org",n "Cc": "",n "Bcc": "",n "Date": "01 Jan 2000 12:00:00 -0000"},n "body": [{"id": 1,n "encstatus": [{"status": "good"}],n "sigstatus": [{"status": "good",n "fingerprint": "5AEAB11F5E33DCE875DDB75B6D92612D94E46381",n "created": 946728000,n "userid": " Notmuch Test Suite <test_suite@notmuchmail.org> (INSECURE!)"}],n "content-type": "multipart/encrypted",n "content": [{"id": 2,n "content-type": "application/pgp-encrypted"},n {"id": 3,n "content-type": "text/plain",n "content": "This is another test encrypted message.\n"}]}]},n []]]]
PASS reply to encrypted message
FAIL signature verification with revoked key
--- crypto.14.expected 2011-06-02 16:46:31.000000000 +0000
+++ crypto.14.output 2011-06-02 16:46:31.000000000 +0000
@@ -1,23 +1 @@
-[[[{"id": "XXXXX",
- "match": true,
- "filename": "YYYYY",
- "timestamp": 946728000,
- "date_relative": "2000-01-01",
- "tags": ["inbox","signed"],
- "headers": {"Subject": "test signed message 001",
- "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
- "To": "test_suite@notmuchmail.org",
- "Cc": "",
- "Bcc": "",
- "Date": "01 Jan 2000 12:00:00 -0000"},
- "body": [{"id": 1,
- "sigstatus": [{"status": "error",
- "keyid": "6D92612D94E46381",
- "errors": 8}],
- "content-type": "multipart/signed",
- "content": [{"id": 2,
- "content-type": "text/plain",
- "content": "This is a test signed message.\n"},
- {"id": 3,
- "content-type": "application/pgp-signature"}]}]},
- []]]]
+[[[{"id": "XXXXX",n "match": true,n "filename": "YYYYY",n "timestamp": 946728000,n "date_relative": "2000-01-01",n "tags": ["inbox","signed"],n "headers": {"Subject": "test signed message 001",n "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",n "To": "test_suite@notmuchmail.org",n "Cc": "",n "Bcc": "",n "Date": "01 Jan 2000 12:00:00 -0000"},n "body": [{"id": 1,n "sigstatus": [{"status": "error",n "keyid": "6D92612D94E46381",n "errors": 8}],n "content-type": "multipart/signed",n "content": [{"id": 2,n "content-type": "text/plain",n "content": "This is a test signed message.\n"},n {"id": 3,n "content-type": "application/pgp-signature"}]}]},n []]]]
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u