Make a consistent error when cannot decrypt because of missing key
authorEdouard Tisserant
Sun, 19 Jun 2016 15:25:25 +0200
changeset 74532d7952cccfa
parent 744 60d550ce6031
child 746 753b1ec63285
Make a consistent error when cannot decrypt because of missing key
src/message_api.c
test/Makefile
test/message_api_test.cc
test/msg_no_key.asc
test/no_key.asc
test/still_no_key.asc
     1.1 --- a/src/message_api.c	Fri Jun 17 19:20:02 2016 +0200
     1.2 +++ b/src/message_api.c	Sun Jun 19 15:25:25 2016 +0200
     1.3 @@ -1439,6 +1439,11 @@
     1.4              }
     1.5          }
     1.6      }
     1.7 +    else
     1.8 +    {
     1.9 +        *color = decrypt_color(decrypt_status);
    1.10 +        goto pep_error;
    1.11 +    }
    1.12  
    1.13      if (msg) {
    1.14          decorate_message(msg, *color, _keylist);
     2.1 --- a/test/Makefile	Fri Jun 17 19:20:02 2016 +0200
     2.2 +++ b/test/Makefile	Sun Jun 19 15:25:25 2016 +0200
     2.3 @@ -32,6 +32,9 @@
     2.4  %_test_run : %_test
     2.5  	LD_LIBRARY_PATH=~/lib:../src ./$<
     2.6  
     2.7 +%_test_lldb : %_test
     2.8 +	LD_LIBRARY_PATH=~/lib:../src lldb ./$<
     2.9 +
    2.10  unit_tests: $(UNIT_TESTS) $(UNIT_TESTS_RUN)
    2.11  
    2.12  install:
     3.1 --- a/test/message_api_test.cc	Fri Jun 17 19:20:02 2016 +0200
     3.2 +++ b/test/message_api_test.cc	Sun Jun 19 15:25:25 2016 +0200
     3.3 @@ -24,8 +24,10 @@
     3.4  
     3.5      cout << "creating message…\n";
     3.6      pEp_identity * me2 = new_identity("outlooktest@dingens.org", NULL, PEP_OWN_USERID, "Outlook Test");
     3.7 +    // pEp_identity * me2 = new_identity("test@nokey.plop", NULL, PEP_OWN_USERID, "Test no key");
     3.8      me2->me = true;
     3.9      identity_list *to2 = new_identity_list(new_identity("vb@dingens.org", NULL, "42", "Volker Birk"));
    3.10 +    // identity_list *to2 = new_identity_list(new_identity("still@nokey.blup", NULL, "42", "Still no key"));
    3.11      message *msg2 = new_message(PEP_dir_outgoing);
    3.12      assert(msg2);
    3.13      msg2->from = me2;
    3.14 @@ -62,7 +64,7 @@
    3.15      PEP_STATUS status3 = mime_decode_message(text2, strlen(text2), &msg3);
    3.16      assert(status3 == PEP_STATUS_OK);
    3.17      string string3 = text2;
    3.18 -    free(text2);
    3.19 +    //free(text2);
    3.20  
    3.21      unlink("msg4.asc");
    3.22      ofstream outFile3("msg4.asc");
    3.23 @@ -86,11 +88,42 @@
    3.24  
    3.25      free_stringlist(keylist4);
    3.26  
    3.27 +    cout << "opening msg_no_key.asc for reading\n";
    3.28 +    ifstream inFile3 ("msg_no_key.asc");
    3.29 +    assert(inFile3.is_open());
    3.30 +
    3.31 +    string text3;
    3.32 +
    3.33 +    cout << "reading msg_no_key.asc sample\n";
    3.34 +    while (!inFile3.eof()) {
    3.35 +        static string line;
    3.36 +        getline(inFile3, line);
    3.37 +        text3 += line + "\r\n";
    3.38 +    }
    3.39 +    inFile3.close();
    3.40 +
    3.41 +    message *msg5;
    3.42 +    PEP_STATUS status5 = mime_decode_message(text3.c_str(), text3.length(), &msg5);
    3.43 +    assert(status5 == PEP_STATUS_OK);
    3.44 +
    3.45 +    message *msg6;
    3.46 +    stringlist_t *keylist5;
    3.47 +    PEP_color color2;
    3.48 +    PEP_STATUS status6 = decrypt_message(session, msg5, &msg6, &keylist5, &color2);
    3.49 +    assert(status6 == PEP_DECRYPT_NO_KEY);
    3.50 +    assert(msg6 == NULL);
    3.51 +    assert(keylist5 == NULL);
    3.52 +    assert(color2 == PEP_rating_have_no_key);
    3.53 +    cout << "color :" << color2 << "\n";
    3.54 +    free_stringlist(keylist5);
    3.55 +
    3.56      cout << "freeing messages…\n";
    3.57      free_message(msg4);
    3.58      free_message(msg3);
    3.59      free_message(msg2);
    3.60      free_message(enc_msg2);
    3.61 +    free_message(msg6);
    3.62 +    free_message(msg5);
    3.63      cout << "done.\n";
    3.64  
    3.65      cout << "calling release()\n";
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/test/msg_no_key.asc	Sun Jun 19 15:25:25 2016 +0200
     4.3 @@ -0,0 +1,86 @@
     4.4 +From: Test no key <test@nokey.plop>
     4.5 +To: Still no key <still@nokey.blup>
     4.6 +Subject: pEp
     4.7 +X-pEp-Version: 1.0
     4.8 +MIME-Version: 1.0
     4.9 +Content-Type: multipart/encrypted; boundary="74b0dc5119495cff2ae8944a625558ec"; 
    4.10 + protocol="application/pgp-encrypted"
    4.11 +
    4.12 +--74b0dc5119495cff2ae8944a625558ec
    4.13 +Content-Type: application/pgp-encrypted
    4.14 +
    4.15 +Version: 1
    4.16 +--74b0dc5119495cff2ae8944a625558ec
    4.17 +Content-Type: application/octet-stream
    4.18 +Content-Transfer-Encoding: 7bit
    4.19 +Content-Disposition: inline; filename="msg.asc"
    4.20 +
    4.21 +-----BEGIN PGP MESSAGE-----
    4.22 +
    4.23 +hQEMA3RCTrevwG3jAQf/ajRuor6jilyO5RvQqkhTH5EIl70QbRKCFv+R09/JVY3J
    4.24 ++UmpmZUWR91STplFyHWap2bIPnmLi7iTYhJf2n7w5NmDVju4fykw8rVl+khShdZu
    4.25 +harEilWGdiKnPoux/iBeicflLSiKI5hoR/kk2XPPvyDCCFUIwF3md96W+PFom3mv
    4.26 +asgJ5wUGW2VXIx608pP0iRh6Nb6adtcShggK2ClBYMfLvHXZ6J/hxAJLa03geIWR
    4.27 +rsPEsYvGHlF8pkpnJj1SqbIL5Wl1SDjzxvd3xj19O+ykOtcs+1SDIL8ieup1xBUy
    4.28 +2dnTaWbNwl/i6YkyFWFH03pj0g1UH5U0j60BAVHdBIUBDAPkhdA1fp/D8QEH/32c
    4.29 +Bvfo7YSQ4Lh2yLAJbNsw9vi6Pn+FeNQRLFJK0ncnUMHEywIQTXrhRPOI52Y1Dl5C
    4.30 +JlRbba1e3APOClWr1h12kF+7eTNTPjcnAK+qifzCZgqudL47eMbZQUdc/ycBHsML
    4.31 +5Am1LoDnaRIGUoNVJyrH2sQCov3tSCMcaQ4RoCkDwNef6iLYEtBh+jE9mIIOr5fE
    4.32 +6iLwAigzOh4zx94znCv58nV7jp6wWbCGCRjMTQEI3bLiwv6qVwzTYOoch719LYen
    4.33 ++lRMufz+JwQpn8Uj4d8HYNB3Dzn+WMPORG0ANxO7s1CT1a8GwEEX3Kxc4McxLWX0
    4.34 +4KH5dsV1Sb2u7pM1vqTS6wGi6x3rXCef/fD52xGy4yoBputlqT7esWa7yptmlhwD
    4.35 +nnP40nDubynyKCnxzEHpoLDsmULyDlZqXEFSjLOBxFu/sBfm2uzZ47MR/Eod5rEB
    4.36 +tzcXOBDS8Hc/yr5bRBoKxXoLdcocZtTnczgFNcaTlRy219DkqvUM8DQfkPcsWqBE
    4.37 +Thn83B92nkQbm/so3oRNAUdm3Z8w2a3wZao+WB73OYKgB3ugXf52L6GWTWOOxn1H
    4.38 +VXqxTJokGMCBomIsBJn300gEDXwNJhyYWGHpYPp9am/Ym/ZamwnKSfQlh8+d4z63
    4.39 +8NM78UHJWKUNnn7yP8Vd4zc05fYQFyxM1mXS2YlW5Ch5DkOOu0XNSam2f/9W/7xd
    4.40 +9WMtgKGQ33h+vqmnJ6gpzyUSfJ8QRcYzuCMxW0rPLIrxnP/V5+lV0GqaIkMyQxCH
    4.41 +OvaclLOTvsW9gNRAkUFxvfPdwq3pTim8GSd2oCxETIaBI2xca2NQ6NtKjddbADbV
    4.42 +mbPdyJHKahEVuAXLQ8KVmdcvEjaJYt+Mch14p439vxo611VNYTaSOuoqEeB9VYEP
    4.43 +8TkP80l7d7q9iJ9mF1jw/+ykdpDWPGn3zECeg2vXCvksqtyMJ/XeflYxge3H8LRZ
    4.44 +DUwDa5crXH5Iq7pSwdzWvVTzjkBZzawY3zJGMTpnnb4EdTQldBdHQxCgTHMBWn7f
    4.45 +6FqFXmMAHJC3nYs8ysFmfGLIiOjdedGc3O95oMFcYjzHafKc6LH1GGkNCDRXYC8M
    4.46 +mJm3lpDxkCselGXeHBopuxLFmmv8xZ2vdu454r69lMIDgE2huEdsNyTzKc3aG00B
    4.47 +jE5etwcxGEFRAbHS4EvYY63DwCYr4Qh7uKh7jID2skT8zGPQitPOYBuOJ/2h0thK
    4.48 +e3Ztohf+P/VSYIipXZP6dCYNRTVoaPFfKA9+OyLXWccADpmqXJe8wCQ397Eo2gNW
    4.49 +Yl6P57cCHn8mW7SIWwePmSnYAHn0uAkpIYked6p5vNHX/6xHjXLeeFTVC3ZK5gFh
    4.50 +6C2xEvLh41ACLPdeqM3ANXWiZDYnkZ9LlwV2EZywTI6urd+OcslGuRf1lrfnFDWm
    4.51 +K2w4PKxhoziizxrn6OjAzF+d9iqn0VOLh1H9PuMVbHwEO8vhYH0vfyjxkXUdLBgK
    4.52 +nSXZ9BPv9IL1CYhhN6hFiP1Va8SteHDhmMzRLZ9hjkTdLEP5Lu+AVwH0FkviaAan
    4.53 +s5gGdFe+pOmmkuC5s589XTpIGGug60z2u38SoN0LvtSPene7Wh1nNyzVPiyaFR1L
    4.54 +r78VH3BfUWHEVfGcAlNjajHWFZoCMHjKUPvlcMURls6ZfQwhF/3RGs1X2F6Ts1LO
    4.55 +CaoU4R+iKAgzfSYBKfCKbkjbBXAfq17IBohXcVZZlbKUbKUlGLdxqHWppI5wYJki
    4.56 +ME5iHyoM5HZYHWnsi76fA3sHrwifIuFTl85EZQgR2OUJb3tn3g1ckz5sTscUm2Af
    4.57 +fquWYyPcfF4MyVfbbxjTvVqg0JUAwSXY3t+b1JGBlnrmcu0JBprEuYL60KWmNh+p
    4.58 +jawapj1Cu7GXBrWanEjhZrLKZF3GO3SCBKnINLnWTxWOxO3aSBskGkiNTjMUtWur
    4.59 +7V37A2OKmVTZccTzWzHfppHmsBdvdflMNz1aYy+YgC3YF/5/gDBSsStQoECiZQDx
    4.60 +oENYxI9p6qXepgl0HAeagvWoX82/iKf42mMXdgjPRM+hd0vXvzI1KubQ641b6DUZ
    4.61 +JYYdMFcCW1LfbFb8+/9vF7orFSYIqVW75SLNcb9MMas5KoOcHWrJIK3vHyV+w6fI
    4.62 +8tNzkcvUCMRyiCBkq74JXt1a/yalNjtMvXqU7W3dhTQeZ4OwbYSx0wHJWVjk0o3d
    4.63 +dIl9Y0ig+QJF6MDYOw5NQ/ys3iNhDZVurgFk3eIncFoIHB4k9QovGQNUA/F2qtyR
    4.64 +BtVFYiS5aIQ7tosWWTb7FbBlSTZV1rO8YDi/oQ3XiVLV0ZDan68lQfOO8pE6oIQ+
    4.65 +ZaWXi1jK2koJjV4Vc7+NqLw0FhEuJME7EFI+iuIg8aXKQxP3H0vsdq71L/qxSIcb
    4.66 +V7RnSCDEZPbfssuShzegOkdVWn4u+5lF2ZB6vtt5/noOuopfup1DLBe9OTs8PEg8
    4.67 +JawLixRqWE5njDCVWxinmoovvlaWkshG+2C9+Pc0R6MB1j3G3HdOV03jk+yrAQ2S
    4.68 +hwXmkWEHhhKbF6tdamKJan2ahO/wuW4DSYiAc64ys1bpWctipgaDodgmXa1KkEan
    4.69 +44cQMf0yISdBex8uKqddQDplNxojT1ysky824X3vnApYjZ1O9/9EnQRn9BYuHdIL
    4.70 +8zat3qQAJO0cS0qAnQquoWzPzq7rumHxn248+mox6hD7Bxr+j6lbwyZRnaCcWFbu
    4.71 +11LUs0+pXDB+tKR6iGbuBuLLnj87LtjfzgkpDvlogBiaTFylJ+z4mfvpco05DfmU
    4.72 +CPyLr8LNIm6C3BVWDotgfVzIpsVuLGn+0JGB32RwYK79ngiFbgzjyTpGoIrPSAlr
    4.73 +gcrPR2XpXKMqOIktxJXMNWkBEg0w0ho7pviRCev+/yIxFV5zBNNUYYux1iAJPInQ
    4.74 +HDODyPFxC3YkRiFsw1c1GxI0dWdefQD7ClS8PFDrMIUeuPZMMt1TwUDB49uJqI7i
    4.75 ++n4MSfrxk1VTdSBH6dGk34ryoymMRwdLFcMyjNOICeCBnvmbc8qbBNg1hnr1Mbaz
    4.76 +pJl0dVXorszIZtx0EdE4KXu0+F8+LED6ASSH4lYLlsKirZkfDuTCE88d6MIIpjpb
    4.77 +wOm9ZP7Cb7YbCtFDm1pUF/L/J4TMnPjhufGdXbHwX1E1rB8pcnsShOLJrIhZWeq/
    4.78 +TWl9kmfbcM6OZVzedz1Eq9H5GE5BT/yTNmlrVR5Z2a7xwjbxE6uP+SPhx3Tga4Us
    4.79 +ivBOudkcifSy44AxjYOhPLaFxygs7We4JLIn0WOB6D7hvRDjL4osOKRiqJ5G56kZ
    4.80 +pZ6wGXUUZJzdUAuPPl2mAyxkpErZTXe3ENMFh3vU7YF3ovWgT7en6sRlVV6aCBc+
    4.81 +VNyM6OHFQlMeMowLWacONMQCVKsbMsOtLgBKryqTXugIBJclSV8vDy0zhuQoeQ1B
    4.82 +hUeA4uxoljnTkr5bLnBeKbC8vpViC2cHKsnmDX0cpE/ybyvXAHhbKHGbW912gylv
    4.83 +5V2h/Sct/wleXYYHBTQTsZpbQjAZmn8R8LUfG6H1Ig4CfH8oeBIkjaSt4z9zUBsp
    4.84 +0FdLyughCihVz98UJGVDh/H4fQIyXytqycFwF/mst//GXH9/VzJwRcqUz7MKQxoO
    4.85 +Pd2Y0r3rz5hfj78l1NOXYgdpEzLvQkyQbujU8foJJOxA0pRYlLN9Xr3AoQ==
    4.86 +=uymV
    4.87 +-----END PGP MESSAGE-----
    4.88 +
    4.89 +--74b0dc5119495cff2ae8944a625558ec--
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/test/no_key.asc	Sun Jun 19 15:25:25 2016 +0200
     5.3 @@ -0,0 +1,56 @@
     5.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
     5.5 +
     5.6 +lQOYBFdifLABCADG3TqnFQ8npE/XboLx7tv3kU/+qI5aI9fmJ4xZaiyc++/9YXeH
     5.7 +uUN5cTUpzSLIsrVuKDRn7hXorrok92ELrFhL5DbSfn0np6SLxr53821cmJKh2PxQ
     5.8 +3ucA8Mu/QgXE21HeVFGAbaLMaDm4B+0Tp3PAKNDnHNpWtc6+EQGCib4yW6HQ5+9e
     5.9 +aJhglGPbXGr2qanREDiyshuDCaDPrgrs+5CQnUR+vwNfPv7ovyPX7BLmxpaP0gve
    5.10 +4ehpYaK0rUpzvXCNbHt+Shu40aXa0uRU8JajF3tvisJwsXkZcpqVJsP+OGWka7rp
    5.11 +ikicjT0FOCBCYskjTRMfptQnfMF2z7J9yb4ZABEBAAEAB/9EV4IRKpUXOAoyTKnW
    5.12 +sBJLTdaSe2XUh43qbDv4/JqRZqmux+C2tY4BPc0Z7QQfuf7M+Sctcm54FRgmnRdu
    5.13 +Vg/QIQFQLKUhTCUp3ibV/UPftxVpZrMrrbbwpVA4Dd4CrabAg/SwcL0qh0USwDKS
    5.14 +9xC6AKzuSAWnF/sRabG9pU3GawkV5s9bjSCAWuZBQhL0aELGREE8ap+R3bBfz5Et
    5.15 +ModEKGtJwqp/5nRl8NdiO9qNE71MVKFwskSuLNKxPSmi6OBUgCa14713lq0AJdho
    5.16 +RxpOrTI/dhNXBZBhPOsnFTla7V4Z9dPkqoRDyfpki1dmFRSunJILmoR2zSFzWZQo
    5.17 +xts7BADbA8JkCdJClweAK0EyyRE8EzIzgz6QEwj4rHym2ZpQdPrNsKyndQA8PBkF
    5.18 +l9NbeagthSq5je0Ho7McDMX4YeCj2vgKrUu6LNZLb5585AEO5keG8JGeFQv/55Uz
    5.19 +cumrDvgNZLMWrIOi+Ez+wPvwSTNL8z45gxIDS4kD4QsopnH/GwQA6HJXcg8MNy72
    5.20 +bN9+rcZ0Q64RT6f4k8q82QTLTEbw973XswQ4yTJWTuoU5a9AbXFsYS/G8Jhxd3aJ
    5.21 +kdKaaUMaBaTq6/iSc/H+Z3DlNT1wpWDC6yx6UV+ho2xaX0MybM+wohe/E5y7b6/9
    5.22 +XHeDEx1r/r7eUE2syuNhBSMGAkUbptsEAKGFOM6cz44tONKfiJhYVe7M770Rbbld
    5.23 +dmH5AIhw6PFGtlM40DRiMiwLe5VH2ymyoTJ3cKg3Cd51Etgk8ph+w3VwUNh6C3Br
    5.24 +BDTbBpVG7B5CLRVFG+M+CV/UFKzCoR2lt2WEzviweI85IrKM7awyi34vM3uytoKA
    5.25 +savQ6HgApiehNQq0HVRlc3Qgbm8ga2V5IDx0ZXN0QG5va2V5LnBsb3A+iQE3BBMB
    5.26 +CgAhBQJXYnywAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEAwGnPcHfiud
    5.27 +2iUH/iYCQVb4I2PIExOKPZZPFcoFFBrnifR+99G1X9bS65pTsN8aQ3h25DU1YvOY
    5.28 +tGhOFlx1qEBBy0YKzVMrmEl8HfZsqcjnJWvTmAcddENJQZ0ODJRnJC9JhSB5PUfR
    5.29 +X5+QG4At6pdxexKoEbZYsZf3QF8IzUlvybucl9t5sCMd2PBpscmLV2qbR6amivq4
    5.30 +WaBlu8oyenNTGKjGY4g5Xm2hchem87DFnyycY3bOYlWFBQrDe0Dr1Vkk5q7taErf
    5.31 +E561X06HKO2ee6EjHj0+fCKPsY/wbIAMSpwTJ5eFcXILxsH9C+KEt5JYrwe+vlrY
    5.32 +VGt2ytaUD//x+QZ8aHu4SzrqDnedA5gEV2J8sAEIALoZLH5f8bFukM495mR1symr
    5.33 +8cd6PI/Fqze1I3zDOt2cZ+ZdvhCSTAHNi+J9jj1/QG6HxvHp0y9XKjyLOsAiDUJ8
    5.34 +32cEmSdyH+TPWiBSyj+DVyJkQVuUB5++qjJJd53hOoC6/Y7yoCDE1vTaetwzxgAr
    5.35 ++30FjvmTg7uFzLEwclRL1n77x8dzUHqhL6OxTVGtEezF+rE4MYv4bElNp4AgsEaZ
    5.36 +XR4kKxwTE97nmBR78nmXuor2TsyUfLtlpuIE2jkQTDI+YZCAPsVrDy7/uTGtKeoa
    5.37 +8qvnINvl64uy3QZBTpGAL/dtwDjwgl8rO5SAOUs76UAQs+KNpAa1Ne2+Bx9GBlMA
    5.38 +EQEAAQAH/Rxrp8iNAoOkbRJHkHNF07IeLkiBOdUtzPOEWFe/a7Kt0OL07LKUhRhp
    5.39 +ZF7slIJ+d+qUFc/wHm5xE2Q3pyXx4rCFaDYlakuvOYEKIat6DqUbJn18GMx8PkXT
    5.40 +1SOPkL2tyJohny5A44TdoC5jXLawZCFhQNZbuPVoj9+y6WB4vkfHzTGy2y68hmbU
    5.41 +rKm0l8iqvelC4FP8WWNoVDcn992OJ0s/hsMjWAGE0h7KoDi/c50ZZ0JND2VuNMUk
    5.42 +FYH99q15wXQ4a6n9hC7wg632UW+O3MOdCCW9Wfve8DiyHuQ53ytQ7vto/fFKq3aY
    5.43 +TuKvUu4zjsPevVfyTxXXIdq1KfHgYqEEANbRRMXa3w20qutiid9K4Cj72vy4Ba7u
    5.44 +mg8Az65o6V1r1lykFzI4XP3+uSRDaeWt3GTQPtX3hanv/u6VdKqxyPhHsUoy+SqG
    5.45 +S/xqR08x1u55ySFfISNL9UU1tklbi5MJLxljTq2eVg4CSY41kFFllqmNBGro16zJ
    5.46 +I3tHla3Kx6c5BADdxnBWyOWjLyCnTJkK44YPxKXs5kT58zcNaILFxtVA6glKG1vb
    5.47 +7i1STOtYKFD6sI8k7zYXC09kzzuucO5ubh2yiapfUFVZ8WpF+ulM2ANX3n8/+yRL
    5.48 +Y9H886gcwVF3QqyZGh2jyyJoMIS04ePpQZxkJ2fbVM+V3tLKNFglT+6t6wP+Pbus
    5.49 +Pk4P/ALuJx8XIUe9wvMaKBXBeq1fEOKszhP3kTEPAgq0Xc2gHUULNvaBpz003o+t
    5.50 +87j9pMvCsN/bkZcFDvUCEL7Y55gZT8nhRq96JfRZFazXToq8OtlT6C4TJ1bx0KB6
    5.51 +MhWyHRjXWXRJ9406H+S9MnZA+5Ndjm0m7bExNyBLa4kBHwQYAQoACQUCV2J8sAIb
    5.52 +DAAKCRAMBpz3B34rnU9KB/99tygAltB4L2xLz/lOwvigD45Y3D54NKGvR+XtMUnP
    5.53 +lpsoL08KW1S7hugRGNrVMXy5BnTjDOY/IjCPGG2pkw9ZBvDev1ZR/9SFi8Qtp0Wv
    5.54 ++wKZHHGLo6s5FJ13JjwW7eGUsKDjlHl7ET6NZZxBuRS4cuFbnrgBmA3ugVKX0TLK
    5.55 +6sYoiubAZkanpJIusZeqT3cdZZV86B3urVDQqPwMkF+UBw/yBA3e2z7JFwhrzFnl
    5.56 +TZ05Tvx6m6NCxIWQh6ck34c+fQdcLSy8DF/dK0DKmMf5pIgJB7UVbVC5zuEoCa/i
    5.57 +/TBCkEmrTYZDJGv46Dx+ytdjKBHc1SvDyHYpMm1Z/b0d
    5.58 +=NB6+
    5.59 +-----END PGP PRIVATE KEY BLOCK-----
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/test/still_no_key.asc	Sun Jun 19 15:25:25 2016 +0200
     6.3 @@ -0,0 +1,56 @@
     6.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
     6.5 +
     6.6 +lQOYBFdisVYBCAC32OZTBZdKW9RwRdMyGxm8yG0hYp3ZA8Z7bUBlQQDwOOT0K2YV
     6.7 +1v5DEXYTIovVe4HYY4sPqmM1atpmCM/RlyYbghSIUha5OaH3/GOv9+Yg9WomrF4b
     6.8 +tPtGIlikcp/n69t/468hX9kzHf916VxwgVT7cSaHN0U6lKsPti08z3fDJKjr+O7S
     6.9 +7p1bYp+Lc9vsqSLBdTCoaPjs4RM1z2TLPHowKRVjwAKX/IjwwD0B9lg6fuOXqb+v
    6.10 +YBfRF0OZ/O+TX+k68y9qHgH1BPxUJAoAR7D/JgJzlH+H0kvVsCSnpph3a+dxnFsr
    6.11 +FFU1V4XRUsZtoR6URuOp3+0iC+LFE1HPt7F3ABEBAAEAB/0Vz46rpMspEDHoy+/d
    6.12 +TufDxMdloYx2dYMzm2d7W7XfyfAno4pt5t6tWEH4zS1nu0pRQKX7yswQR0f3uO3m
    6.13 +wJbNxqXm8k4t1U+I2xF8i91qZZMdWW+ku9jfni2D/PFJk2qsBnf9bqCW9uUauP+1
    6.14 +fTJ2zhqzCfSVmZOdvpApWbesl9YGqN/LLYVMjWhDs/QVL/n4MkJCrixdvVVELJty
    6.15 +j5E4nV3Z8PfsMjEE3goDzrhU0urPYubWHr/NXBcSG9mzhx48zacEPQyqcrSLc8Yy
    6.16 +rWZGSHgjYGdtYmajFDF4r3kr6efE5p2PRF1sU757oMLXW/J1eOq9Tal2halK/Jvm
    6.17 +2zEJBADCkUMr9vkSOhkpz2zAXx2wdtZBWb1pqQ0ZNDEaHTi0hbzO9nrRtvCEV60d
    6.18 +08xJDSVUfGi+WAihF+Woyg2yVTmsdcsnCHUH2yhNcke1buXGowxW7zcCT+mfB4Mh
    6.19 +gNJ/SIWvMj0Ku/P2JzAfvzngAIMpSNkq213f3yHNuHftH00y/QQA8eUiZvX+ST4b
    6.20 +XpV21S9wrCMJRVhWDJWX4uiQ1mEhxmJUF5AcqdgN66vGV5ZzJolnIvejLvFqkDzN
    6.21 +ftGM7aXnwGDNKaxd+X3x67EFVbSX+0tRATqG8xFTQYQ6wd0CmDtongdA8PPSJjO/
    6.22 ++/iBdTCKQggMro82ABW8WqIxeVGFIoMEAI78UWIBKF1dr4Ol4hP3Je27v0Duw+zi
    6.23 +EywJ84GFI3P9TKS3bYpxqQ7ymeVVUwFCpZeJEMIvX/GwsWsy9yZX5DADik3gwfGw
    6.24 +M5b9J0VYGp7UXP9npHM3rx3lMdfPUTUcYM5X6D0oXbPB+zbt1sBV7mPJK4nZ++qG
    6.25 +VWe/1eI2D8uvSWi0H1N0aWxsIG5vIGtleSA8c3RpbGxAbm9rZXkuYmx1cD6JATcE
    6.26 +EwEKACEFAldisVYCGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQOz+djmF7
    6.27 +X+NDFgf/Sp3BqUviZXCjxBMtL1XKWc8xouq/wnghfsURAKdUV9RXNghHTbAJftAb
    6.28 +SiQoTeGlhWWESMOJOq5rYbvIyzsVDqH2KeYCSJKucO09+viInrlw5Z9Sd7Mtp3+U
    6.29 +gMzE3mY9tJRy+OTv6B6KNDlplrTRhWpJkglLWKIB4qA0FZTRmcfub61+BOxgyiI0
    6.30 +KMCjxKYHH234T45ZELCT1XyBO5kZlItomrxQYpMkKIvDsm+ND73bi8rOafZaQoKj
    6.31 +ufG835AmGAvvFsiFm/AK98ZlI4rPNTfI6lHML1xozApi8Ga8Q/RSa/r5O6x3kdFb
    6.32 +DAutMCNn4F8i98v43f3M0KNlsOiJ450DmARXYrFWAQgAqnPL0cLdd1Tp0YB9RU0s
    6.33 +cwblmOBUaD3rN7lM0fqaw5eOqde0ZM75rhw/dvQH1pmC1AWHKo/3baqZLPAOHYr7
    6.34 +qlrGusEfm2SLuo6eGRi3InTIMB+dwaWaRuJDSQ+u0MAaCqEe3P7UijTZTVmj5DLL
    6.35 +lyCL2dh5x6HIe4jM9bJ1KjHmmMNurJ+zzIDxXyyZmQRGb8W6curR/KaiYP6sinMy
    6.36 +M+l7b9uhEqaLv9b0zOZjxSekfb6ICyVUvzJCONtEfaQ/QVK5XLMLhpbC4y27E7Vz
    6.37 +coa7381ewTrPaB6gS9R8/EgNGOQTIgYmestaZFeG/9UqtN+ox8+7a/XRVsm4PlE4
    6.38 +hwARAQABAAf9Gtey000NX2DUlD+DJXS/zpAu0WJn0yVdHiC6Q58O3EUecbTHHdD9
    6.39 +FOQx7Q5aZaXgf88sYrwv9OnsHAg50NaK8grq8jdo6NRur2m3kAWKYYy5MeA+Ebl9
    6.40 +5YfK8iiGw9eyF4EZa9KzBIjKEm+kFahs01c2xDmzrofVxfkx0xzQGAgTL3yGKEAM
    6.41 +S2Kr2J3nhejEOcEGjY2tvD1UMxZQCu6qpAyNU/lYBG8Fg3p67psUORWOBnAZkJNs
    6.42 +BTpsaVQR0/wja3x8efIjg41+W6O0NMQ7FE+vS2A9CBLOnKrLFw7jsVHQnk58MAnb
    6.43 +M3CPIusyhQXXOPrp0OnzfBA1hULF8EEKYQQAxvZXWFWuGoA1K5/Kn6nahHevYtkk
    6.44 +8rFb5uqIxTUqc2d0S/YJT2ksohyKwIa2wTWU51Dvi5WxmBJKAtWq96Xpvay99YgH
    6.45 +UZPw3xh5qi6Wv7JbhA/+lokURTxtyqofNcJDIAiGUwEryyjojhB1eEoV8mRfpL/B
    6.46 +78Uu7W/W1uY1rn8EANtRIvBnB1BrbTYpxH8n9V316BDTui6fCfb//2Ru5eJ/4ZSZ
    6.47 +dJ+8YncgoJAOrFDAT70xFp8tPwmJeak+PAMnt0ehLyZTzc4Dn1f3CTL/d9ZQmGau
    6.48 +w1hotJZBWgZAm10VI4UYuQkj3Iq20ENaY92XZMr40hlmmSeHAGXKy+hDlAH5A/9z
    6.49 +wP21mtgzGfLijeaXS9xzYQ5fgbWNJJ1bPALl1ZLGma/Ajbt8GgBgCSXnm8z9TYkt
    6.50 +j3R5PyFV3qTm+1L/JS3bepkGZnjy1Uqa0ZXIgKKOmYABuNJoFw1HfE47ZeZFwbmd
    6.51 +1MkC0L1eQqU1Dmz0Aq5Bj3yDuL5QOxBhxIb1wmrc2z6FiQEfBBgBCgAJBQJXYrFW
    6.52 +AhsMAAoJEDs/nY5he1/jekoH/1Bqm52W64DYJtGoxh0LOtTKYRk6fat1c1pzNctL
    6.53 +A2idl1ReT3XkI2pOZfDLXKiG4zHzUaOkO5P0a9oZxkUCRjuZjfHzaG/mmtCMJVPl
    6.54 +hcjD9Djzyw9HhXSubyWmMrbZ6uLaJfAs795b/ZXDkjghgN4IflEUX3NgqnIwciL/
    6.55 +8sdYE4olihmBHzcW5Pg8fQXXsGKeZfHdMnuMUrZk5htzkXN28FVcqrNHtSP+g3nw
    6.56 +YrOLfjw52fUDo7+SdGWUw0AUGYAFVoBdK38UkmWmhkeN8uqNI6/dqajzmMiMAwPQ
    6.57 +dvZ7djEg7DiKGSQ+dMVj9IzT27IuJqcXO+47fGHkU0iPpgI=
    6.58 +=3QWb
    6.59 +-----END PGP PRIVATE KEY BLOCK-----