1666 lines
94 KiB
JavaScript
1666 lines
94 KiB
JavaScript
const openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
|
|
|
const chai = require('chai');
|
|
chai.use(require('chai-as-promised'));
|
|
|
|
const expect = chai.expect;
|
|
|
|
describe("Signature", function() {
|
|
const priv_key_arm1 =
|
|
['-----BEGIN PGP PRIVATE KEY BLOCK-----',
|
|
'Version: GnuPG v1.4.11 (GNU/Linux)',
|
|
'',
|
|
'lQHhBFERnrMRBADmM0hIfkI3yosjgbWo9v0Lnr3CCE+8KsMszgVS+hBu0XfGraKm',
|
|
'ivcA2aaJimHqVYOP7gEnwFAxHBBpeTJcu5wzCFyJwEYqVeS3nnaIhBPplSF14Duf',
|
|
'i6bB9RV7KxVAg6aunmM2tAutqC+a0y2rDaf7jkJoZ9gWJe2zI+vraD6fiwCgxvHo',
|
|
'3IgULB9RqIqpLoMgXfcjC+cD/1jeJlKRm+n71ryYwT/ECKsspFz7S36z6q3XyS8Q',
|
|
'QfrsUz2p1fbFicvJwIOJ8B20J/N2/nit4P0gBUTUxv3QEa7XCM/56/xrGkyBzscW',
|
|
'AzBoy/AK9K7GN6z13RozuAS60F1xO7MQc6Yi2VU3eASDQEKiyL/Ubf/s/rkZ+sGj',
|
|
'yJizBACtwCbQzA+z9XBZNUat5NPgcZz5Qeh1nwF9Nxnr6pyBv7tkrLh/3gxRGHqG',
|
|
'063dMbUk8pmUcJzBUyRsNiIPDoEUsLjY5zmZZmp/waAhpREsnK29WLCbqLdpUors',
|
|
'c1JJBsObkA1IM8TZY8YUmvsMEvBLCCanuKpclZZXqeRAeOHJ0v4DAwK8WfuTe5B+',
|
|
'M2BOOeZbN8BpfiA1l//fMMHLRS3UvbLBv4P1+4SyvhyYTR7M76Q0xPc03MFOWHL+',
|
|
'S9VumbQWVGVzdDIgPHRlc3QyQHRlc3QuY29tPohiBBMRAgAiBQJREZ6zAhsDBgsJ',
|
|
'CAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRARJ5QDyxae+MXNAKCzWSDR3tMrTrDb',
|
|
'TAri73N1Xb3j1ACfSl9y+SAah2q7GvmiR1+6+/ekqJGdAVgEURGesxAEANlpMZjW',
|
|
'33jMxlKHDdyRFXtKOq8RreXhq00plorHbgz9zFEWm4VF53+E/KGnmHGyY5Cy8TKy',
|
|
'ZjaueZZ9XuG0huZg5If68irFfNZtxdA26jv8//PdZ0Uj+X6J3RVa2peMLDDswTYL',
|
|
'OL1ZO1fxdtDD40fdAiIZ1QyjwEG0APtz41EfAAMFBAC5/dtgBBPtHe8UjDBaUe4n',
|
|
'NzHuUBBp6XE+H7eqHNFCuZAJ7yqJLGVHNIaQR419cNy08/OO/+YUQ7rg78LxjFiv',
|
|
'CH7IzhfU+6yvELSbgRMicY6EnAP2GT+b1+MtFNa3lBGtBHcJla52c2rTAHthYZWk',
|
|
'fT5R5DnJuQ2cJHBMS9HWyP4DAwK8WfuTe5B+M2C7a/YJSUv6SexdGCaiaTcAm6g/',
|
|
'PvA6hw/FLzIEP67QcQSSTmhftQIwnddt4S4MyJJH3U4fJaFfYQ1zCniYJohJBBgR',
|
|
'AgAJBQJREZ6zAhsMAAoJEBEnlAPLFp74QbMAn3V4857xwnO9/+vzIVnL93W3k0/8',
|
|
'AKC8omYPPomN1E/UJFfXdLDIMi5LoA==',
|
|
'=LSrW',
|
|
'-----END PGP PRIVATE KEY BLOCK-----'].join("\n");
|
|
|
|
const priv_key_arm1_stripped =
|
|
['-----BEGIN PGP PRIVATE KEY BLOCK-----',
|
|
'Version: GnuPG v1.4.11 (GNU/Linux)',
|
|
'',
|
|
'lQGqBFERnrMRBADmM0hIfkI3yosjgbWo9v0Lnr3CCE+8KsMszgVS+hBu0XfGraKm',
|
|
'ivcA2aaJimHqVYOP7gEnwFAxHBBpeTJcu5wzCFyJwEYqVeS3nnaIhBPplSF14Duf',
|
|
'i6bB9RV7KxVAg6aunmM2tAutqC+a0y2rDaf7jkJoZ9gWJe2zI+vraD6fiw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|
'MgQ/rtBxBJJOaF+1AjCd123hLgzIkkfdTh8loV9hDXMKeJgmiEkEGBECAAkFAlER',
|
|
'nrMCGwwACgkQESeUA8sWnvhBswCfdXjznvHCc73/6/MhWcv3dbeTT/wAoLyiZg8+',
|
|
'iY3UT9QkV9d0sMgyLkug',
|
|
'=GQsY',
|
|
'-----END PGP PRIVATE KEY BLOCK-----'].join("\n");
|
|
|
|
const pub_key_arm1 =
|
|
['-----BEGIN PGP PUBLIC KEY BLOCK-----',
|
|
'Version: GnuPG v1.4.11 (GNU/Linux)',
|
|
'',
|
|
'mQGiBFERlw4RBAD6Bmcf2w1dtUmtCLkdxeqZLArk3vYoQAjdibxA3gXVyur7fsWb',
|
|
'ro0jVbBHqOCtC6jDxE2l52NP9+tTlWeVMaqqNvUE47LSaPq2DGI8Wx1Rj6bF3mTs',
|
|
'obYEwhGbGh/MhJnME9AHODarvk8AZbzo0+k1EwrBWF6dTUBPfqO7rGU2ewCg80WV',
|
|
'x5pt3evj8rRK3jQ8SMKTNRsD/1PhTdxdZTdXARAFzcW1VaaruWW0Rr1+XHKKwDCz',
|
|
'i7HE76SO9qjnQfZCZG75CdQxI0h8GFeN3zsDqmhob2iSz2aJ1krtjM+iZ1FBFd57',
|
|
'OqCV6wmk5IT0RBN12ZzMS19YvzN/ONXHrmTZlKExd9Mh9RKLeVNw+bf6JsKQEzcY',
|
|
'JzFkBACX9X+hDYchO/2hiTwx4iOO9Fhsuh7eIWumB3gt+aUpm1jrSbas/QLTymmk',
|
|
'uZuQVXI4NtnlvzlNgWv4L5s5RU5WqNGG7WSaKNdcrvJZRC2dgbUJt04J5CKrWp6R',
|
|
'aIYal/81Ut1778lU01PEt563TcQnUBlnjU5OR25KhfSeN5CZY7QUVGVzdCA8dGVz',
|
|
'dEB0ZXN0LmNvbT6IYgQTEQIAIgUCURGXDgIbAwYLCQgHAwIGFQgCCQoLBBYCAwEC',
|
|
'HgECF4AACgkQikDlZK/UvLSspgCfcNaOpTg1W2ucR1JwBbBGvaERfuMAnRgt3/rs',
|
|
'EplqEakMckCtikEnpxYe',
|
|
'=b2Ln',
|
|
'-----END PGP PUBLIC KEY BLOCK-----'].join("\n");
|
|
|
|
const msg_arm1 =
|
|
['-----BEGIN PGP MESSAGE-----',
|
|
'Version: GnuPG v1.4.11 (GNU/Linux)',
|
|
'',
|
|
'hQEOA1N4OCSSjECBEAP/diDJCQn4e88193PgqhbfAkohk9RQ0v0MPnXpJbCRTHKO',
|
|
'8r9nxiAr/TQv4ZOingXdAp2JZEoE9pXxZ3r1UWew04czxmgJ8FP1ztZYWVFAWFVi',
|
|
'Tj930TBD7L1fY/MD4fK6xjEG7z5GT8k4tn4mLm/PpWMbarIglfMopTy1M/py2cID',
|
|
'/2Sj7Ikh3UFiG+zm4sViYc5roNbMy8ixeoKixxi99Mx8INa2cxNfqbabjblFyc0Z',
|
|
'BwmbIc+ZiY2meRNI5y/tk0gRD7hT84IXGGl6/mH00bsX/kkWdKGeTvz8s5G8RDHa',
|
|
'Za4HgLbXItkX/QarvRS9kvkD01ujHfj+1ZvgmOBttNfP0p8BQLIICqvg1eYD9aPB',
|
|
'+GtOZ2F3+k5VyBL5yIn/s65SBjNO8Fqs3aL0x+p7s1cfUzx8J8a8nWpqq/qIQIqg',
|
|
'ZJH6MZRKuQwscwH6NWgsSVwcnVCAXnYOpbHxFQ+j7RbF/+uiuqU+DFH/Rd5pik8b',
|
|
'0Dqnp0yfefrkjQ0nuvubgB6Rv89mHpnvuJfFJRInpg4lrHwLvRwdpN2HDozFHcKK',
|
|
'aOU=',
|
|
'=4iGt',
|
|
'-----END PGP MESSAGE-----'].join("\n");
|
|
|
|
const priv_key_arm2 =
|
|
['-----BEGIN PGP PRIVATE KEY BLOCK-----',
|
|
'Version: GnuPG v2.0.19 (GNU/Linux)',
|
|
'',
|
|
'lQH+BFJhL04BBADclrUEDDsm0PSZbQ6pml9FpzTyXiyCyDN+rMOsy9J300Oc10kt',
|
|
'/nyBej9vZSRcaW5VpNNj0i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UYMC01OrqKEswPm/V3zZkLu01q12UMwZach28QwK',
|
|
'/YZly4ioND2tdazj17u2rU2dwtiHPe1iMqGgVMoQirfLc+k=',
|
|
'=lw5e',
|
|
'-----END PGP PRIVATE KEY BLOCK-----'].join('\n');
|
|
|
|
const pub_key_arm2 =
|
|
['-----BEGIN PGP PUBLIC KEY BLOCK-----',
|
|
'Version: GnuPG v2.0.19 (GNU/Linux)',
|
|
'',
|
|
'mI0EUmEvTgEEANyWtQQMOybQ9JltDqmaX0WnNPJeLILIM36sw6zL0nfTQ5zXSS3+',
|
|
'fIF6P29lJFxpblWk02PSID5zX/DYU9/zjM2xPO8Oa4xo0cVTOTLj++Ri5mtr//f5',
|
|
'GLsIXxFrBJhD/ghFsL3Op0GXOeLJ9A5bsOn8th7x6JucNKuaRB6bQbSPABEBAAG0',
|
|
'JFRlc3QgTWNUZXN0aW5ndG9uIDx0ZXN0QGV4YW1wbGUuY29tPoi5BBMBAgAjBQJS',
|
|
'YS9OAhsvBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQSmNhOk1uQJQwDAP6',
|
|
'AgrTyqkRlJVqz2pb46TfbDM2TDF7o9CBnBzIGoxBhlRwpqALz7z2kxBDmwpQa+ki',
|
|
'Bq3jZN/UosY9y8bhwMAlnrDY9jP1gdCo+H0sD48CdXybblNwaYpwqC8VSpDdTndf',
|
|
'9j2wE/weihGp/DAdy/2kyBCaiOY1sjhUfJ1GogF49rC4jQRSYS9OAQQA6R/PtBFa',
|
|
'JaT4jq10yqASk4sqwVMsc6HcifM5lSdxzExFP74naUMMyEsKHP53QxTF0Grqusag',
|
|
'Qg/ZtgT0CN1HUM152y7ACOdp1giKjpMzOTQClqCoclyvWOFB+L/SwGEIJf7LSCEr',
|
|
'woBuJifJc8xAVr0XX0JthoW+uP91eTQ3XpsAEQEAAYkBPQQYAQIACQUCUmEvTgIb',
|
|
'LgCoCRBKY2E6TW5AlJ0gBBkBAgAGBQJSYS9OAAoJEOCE90RsICyXu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WcHvKY2D+1q9exORe1rIa1+sUGl5PG2wsEs',
|
|
'znN6qtN5gMlGY1ofWDY+I02gO4qzaZ/FxRZfittCw7v5dmQYKot9qRi2Kx3Fvw+h',
|
|
'ivFBpC4TWgppFBnJJnAsFXZJQcejMW4nEmOViRQXY8N8PepQmgsu',
|
|
'=ummy',
|
|
'-----END PGP PUBLIC KEY BLOCK-----'].join('\n');
|
|
|
|
const pub_revoked =
|
|
['-----BEGIN PGP PUBLIC KEY BLOCK-----',
|
|
'Version: GnuPG v2.0.19 (GNU/Linux)',
|
|
'',
|
|
'mQENBFKpincBCADhZjIihK15f3l+j87JgeLp9eUTSbn+g3gOFSR73TOMyBHMPt8O',
|
|
'KwuA+TN2sM86AooOR/2B2MjHBUZqrgeJe+sk5411yXezyYdQGZ8vlq/FeLeNF70D',
|
|
'JrvIC6tsEe2F9F7ICO7o7G+k5yveLaYQNU/okiP8Gj79XW3wN77+yAMwpQzBsrwa',
|
|
'UO/X4mDV59h1DdrTuN4g8SZhAmY/JfT7YCZuQ8ivOs9n7xPdbGpIQWGWjJLVWziC',
|
|
'7uvxN4eFOlCqvc6JwmS/xyYGKL2B3RcQuY+OlvQ3wxKFEGDfG73HtWBd2soB7/7p',
|
|
'w53mVcz5sLhkOWjMTj+VDDZ3jas+7VznaAbVABEBAAGJAToEIAECACQFAlKpj3od',
|
|
'HQNUZXN0aW5nIHJldm9rZSBjb21wbGV0ZSBrZXkACgkQO+K1SH0WBbOtJgf/XqJF',
|
|
'dfWJjXBPEdfDbnXW+OZcvVgUMEEKEKsS1MiB21BEQpsTiuOLLgDOnEKRDjT1Z9H/',
|
|
'6owkb1+iLOZRGcJIdXxxAi2W0hNwx3qSiYkJIaYIm6dhoTy77lAmrPGwjoBETflU',
|
|
'CdWWgYFUGQVNPnpCi0AizoHXX2S4zaVlLnDthss+/FtIiuiYAIbMzB902nhF0oKH',
|
|
'v5PTrm1IpbstchjHITtrRi4tdbyvpAmZFC6a+ydylijNyKkMeoMy0S+6t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
|
'NV62ZXFdXVgg9FZJHDR8fa1Zy93xC0JSKu4ZoCrH5ybw+DPCngogDl4KwgdV5y4e',
|
|
'EAZpGDSq7PrdsgZTiSuepwVw116GWJm1zecmh6FdpZL/ZrE6EfYcCGJqJiVfDiCR',
|
|
'jgvGbcTzxnvrRmDevmJUdXBSAE11OYQuDGlhgFCU0o9cdX+k+QqP5wNycXhoJ+yk',
|
|
'pMiJM+NJAQ==',
|
|
'=ok+o',
|
|
'-----END PGP PUBLIC KEY BLOCK-----'].join('\n');
|
|
|
|
const pub_expired =
|
|
['-----BEGIN PGP PUBLIC KEY BLOCK-----',
|
|
'Comment: GPGTools - https://gpgtools.org',
|
|
'',
|
|
'mQINBFpcwc8BEAC3ywtlTJ1inmifeTrC85b2j+WRySworAUKobk/jmswSoLt720R',
|
|
'1J211Uu7IW7UBReoEhfNq+M0CAaoTxT7XPvd2O8lyn/RMAlnmFC0x3pyGrRYyRFd',
|
|
'ZuGaWsFdHT/hCOeXOHv7sV/UWjL4wfeSlGqGWzHy4QH718HOQciZ7UHcS5J9B09W',
|
|
't4TWcY+rTwl2GoFWLBHYCZZLnsQhvJqUTEHc63j+WV5M6oPNDNzqXa545ktss4Bq',
|
|
'L7efeMtAThDlMg4vmodNkHYu0g+RqsGb1kwBkCznrNpYNETqgalhn5fZ6uV2RaDR',
|
|
'WwFOm7ujGwQCzLSHcoDh4zqtWKkImMBEnwTFo0GTgXTTz0T565l5uqUvZ9UkJLXc',
|
|
'IKWpfzHPUPOCstTaVNcCiTw+nwu4BvvOVgOWridKirpxks9uvihnzcAyR5ey212q',
|
|
'HkFW1464qss4b9b4W399/KbOQ8Ngr1kUUeAoK13x7QKTmTwjE1Qt66370nFjk9Go',
|
|
'k0Z0Of90oxQXx2/8g4gufpoMloTNdK/pMzPd+KfePpiVKoxmFTWOqmYgiX/4YcKi',
|
|
'nQsJf++D9xsmAN6v9Ay1RqKmxiJgcuDvqcZ+FJdGatlpKfyEEsDRjAtMXSgw3BpH',
|
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AD/2P/gABBKRklGAAEBAQBIAEgAAP/hAIBF
|
|
eGlmAABNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEA
|
|
AABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAEgAAAABAAAASAAAAAEA
|
|
AqACAAQAAAABAAAAfaADAAQAAAABAAAAlgAAAAD/4QkhaHR0cDovL25zLmFkb2Jl
|
|
LmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENl
|
|
aGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5z
|
|
Om1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+IDxyZGY6UkRGIHhtbG5z
|
|
OnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5z
|
|
IyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiLz4gPC9yZGY6UkRGPiA8
|
|
L3g6eG1wbWV0YT4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
|
|
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8P3hw
|
|
YWNrZXQgZW5kPSJ3Ij8+AP/tADhQaG90b3Nob3AgMy4wADhCSU0EBAAAAAAAADhC
|
|
SU0EJQAAAAAAENQdjNmPALIE6YAJmOz4Qn7/4gzgSUNDX1BST0ZJTEUAAQEAAAzQ
|
|
YXBwbAIQAABtbnRyUkdCIFhZWiAH3wABAAEACwA7AC1hY3NwQ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nS+yaF3GjcwJj
|
|
YZSYTxRTiTv5VMNJrLC+ynaBmUhVbUaIlm3Ne1zi3QmCjzvSGDOUNtAhdvGHk4Sc
|
|
qPxvR/hXprb6YHr/RlvV1OfUc/pgspjInblNtEW1/NjKlpTUg/XO+RtZdoktjbHE
|
|
lq8z6SvfygdCq5FId6beulKmIMnBMOS5I8tC/pemwzn/aNBgd7i6FGMVmDZBeb5d
|
|
m7ikmg7u4Gr8Dp4TuD7/ardI4zqffWdnSV1xyar1GEmyA/cWJOuv9Uc9RpjiKBe3
|
|
15l5UrmuJf3Bt/3cinmPPFpablC342GWEmszNdlmsVJ5NChWFyyTBHlr4CrmhvMF
|
|
gR1JcKmZZe++oshGB/7AQpHIbsMJohZP7e8M2NVmCYSPI7ryO0CVTqL5ndQgR4Y/
|
|
WPVMYDzj6X7I1A+nWeNiPlp2PoUUUvdCLisY1aU1wyTJa7wBsLARsrhXk5/R1pQt
|
|
Blk+CJ7ytHy6En8542bB/yC+Z9/zWbVuhg==
|
|
=jmT1
|
|
-----END PGP PUBLIC KEY BLOCK-----`;
|
|
|
|
const msg_sig_expired =
|
|
['-----BEGIN PGP MESSAGE-----',
|
|
'Comment: GPGTools - https://gpgtools.org',
|
|
'',
|
|
'owEBWwKk/ZANAwAKAeyAexA3gWZ0AawUYgloZWxsby50eHRaX2WpaGVsbG+JAjME',
|
|
'AAEKAB0WIQTxcIn7ZRrhwd51IZbsgHsQN4FmdAUCWl9lqQAKCRDsgHsQN4FmdCln',
|
|
'D/44x1bcrOXg+DbRStSrC75wFa+cvPEmaTZyqN6d7qlQCMxOcPlq6lbZ74QWfEq7',
|
|
'i1ZYHp4AU8jALw0QqBQQE5FvABleQKpVfY22s83Bqy+P0DB9ntpD+t+oZrxGCLmL',
|
|
'MbZJNFnGro48gHt+/OQKLuftiVwE2opHfgogVKNL74FmYA0hMItdzpn4OPNFkP8t',
|
|
'Iq/m0hkXlTAKqBPITVLv1FN16v+Sm1iC317eP/HOTYqVZdJN3svVF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ImPTfGFlLuzMh+mYpw/+P+1qKBbrPIF269epUq+npApAU72IpbwwuJ06n4FwVstW',
|
|
'd0n3SxOEiiuQIcpVgEtFbbEizVsq86obhJf5fCsJlQghDxkslIntBBwz8jrWbDUw',
|
|
'iec0+fsI3OfPeMcqdqP2+Swzka/3JWKoHm6K6+7O4G5c8XB2Dt93pZVD9/CDkc4M',
|
|
'lSgmP00xfsO090OMGAVI/+v7+A4NMzCnJF9tWLF2ykfZhMRLfPvyr9880yWZOBRf',
|
|
'iuotS7oP+LIPfoq2txWNXfjDHvnQDTIHLhoM2HMdzI5qMkLax1bcgGT2uuogA+JI',
|
|
'bQ+9gO7VoqHi1qWb7MPzyaTk4Wxl9oP9qYo28m4xrgJ+bPz/cCgeY8Li4L8ds9cb',
|
|
'Q69OJhPncMYjrWx7dtB5AP9zdYaYjHejuSgI9s0J9Zum8QrCI/HdPZLIVIuuHywd',
|
|
'b77w5v0a+vXw7qCBXpEPEsRbExn6FjC2bGunbdAw5S+MTZSkTpCJUHoxKIxFiOUe',
|
|
'7F6lEBizbbSpIIRZMcwqB9gMxtRE2JrNntSVpHiBXKMSRXh/416hG7Gwf2hxppPw',
|
|
'hBr9NrB2VFHtdaWf2YqBGb7c1xusmEuGLcGUqFGCXo/g/lOSPijea91puCf9bgKy',
|
|
'0P7n+O0V3W1QpkI4ne5TE2vBFUFo9K5IFe4qBI1JPjbLTfOI2lojx8P12+lqWug=',
|
|
'=NbaL',
|
|
'-----END PGP PRIVATE KEY BLOCK-----'].join("\n");
|
|
|
|
const signature_with_critical_notation = `-----BEGIN PGP MESSAGE-----
|
|
|
|
owGbwMvMwMH4oOW7S46CznTG09xJDDE3Wl1KUotLuDousDAwcjBYiSmyXL+48d6x
|
|
U1PSGUxcj8IUszKBVMpMaWAAAgEGZpAeh9SKxNyCnFS95PzcytRiBi5OAZjyXXzM
|
|
f8WYLqv7TXP61Sa4rqT12CI3xaN73YS2pt089f96odCKaEPnWJ3iSGmzJaW/ug10
|
|
2Zo8Wj2k4s7t8wt4H3HtTu+y5UZfV3VOO+l//sdE/o+Lsub8FZH7/eOq7OnbNp4n
|
|
vwjE8mqJXetNMfj8r2SCyvkEnlVRYR+/mnge+ib56FdJ8uKtqSxyvgA=
|
|
=fRXs
|
|
-----END PGP MESSAGE-----`;
|
|
|
|
it('Testing signature checking on CAST5-enciphered message', async function() {
|
|
const { reject_message_hash_algorithms } = openpgp.config;
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms: new Set([openpgp.enums.hash.md5, openpgp.enums.hash.ripemd]) });
|
|
try {
|
|
const priv_key = (await openpgp.key.readArmored(priv_key_arm1)).keys[0];
|
|
const pub_key = (await openpgp.key.readArmored(pub_key_arm1)).keys[0];
|
|
const msg = await openpgp.message.readArmored(msg_arm1);
|
|
await priv_key.decrypt("abcd");
|
|
const decrypted = await openpgp.decrypt({ privateKeys: priv_key, publicKeys:[pub_key], message:msg });
|
|
expect(decrypted.data).to.exist;
|
|
expect(decrypted.signatures[0].valid).to.be.true;
|
|
expect(decrypted.signatures[0].signature.packets.length).to.equal(1);
|
|
} finally {
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms });
|
|
}
|
|
});
|
|
|
|
it('Supports decrypting with GnuPG stripped-key extension', async function() {
|
|
const { reject_message_hash_algorithms } = openpgp.config;
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms: new Set([openpgp.enums.hash.md5, openpgp.enums.hash.ripemd]) });
|
|
try {
|
|
// exercises the GnuPG s2k type 1001 extension:
|
|
// the secrets on the primary key have been stripped.
|
|
const priv_key_gnupg_ext = (await openpgp.key.readArmored(priv_key_arm1_stripped)).keys[0];
|
|
const priv_key_gnupg_ext_2 = (await openpgp.key.readArmored(priv_key_arm1_stripped)).keys[0];
|
|
const pub_key = (await openpgp.key.readArmored(pub_key_arm1)).keys[0];
|
|
const message = await openpgp.message.readArmored(msg_arm1);
|
|
const primaryKey_packet = priv_key_gnupg_ext.primaryKey.write();
|
|
expect(priv_key_gnupg_ext.isDecrypted()).to.be.false;
|
|
await priv_key_gnupg_ext.decrypt("abcd");
|
|
await priv_key_gnupg_ext_2.decrypt("abcd");
|
|
expect(priv_key_gnupg_ext.isDecrypted()).to.be.true;
|
|
const msg = await openpgp.decrypt({ message, privateKeys: [priv_key_gnupg_ext], publicKeys: [pub_key] });
|
|
expect(msg.signatures).to.exist;
|
|
expect(msg.signatures).to.have.length(1);
|
|
expect(msg.signatures[0].valid).to.be.true;
|
|
expect(msg.signatures[0].signature.packets.length).to.equal(1);
|
|
await expect(openpgp.sign({ message: openpgp.message.fromText('test'), privateKeys: [priv_key_gnupg_ext] })).to.eventually.be.rejectedWith('Missing private key parameters');
|
|
await expect(openpgp.reformatKey({ userIds: { name: 'test' }, privateKey: priv_key_gnupg_ext })).to.eventually.be.rejectedWith('Missing private key parameters');
|
|
await expect(openpgp.reformatKey({ userIds: { name: 'test' }, privateKey: priv_key_gnupg_ext_2, passphrase: 'test' })).to.eventually.be.rejectedWith('Missing private key parameters');
|
|
await priv_key_gnupg_ext.encrypt("abcd");
|
|
expect(priv_key_gnupg_ext.isDecrypted()).to.be.false;
|
|
const primaryKey_packet2 = priv_key_gnupg_ext.primaryKey.write();
|
|
expect(primaryKey_packet).to.deep.equal(primaryKey_packet2);
|
|
} finally {
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms });
|
|
}
|
|
});
|
|
|
|
it('Supports signing with GnuPG stripped-key extension', async function() {
|
|
const priv_key_gnupg_ext = (await openpgp.key.readArmored(flowcrypt_stripped_key)).keys[0];
|
|
await priv_key_gnupg_ext.decrypt('FlowCrypt');
|
|
const sig = await openpgp.sign({ message: openpgp.message.fromText('test'), privateKeys: [priv_key_gnupg_ext], date: new Date('2018-12-17T03:24:00') });
|
|
expect(sig.data).to.match(/-----END PGP MESSAGE-----\r\n$/);
|
|
});
|
|
|
|
it('Verify V4 signature. Hash: SHA1. PK: RSA. Signature Type: 0x00 (binary document)', async function() {
|
|
const { reject_message_hash_algorithms } = openpgp.config;
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms: new Set([openpgp.enums.hash.md5, openpgp.enums.hash.ripemd]) });
|
|
try {
|
|
const signedArmor =
|
|
['-----BEGIN PGP MESSAGE-----',
|
|
'Version: GnuPG v2.0.19 (GNU/Linux)',
|
|
'',
|
|
'owGbwMvMwMT4oOW7S46CznTGNeZJLCWpFSVBU3ZGF2fkF5Uo5KYWFyemp3LlAUUV',
|
|
'cjLzUrneTp3zauvaN9O26L9ZuOFNy4LXyydwcXXMYWFgZGJgY2UCaWXg4hSAmblK',
|
|
'nPmfsXYxd58Ka9eVrEnSpzilr520fXBrJsf2P/oTqzTj3hzyLG0o3TTzxFfrtOXf',
|
|
'cw6U57n3/Z4X0pEZ68C5/o/6NpPICD7fuEOz3936raZ6wXGzueY8pfPnVjY0ajAc',
|
|
'PtJzvvqj+ubYaT1sK9wWhd9lL3/V+9Zuua9QjOWC22buchsCroh8fLoZAA==',
|
|
'=VH8F',
|
|
'-----END PGP MESSAGE-----'].join('\n');
|
|
|
|
const sMsg = await openpgp.message.readArmored(signedArmor);
|
|
const pub_key = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const verified = await sMsg.verify([pub_key]);
|
|
openpgp.stream.pipe(sMsg.getLiteralData(), new WritableStream());
|
|
expect(verified).to.exist;
|
|
expect(verified).to.have.length(1);
|
|
expect(await verified[0].verified).to.be.true;
|
|
expect((await verified[0].signature).packets.length).to.equal(1);
|
|
} finally {
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms });
|
|
}
|
|
});
|
|
|
|
it('Verify signature of signed and encrypted message from GPG2 with openpgp.decrypt', async function() {
|
|
const msg_armor =
|
|
['-----BEGIN PGP MESSAGE-----',
|
|
'Version: GnuPG v2.0.19 (GNU/Linux)',
|
|
'',
|
|
'hIwD4IT3RGwgLJcBBADEBdm+GEW7IV1K/Bykg0nB0WYO08ai7/8/+Y/O9xu6RiU0',
|
|
'q7/jWuKms7kSjw9gxMCjf2dGnAuT4Cg505Kj5WfeBuHh618ovO8qo4h0qHyp1/y3',
|
|
'o1P0IXPAb+LGJOeO7DyM9Xp2AOBiIKOVWzFTg+MBZOc+XZEVx3FioHfm9SSDudLA',
|
|
'WAEkDakCG6MRFj/7SmOiV8mQKH+YPMKT69eDZW7hjINabrpM2pdRU7c9lC7CMUBx',
|
|
'Vj7wZsQBMASSC8f2rhpGA2iKvYMsmW3g9R1xkvj1MXWftSPUS4jeNTAgEwvvF6Af',
|
|
'cP+OYSXKlTbwfEr73ES2O3/IFE9sHRjPqWaxWuv4DDQ5YfIxE54C1aE8Aq5/QaIH',
|
|
'v38TUSia0yEMCc/tJd58DikkT07AF162tcx9Ro0ZjhudyuvUyXIfPfxA+XWR2pdz',
|
|
'ifxyV4zia9RvaCUY8vXGM+gQJ3NNXx2LkZA3kWUEyxFVL1Vl/XUQY0M6U+uccSk4',
|
|
'eMXm6eyEWDcj0lBRckqKoKo1w/uan11jPuHsnRz6jO9DsuKEz79UDgI=',
|
|
'=cFi7',
|
|
'-----END PGP MESSAGE-----'].join('\n');
|
|
|
|
const plaintext = 'short message\nnext line\n한국어/조선말';
|
|
const esMsg = await openpgp.message.readArmored(msg_armor);
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
|
|
await Promise.all(esMsg.getEncryptionKeyIds().map(keyId => privKey.decrypt('hello world', keyId)));
|
|
|
|
return openpgp.decrypt({ privateKeys: privKey, publicKeys:[pubKey], message:esMsg }).then(function(decrypted) {
|
|
expect(decrypted.data).to.exist;
|
|
expect(decrypted.data).to.equal(plaintext);
|
|
expect(decrypted.signatures).to.have.length(1);
|
|
expect(decrypted.signatures[0].valid).to.be.true;
|
|
expect(decrypted.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Verify signed message with two one pass signatures', async function() {
|
|
const msg_armor =
|
|
['-----BEGIN PGP MESSAGE-----',
|
|
'Version: GnuPG v2.0.19 (GNU/Linux)',
|
|
'',
|
|
'owGbwMvMwMF4+5Pyi4Jg3y8ME8DcBy3fXXIUdKYzrjFNYilJrSgJmsXDXJyRX1Si',
|
|
'kJtaXJyYnsqVBxRVyMnMS+V6O3XOq61r30zbov9m4YY3LQteL5/QMYeFgZGDgY2V',
|
|
'CaSRgYtTAGZiYxYLwySbQk07ptZel6gmjrKyBWsyWdkOG3oscLBdIpXXfDdb6fNv',
|
|
'8ULN5L1ed+xNo79P2dBotWud6vn7e9dtLJ7o12PunnvEz8gyyvP4/As/los0xsnZ',
|
|
'H+8ublrhvGtLxJUZuUKZO6QdHq2Nepuw8OrfiMXPBDQXXpV2q11Ze+rD3lndgv/C',
|
|
'bJQNOhll0J0H839jFvt/16m20h/ZmDoWqJywapnypjdIjcXr+7rJFess40yenV7Q',
|
|
'2LSu/EX6Aq29x+dv+GPUMfuhTNE3viWWUR4PD6T7XfmdViUwmSf8fkRNUn/t3a2n',
|
|
'cq46Xr36seCor/OLp0atSZwHrjx2SU5zPLheZn+zw/0d1/YZnD7AEeP9s/Cuycyv',
|
|
'CZ5HZNKufvB8fsh+dfdSXW0GfqkPfxk36Vw8ufpjaoZDyt2nxxg/6D4KS3UvZzv3',
|
|
'axdLZ9yd0OJNZv4P501If24W4vTGz6nI7Ser8Yd2PiOvE5MWMT0wLZQ+zPX1sv0/',
|
|
's8PvkyWmVM0O0fB/ZSHovHNNPffDg/rWhzOmXQ9/7vTn477F+aWm5sYzJ75/BQA=',
|
|
'=+L0S',
|
|
'-----END PGP MESSAGE-----'].join('\n');
|
|
|
|
const plaintext = 'short message\nnext line\n한국어/조선말';
|
|
const sMsg = await openpgp.message.readArmored(msg_armor);
|
|
const pubKey2 = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const pubKey3 = (await openpgp.key.readArmored(pub_key_arm3)).keys[0];
|
|
|
|
const keyids = sMsg.getSigningKeyIds();
|
|
|
|
expect(pubKey2.getKeys(keyids[1])).to.not.be.empty;
|
|
expect(pubKey3.getKeys(keyids[0])).to.not.be.empty;
|
|
|
|
return sMsg.verify([pubKey2, pubKey3]).then(async verifiedSig => {
|
|
expect(await openpgp.stream.readToEnd(sMsg.getText())).to.equal(plaintext);
|
|
expect(verifiedSig).to.exist;
|
|
expect(verifiedSig).to.have.length(2);
|
|
expect(await verifiedSig[0].verified).to.be.true;
|
|
expect(await verifiedSig[1].verified).to.be.true;
|
|
expect((await verifiedSig[0].signature).packets.length).to.equal(1);
|
|
expect((await verifiedSig[1].signature).packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Verify fails with signed message with critical notations', async function() {
|
|
let testFailed = true;
|
|
try {
|
|
openpgp.config.tolerant = false;
|
|
const sMsg = await openpgp.message.readArmored(signature_with_critical_notation);
|
|
const pub_key = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const verified = await sMsg.verify([pub_key]);
|
|
await verified[0].verified;
|
|
testFailed = false;
|
|
} catch (e) {
|
|
expect(e.message).to.equal('Unknown critical notation: test@example.com');
|
|
} finally {
|
|
openpgp.config.tolerant = true;
|
|
}
|
|
// fail the test if execution does not throw an exception
|
|
expect(testFailed).to.be.true;
|
|
});
|
|
|
|
it('Verify succeeds with known signed message with critical notations', async function() {
|
|
openpgp.config.tolerant = false;
|
|
openpgp.config.known_notations.push('test@example.com');
|
|
try {
|
|
const sMsg = await openpgp.message.readArmored(signature_with_critical_notation);
|
|
const pub_key = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const verified = await sMsg.verify([pub_key]);
|
|
openpgp.stream.pipe(sMsg.getLiteralData(), new WritableStream());
|
|
expect(await verified[0].verified).to.be.true;
|
|
} finally {
|
|
openpgp.config.known_notations.pop();
|
|
openpgp.config.tolerant = true;
|
|
}
|
|
});
|
|
|
|
it('Verify cleartext signed message with two signatures with openpgp.verify', async function() {
|
|
const msg_armor =
|
|
['-----BEGIN PGP SIGNED MESSAGE-----',
|
|
'Hash: SHA256',
|
|
'',
|
|
'short message',
|
|
'next line',
|
|
'한국어/조선말',
|
|
'-----BEGIN PGP SIGNATURE-----',
|
|
'Version: GnuPG v2.0.19 (GNU/Linux)',
|
|
'',
|
|
'iJwEAQEIAAYFAlKcju8ACgkQ4IT3RGwgLJci6gP/dCmIraUa6AGpJxzGfK+jYpjl',
|
|
'G0KunFyGmyPxeJVnPi2bBp3EPIbiayQ71CcDe9DKpF046tora07AA9eo+/YbvJ9P',
|
|
'PWeScw3oj/ejsmKQoDBGzyDMFUphevnhgc5lENjovJqmiu6FKjNmADTxcZ/qFTOq',
|
|
'44EWTgdW3IqXFkNpKjeJARwEAQEIAAYFAlKcju8ACgkQ2/Ij6HBTTfQi6gf9HxhE',
|
|
'ycLDhQ8iyC090TaYwsDytScU2vOMiI5rJCy2tfDV0pfn+UekYGMnKxZTpwtmno1j',
|
|
'mVOlieENszz5IcehS5TYwk4lmRFjoba+Z8qwPEYhYxP29GMbmRIsH811sQHFTigo',
|
|
'LI2t4pSSSUpAiXd9y6KtvkWcGGn8IfkNHCEHPh1ov28QvH0+ByIiKYK5N6ZB8hEo',
|
|
'0uMYhKQPVJdPCvMkAxQCRPw84EvmxuJ0HMCeSB9tHQXpz5un2m8D9yiGpBQPnqlW',
|
|
'vCCq7fgaUz8ksxvQ9bSwv0iIIbbBdTP7Z8y2c1Oof6NDl7irH+QCeNT7IIGs8Smn',
|
|
'BEzv/FqkQAhjy3Krxg==',
|
|
'=3Pkl',
|
|
'-----END PGP SIGNATURE-----'].join('\n');
|
|
|
|
const plaintext = 'short message\nnext line\n한국어/조선말';
|
|
const csMsg = await openpgp.cleartext.readArmored(msg_armor);
|
|
const pubKey2 = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const pubKey3 = (await openpgp.key.readArmored(pub_key_arm3)).keys[0];
|
|
|
|
const keyids = csMsg.getSigningKeyIds();
|
|
|
|
expect(pubKey2.getKeys(keyids[0])).to.not.be.empty;
|
|
expect(pubKey3.getKeys(keyids[1])).to.not.be.empty;
|
|
|
|
return openpgp.verify({ publicKeys:[pubKey2, pubKey3], message:csMsg }).then(function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.data).to.equal(plaintext);
|
|
expect(cleartextSig.signatures).to.have.length(2);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[1].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
expect(cleartextSig.signatures[1].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Verify latin-1 signed message', async function() {
|
|
const latin1Binary = openpgp.util.hex_to_Uint8Array('48e46c6cf62057e86c74');
|
|
const message = openpgp.message.fromBinary(latin1Binary);
|
|
|
|
message.appendSignature(`-----BEGIN PGP SIGNATURE-----
|
|
|
|
iQIzBAEBCAAdFiEET5+J9VBawdGiYGMc2xGHud1faTsFAl5lE/AACgkQ2xGHud1f
|
|
aTtIuw//YWrVaXLyP8sGBc0uUSLxQbmfQQYV8Oq8Vsg+jV4orc73wmEy8+Nj5m2g
|
|
fFEPaWy07dfDBtv874XCsZmCM+ZhwkGaT9lwcCxkxNZeywTE5JRS1/6Ky3G4gDZ/
|
|
QozTXr/ZNPXF6bBENqhfqeO2xkD577bjiPu5wLcu3/RR39YnWp5zQu9ynJbpwobz
|
|
HHQW5TgSUgi/9tInQ+cc7vMkHzfe2Zg45HkyaStBW1x7Fm9FLv8GNw1R2jVbUlsX
|
|
SEL7yPrsZAmgyu1ifMrTTY4vunuUNUFiGZN9UC75b7s4tjKkvJ0sfdQusC0vmcE0
|
|
Wq7dAoeX72B94TITuXldDGIfL01smycm+mEvf/kXxQg81wj4la72IzhdWeC6r4PF
|
|
558QDEtZy984iL8RJKpbjwgsxyvfM9zf9qtmuNdscbZaZsx9LRe21uaKhX8yJsAU
|
|
jCgyjM5e7CMdvBUyxrpGzS+mP/rh77r2TXkg6u2+8Nj4osxwkfxvDIGpJfaIWl2a
|
|
sNQ4Bsgm6rcNYaxUVbOsBFJddBb503KpTX5aK8TuC6AINg6bV6rmfj2Jc/QX4eHb
|
|
Xgm6EyJo74z5R7YvA3XdUZf1sfwfoMLbbUqpeHEZOcWy4vrS79Omx1MyPxKHPiXU
|
|
PAAeuQTUrcJdZeJ86eQ9cCUB216HCwSKOWTQRzL+hBWKXij4WD4=
|
|
=ZEFm
|
|
-----END PGP SIGNATURE-----`);
|
|
|
|
const pubKey = (await openpgp.key.readArmored(pub_latin1_msg)).keys[0];
|
|
|
|
return message.verify([pubKey]).then(async verifiedSig => {
|
|
expect(await openpgp.stream.readToEnd(message.getLiteralData())).to.equal(latin1Binary);
|
|
expect(verifiedSig).to.exist;
|
|
expect(verifiedSig).to.have.length(1);
|
|
expect(await verifiedSig[0].verified).to.be.true;
|
|
expect((await verifiedSig[0].signature).packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
|
|
it('Verify cleartext signed message with trailing spaces from GPG', async function() {
|
|
const { reject_message_hash_algorithms } = openpgp.config;
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms: new Set([openpgp.enums.hash.md5, openpgp.enums.hash.ripemd]) });
|
|
try {
|
|
const msg_armor =
|
|
`-----BEGIN PGP SIGNED MESSAGE-----
|
|
Hash: SHA1
|
|
|
|
space:
|
|
space and tab: \t
|
|
no trailing space
|
|
|
|
tab:\t
|
|
tab and space:\t
|
|
-----BEGIN PGP SIGNATURE-----
|
|
Version: GnuPG v1
|
|
|
|
iJwEAQECAAYFAlrZzCQACgkQ4IT3RGwgLJeWggP+Pb33ubbELIzg9/imM+zlR063
|
|
g0FbG4B+RGZNFSbaDArUgh9fdVqBy8M9vvbbDMBalSiQxY09Lrasfb+tsomrygbN
|
|
NisuPRa5phPhn1bB4hZDb2ed/iK41CNyU7QHuv4AAvLC0mMamRnEg0FW2M2jZLGh
|
|
zmuVOdNuWQqxT9Sqa84=
|
|
=bqAR
|
|
-----END PGP SIGNATURE-----`;
|
|
|
|
const plaintext = 'space: \nspace and tab: \t\nno trailing space\n \ntab:\t\ntab and space:\t ';
|
|
const csMsg = await openpgp.cleartext.readArmored(msg_armor);
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
|
|
const keyids = csMsg.getSigningKeyIds();
|
|
|
|
expect(pubKey.getKeys(keyids[0])).to.not.be.empty;
|
|
|
|
const cleartextSig = await openpgp.verify({ publicKeys:[pubKey], message:csMsg });
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.data).to.equal(plaintext.replace(/[ \t]+$/mg, ''));
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
} finally {
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms });
|
|
}
|
|
});
|
|
|
|
function tests() {
|
|
it('Verify signed message with trailing spaces from GPG', async function() {
|
|
const msg_armor =
|
|
`-----BEGIN PGP MESSAGE-----
|
|
Version: GnuPG v1
|
|
|
|
owGbwMvMyMT4oOW7S46CznTG01El3MUFicmpxbolqcUlUTev14K5Vgq8XGCGQmJe
|
|
ikJJYpKVAicvV16+QklRYmZOZl66AliWl0sBqBAkzQmmwKohBnAqdMxhYWRkYmBj
|
|
ZQIZy8DFKQCztusM8z+Vt/svG80IS/etn90utv/T16jquk69zPvp6t9F16ryrwpb
|
|
kfVlS5Xl38KnVYxWvIor0nao6WUczA4vvZX9TXPWnnW3tt1vbZoiqWUjYjjjhuKG
|
|
4DtmMTuL3TW6/zNzVfWp/Q11+71O8RGnXMsBvWM6mSqX75uLiPo6HRaUDHnvrfCP
|
|
yYDnCgA=
|
|
=15ki
|
|
-----END PGP MESSAGE-----`;
|
|
|
|
const plaintext = 'space: \nspace and tab: \t\nno trailing space\n \ntab:\t\ntab and space:\t ';
|
|
const sMsg = await openpgp.message.readArmored(msg_armor);
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
|
|
const keyids = sMsg.getSigningKeyIds();
|
|
|
|
expect(pubKey.getKeys(keyids[0])).to.not.be.empty;
|
|
|
|
return openpgp.verify({ publicKeys: [pubKey], message: sMsg }).then(function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(openpgp.util.Uint8Array_to_str(openpgp.util.nativeEOL(cleartextSig.data))).to.equal(plaintext);
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.equal(!openpgp.config.reject_message_hash_algorithms.has(openpgp.enums.hash.sha1));
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Streaming verify signed message with trailing spaces from GPG', async function() {
|
|
const msg_armor =
|
|
`-----BEGIN PGP MESSAGE-----
|
|
Version: GnuPG v1
|
|
|
|
owGbwMvMyMT4oOW7S46CznTG01El3MUFicmpxbolqcUlUTev14K5Vgq8XGCGQmJe
|
|
ikJJYpKVAicvV16+QklRYmZOZl66AliWl0sBqBAkzQmmwKohBnAqdMxhYWRkYmBj
|
|
ZQIZy8DFKQCztusM8z+Vt/svG80IS/etn90utv/T16jquk69zPvp6t9F16ryrwpb
|
|
kfVlS5Xl38KnVYxWvIor0nao6WUczA4vvZX9TXPWnnW3tt1vbZoiqWUjYjjjhuKG
|
|
4DtmMTuL3TW6/zNzVfWp/Q11+71O8RGnXMsBvWM6mSqX75uLiPo6HRaUDHnvrfCP
|
|
yYDnCgA=
|
|
=15ki
|
|
-----END PGP MESSAGE-----`.split('');
|
|
|
|
const plaintext = 'space: \nspace and tab: \t\nno trailing space\n \ntab:\t\ntab and space:\t ';
|
|
const sMsg = await openpgp.message.readArmored(new ReadableStream({
|
|
async pull(controller) {
|
|
await new Promise(setTimeout);
|
|
controller.enqueue(msg_armor.shift());
|
|
if (!msg_armor.length) controller.close();
|
|
}
|
|
}));
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
|
|
const keyids = sMsg.getSigningKeyIds();
|
|
|
|
expect(pubKey.getKeys(keyids[0])).to.not.be.empty;
|
|
|
|
return openpgp.verify({ publicKeys: [pubKey], message: sMsg }).then(async function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(openpgp.util.Uint8Array_to_str(openpgp.util.nativeEOL(await openpgp.stream.readToEnd(cleartextSig.data)))).to.equal(plaintext);
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
if (!openpgp.config.reject_message_hash_algorithms.has(openpgp.enums.hash.sha1)) {
|
|
expect(await cleartextSig.signatures[0].verified).to.be.true;
|
|
} else {
|
|
await expect(cleartextSig.signatures[0].verified).to.be.rejectedWith('Insecure message hash algorithm: SHA1');
|
|
}
|
|
expect((await cleartextSig.signatures[0].signature).packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Verify signed message with missing signature packet', async function() {
|
|
const msg_armor =
|
|
`-----BEGIN PGP MESSAGE-----
|
|
Version: OpenPGP.js v3.1.3
|
|
Comment: https://openpgpjs.org
|
|
|
|
yFgBO8LLzMjE+KDlu0uOgs50xtNRJdzFBYnJqcW6JanFJVE3r9eCuVYKvFxg
|
|
hkJiXopCSWKSlQInL1devkJJUWJmTmZeugJYlpdLAagQJM0JpsCqIQZwKgAA
|
|
|
|
=D6TZ
|
|
-----END PGP MESSAGE-----`;
|
|
|
|
const plaintext = 'space: \nspace and tab: \t\nno trailing space\n \ntab:\t\ntab and space:\t ';
|
|
const sMsg = await openpgp.message.readArmored(msg_armor);
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
|
|
const keyids = sMsg.getSigningKeyIds();
|
|
|
|
expect(pubKey.getKeys(keyids[0])).to.not.be.empty;
|
|
|
|
return openpgp.verify({ publicKeys: [pubKey], message: sMsg }).then(async function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(openpgp.util.Uint8Array_to_str(openpgp.util.nativeEOL(await openpgp.stream.readToEnd(cleartextSig.data)))).to.equal(plaintext);
|
|
expect(cleartextSig.signatures).to.have.length(0);
|
|
});
|
|
});
|
|
|
|
it('Streaming verify signed message with missing signature packet', async function() {
|
|
const msg_armor =
|
|
`-----BEGIN PGP MESSAGE-----
|
|
Version: OpenPGP.js v3.1.3
|
|
Comment: https://openpgpjs.org
|
|
|
|
yFgBO8LLzMjE+KDlu0uOgs50xtNRJdzFBYnJqcW6JanFJVE3r9eCuVYKvFxg
|
|
hkJiXopCSWKSlQInL1devkJJUWJmTmZeugJYlpdLAagQJM0JpsCqIQZwKgAA
|
|
|
|
=D6TZ
|
|
-----END PGP MESSAGE-----`.split('');
|
|
|
|
const plaintext = 'space: \nspace and tab: \t\nno trailing space\n \ntab:\t\ntab and space:\t ';
|
|
const sMsg = await openpgp.message.readArmored(new ReadableStream({
|
|
async pull(controller) {
|
|
await new Promise(setTimeout);
|
|
controller.enqueue(msg_armor.shift());
|
|
if (!msg_armor.length) controller.close();
|
|
}
|
|
}));
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
|
|
const keyids = sMsg.getSigningKeyIds();
|
|
|
|
expect(pubKey.getKeys(keyids[0])).to.not.be.empty;
|
|
|
|
return openpgp.verify({ publicKeys: [pubKey], message: sMsg }).then(async function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(openpgp.util.Uint8Array_to_str(openpgp.util.nativeEOL(await openpgp.stream.readToEnd(cleartextSig.data)))).to.equal(plaintext);
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
await expect(cleartextSig.signatures[0].verified).to.be.rejectedWith('Corresponding signature packet missing');
|
|
expect((await cleartextSig.signatures[0].signature).packets.length).to.equal(0);
|
|
});
|
|
});
|
|
}
|
|
|
|
tests();
|
|
|
|
tryTests('With Worker', tests, {
|
|
if: typeof window !== 'undefined' && window.Worker,
|
|
before: async function() {
|
|
await openpgp.initWorker({ path: '../dist/openpgp.worker.js' });
|
|
},
|
|
after: function() {
|
|
openpgp.destroyWorker();
|
|
}
|
|
});
|
|
|
|
let reject_message_hash_algorithms;
|
|
tryTests('Accept SHA-1 signatures', tests, {
|
|
if: true,
|
|
before: function() {
|
|
({ reject_message_hash_algorithms } = openpgp.config);
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms: new Set([openpgp.enums.hash.md5, openpgp.enums.hash.ripemd]) });
|
|
},
|
|
after: function() {
|
|
Object.assign(openpgp.config, { reject_message_hash_algorithms });
|
|
}
|
|
});
|
|
|
|
it('Sign text with openpgp.sign and verify with openpgp.verify leads to same string cleartext and valid signatures', async function() {
|
|
const plaintext = 'short message\nnext line \n한국어/조선말';
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
await privKey.decrypt('hello world');
|
|
|
|
return openpgp.sign({ privateKeys:[privKey], message: openpgp.cleartext.fromText(plaintext) }).then(async function(signed) {
|
|
|
|
const csMsg = await openpgp.cleartext.readArmored(signed.data);
|
|
return openpgp.verify({ publicKeys:[pubKey], message:csMsg });
|
|
|
|
}).then(function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.data).to.equal(plaintext.replace(/[ \t\r]+$/mg, ''));
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Sign text with openpgp.sign and verify with openpgp.verify leads to same string cleartext and valid signatures -- escape armored message', async function() {
|
|
const plaintext = pub_key_arm2;
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
await privKey.decrypt('hello world');
|
|
|
|
return openpgp.sign({ privateKeys:[privKey], message: openpgp.cleartext.fromText(plaintext) }).then(async function(signed) {
|
|
|
|
const csMsg = await openpgp.cleartext.readArmored(signed.data);
|
|
return openpgp.verify({ publicKeys:[pubKey], message:csMsg });
|
|
|
|
}).then(function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.data).to.equal(plaintext);
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Sign text with openpgp.sign and verify with openpgp.verify leads to same string cleartext and valid signatures -- trailing spaces', async function() {
|
|
const plaintext = 'space: \nspace and tab: \t\nno trailing space\n \ntab:\t\ntab and space:\t ';
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
await privKey.decrypt('hello world');
|
|
|
|
return openpgp.sign({ privateKeys:[privKey], message: openpgp.cleartext.fromText(plaintext) }).then(async function(signed) {
|
|
|
|
const csMsg = await openpgp.cleartext.readArmored(signed.data);
|
|
return openpgp.verify({ publicKeys:[pubKey], message:csMsg });
|
|
|
|
}).then(function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.data).to.equal(plaintext.replace(/[ \t]+$/mg, ''));
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Sign text with openpgp.sign and verify with openpgp.verify leads to same bytes cleartext and valid signatures - armored', async function() {
|
|
const plaintext = openpgp.util.str_to_Uint8Array('short message\nnext line \n한국어/조선말');
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
await privKey.decrypt('hello world');
|
|
|
|
return openpgp.sign({ privateKeys:[privKey], message: openpgp.message.fromBinary(plaintext) }).then(async function(signed) {
|
|
|
|
const csMsg = await openpgp.message.readArmored(signed.data);
|
|
return openpgp.verify({ publicKeys:[pubKey], message:csMsg });
|
|
|
|
}).then(async function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.data).to.deep.equal(plaintext);
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Sign text with openpgp.sign and verify with openpgp.verify leads to same bytes cleartext and valid signatures - not armored', async function() {
|
|
const plaintext = openpgp.util.str_to_Uint8Array('short message\nnext line \n한국어/조선말');
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
await privKey.decrypt('hello world');
|
|
|
|
return openpgp.sign({ privateKeys:[privKey], message: openpgp.message.fromBinary(plaintext), armor:false }).then(function(signed) {
|
|
|
|
const csMsg = signed.message;
|
|
return openpgp.verify({ publicKeys:[pubKey], message:csMsg });
|
|
|
|
}).then(function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.data).to.deep.equal(plaintext);
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Should verify cleartext message correctly when using a detached cleartext signature and binary literal data', async function () {
|
|
const plaintext = 'short message\nnext line \n한국어/조선말';
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
await privKey.decrypt('hello world');
|
|
return openpgp.sign({ privateKeys:[privKey], message: openpgp.message.fromText(plaintext), detached: true}).then(async function(signed) {
|
|
const signature = await openpgp.signature.readArmored(signed.signature);
|
|
return openpgp.verify({ publicKeys:[pubKey], message: openpgp.message.fromBinary(openpgp.util.encode_utf8(plaintext)), signature: signature });
|
|
}).then(function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Should verify cleartext message correctly when using a detached binary signature and text literal data', async function () {
|
|
const plaintext = 'short message\nnext line \n한국어/조선말';
|
|
const plaintextArray = openpgp.util.encode_utf8(plaintext);
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
await privKey.decrypt('hello world');
|
|
return openpgp.sign({ privateKeys:[privKey], message:openpgp.message.fromBinary(plaintextArray), detached: true}).then(async function(signed) {
|
|
const signature = await openpgp.signature.readArmored(signed.signature);
|
|
return openpgp.verify({ publicKeys:[pubKey], message: openpgp.message.fromText(plaintext), signature: signature });
|
|
}).then(function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Should verify encrypted cleartext message correctly when encrypting binary literal data with a canonical text signature', async function () {
|
|
const plaintext = 'short message\nnext line \n한국어/조선말';
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
await Promise.all([privKey.primaryKey.decrypt('hello world'), privKey.subKeys[0].keyPacket.decrypt('hello world')]);
|
|
return openpgp.sign({ privateKeys:[privKey], message: openpgp.message.fromText(plaintext), detached: true}).then(async function(signed) {
|
|
const signature = await openpgp.signature.readArmored(signed.signature);
|
|
return openpgp.encrypt({ message: openpgp.message.fromBinary(openpgp.util.encode_utf8(plaintext)), publicKeys: [pubKey], signature })
|
|
}).then(async ({ data }) => {
|
|
const csMsg = await openpgp.message.readArmored(data);
|
|
return openpgp.decrypt({ message: csMsg, privateKeys: [ privKey ], publicKeys: [ pubKey ] });
|
|
}).then(function(cleartextSig) {
|
|
expect(cleartextSig).to.exist;
|
|
expect(cleartextSig.signatures).to.have.length(1);
|
|
expect(cleartextSig.signatures[0].valid).to.be.true;
|
|
expect(cleartextSig.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Verify test with expired verification public key', async function() {
|
|
const pubKey = (await openpgp.key.readArmored(pub_expired)).keys[0];
|
|
const message = await openpgp.message.readArmored(msg_sig_expired);
|
|
return openpgp.verify({ publicKeys:[pubKey], message:message }).then(function(verified) {
|
|
expect(verified).to.exist;
|
|
expect(verified.signatures).to.have.length(1);
|
|
expect(verified.signatures[0].valid).to.be.true;
|
|
expect(verified.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
it('Verify test with expired verification public key and disable expiration checks using null date', async function() {
|
|
const pubKey = (await openpgp.key.readArmored(pub_expired)).keys[0];
|
|
const message = await openpgp.message.readArmored(msg_sig_expired);
|
|
return openpgp.verify({ publicKeys:[pubKey], message:message, date: null }).then(function(verified) {
|
|
expect(verified).to.exist;
|
|
expect(verified.signatures).to.have.length(1);
|
|
expect(verified.signatures[0].valid).to.be.true;
|
|
expect(verified.signatures[0].signature.packets.length).to.equal(1);
|
|
});
|
|
});
|
|
|
|
// TODO add test with multiple revocation signatures
|
|
it('Verify primary key revocation signatures', async function() {
|
|
const pubKey = (await openpgp.key.readArmored(pub_revoked)).keys[0];
|
|
await expect(pubKey.revocationSignatures[0].verify(
|
|
pubKey.primaryKey, openpgp.enums.signature.key_revocation, {key: pubKey.primaryKey}
|
|
)).to.eventually.be.true;
|
|
});
|
|
|
|
// TODO add test with multiple revocation signatures
|
|
it('Verify subkey revocation signatures', async function() {
|
|
const pubKey = (await openpgp.key.readArmored(pub_revoked)).keys[0];
|
|
await expect(pubKey.subKeys[0].revocationSignatures[0].verify(
|
|
pubKey.primaryKey, openpgp.enums.signature.subkey_revocation, {key: pubKey.primaryKey, bind: pubKey.subKeys[0].keyPacket}
|
|
)).to.eventually.be.true;
|
|
});
|
|
|
|
it('Verify key expiration date', async function() {
|
|
const pubKey = (await openpgp.key.readArmored(pub_revoked)).keys[0];
|
|
|
|
expect(pubKey).to.exist;
|
|
expect(pubKey.users[0].selfCertifications[0].keyNeverExpires).to.be.false;
|
|
expect(pubKey.users[0].selfCertifications[0].keyExpirationTime).to.equal(5*365*24*60*60);
|
|
});
|
|
|
|
it('Write unhashed subpackets', async function() {
|
|
let pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
expect(pubKey.users[0].selfCertifications).to.exist;
|
|
pubKey = (await openpgp.key.readArmored(pubKey.armor())).keys[0];
|
|
expect(pubKey.users[0].selfCertifications).to.exist;
|
|
});
|
|
|
|
it('Write V4 signatures', async function() {
|
|
const pubKey = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const pubKey2 = (await openpgp.key.readArmored(pubKey.armor())).keys[0];
|
|
expect(pubKey2).to.exist;
|
|
expect(pubKey.users[0].selfCertifications).to.eql(pubKey2.users[0].selfCertifications);
|
|
});
|
|
|
|
it('Verify a detached signature using appendSignature', async function() {
|
|
const detachedSig = ['-----BEGIN PGP SIGNATURE-----',
|
|
'Version: GnuPG v1.4.13 (Darwin)',
|
|
'Comment: GPGTools - https://gpgtools.org',
|
|
'Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/',
|
|
'',
|
|
'iQEcBAEBCgAGBQJTqH5OAAoJENf7k/zfv8I8oFoH/R6EFTw2CYUQoOKSAQstWIHp',
|
|
'fVVseLOkFbByUV5eLuGVBNI3DM4GQ6C7dGntKAn34a1iTGcAIZH+fIhaZ2WtNdtA',
|
|
'R+Ijn8xDjbF/BWvcTBOaRvgw9b8viPxhkVYa3PioHYz6krt/LmFqFdp/phWZcqR4',
|
|
'jzWMX55h4FOw3YBNGiz2NuIg+iGrFRWPYgd8NVUmJKReZHs8C/6HGz7F4/A24k6Y',
|
|
'7xms9D6Er+MhspSl+1dlRdHjtXiRqC5Ld1hi2KBKc6YzgOLpVw5l9sffbnH+aRG4',
|
|
'dH+2J5U3elqBDK1i3GyG8ixLSB0FGW9+lhYNosZne2xy8SbQKdgsnTBnWSGevP0=',
|
|
'=xiih',
|
|
'-----END PGP SIGNATURE-----'].join('\r\n');
|
|
|
|
const content = ['Content-Type: multipart/mixed;',
|
|
' boundary="------------070307080002050009010403"',
|
|
'',
|
|
'This is a multi-part message in MIME format.',
|
|
'--------------070307080002050009010403',
|
|
'Content-Type: text/plain; charset=ISO-8859-1',
|
|
'Content-Transfer-Encoding: quoted-printable',
|
|
'',
|
|
'test11',
|
|
'',
|
|
'--------------070307080002050009010403',
|
|
'Content-Type: application/macbinary;',
|
|
' name="test.bin"',
|
|
'Content-Transfer-Encoding: base64',
|
|
'Content-Disposition: attachment;',
|
|
' filename="test.bin"',
|
|
'',
|
|
'dGVzdGF0dGFjaG1lbnQ=',
|
|
'--------------070307080002050009010403--',
|
|
''].join('\r\n');
|
|
|
|
const publicKeyArmored = '-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nVersion: OpenPGP.js v.1.20131116\r\nComment: Whiteout Mail - https://whiteout.io\r\n\r\nxsBNBFKODs4BB/9iOF4THsjQMY+WEpT7ShgKxj4bHzRRaQkqczS4nZvP0U3g\r\nqeqCnbpagyeKXA+bhWFQW4GmXtgAoeD5PXs6AZYrw3tWNxLKu2Oe6Tp9K/XI\r\nxTMQ2wl4qZKDXHvuPsJ7cmgaWqpPyXtxA4zHHS3WrkI/6VzHAcI/y6x4szSB\r\nKgSuhI3hjh3s7TybUC1U6AfoQGx/S7e3WwlCOrK8GTClirN/2mCPRC5wuIft\r\nnkoMfA6jK8d2OPrJ63shy5cgwHOjQg/xuk46dNS7tkvGmbaa+X0PgqSKB+Hf\r\nYPPNS/ylg911DH9qa8BqYU2QpNh9jUKXSF+HbaOM+plWkCSAL7czV+R3ABEB\r\nAAHNLVdoaXRlb3V0IFVzZXIgPHNhZmV3aXRobWUudGVzdHVzZXJAZ21haWwu\r\nY29tPsLAXAQQAQgAEAUCUo4O2gkQ1/uT/N+/wjwAAN2cB/9gFRmAfvEQ2qz+\r\nWubmT2EsSSnjPMxzG4uyykFoa+TaZCWo2Xa2tQghmU103kEkQb1OEjRjpgwJ\r\nYX9Kghnl8DByM686L5AXnRyHP78qRJCLXSXl0AGicboUDp5sovaa4rswQceH\r\nvcdWgZ/mgHTRoiQeJddy9k+H6MPFiyFaVcFwegVsmpc+dCcC8yT+qh8ZIbyG\r\nRJU60PmKKN7LUusP+8DbSv39zCGJCBlVVKyA4MzdF5uM+sqTdXbKzOrT5DGd\r\nCZaox4s+w16Sq1rHzZKFWfQPfKLDB9pyA0ufCVRA3AF6BUi7G3ZqhZiHNhMP\r\nNvE45V/hS1PbZcfPVoUjE2qc1Ix1\r\n=7Wpe\r\n-----END PGP PUBLIC KEY BLOCK-----';
|
|
const publicKeys = (await openpgp.key.readArmored(publicKeyArmored)).keys;
|
|
|
|
// Text
|
|
const msg = openpgp.message.fromText(content);
|
|
await msg.appendSignature(detachedSig);
|
|
return msg.verify(publicKeys).then(async result => {
|
|
openpgp.stream.pipe(msg.getLiteralData(), new WritableStream());
|
|
expect(await result[0].verified).to.be.true;
|
|
});
|
|
});
|
|
|
|
it('Detached signature signing and verification', async function() {
|
|
const msg = openpgp.message.fromText('hello');
|
|
const pubKey2 = (await openpgp.key.readArmored(pub_key_arm2)).keys[0];
|
|
const privKey2 = (await openpgp.key.readArmored(priv_key_arm2)).keys[0];
|
|
await privKey2.decrypt('hello world');
|
|
|
|
const opt = {numBits: 512, userIds: { name:'test', email:'a@b.com' }, passphrase: null};
|
|
if (openpgp.util.getWebCryptoAll()) { opt.numBits = 2048; } // webkit webcrypto accepts minimum 2048 bit keys
|
|
return openpgp.generateKey(opt).then(function(gen) {
|
|
const generatedKey = gen.key;
|
|
return msg.signDetached([generatedKey, privKey2]).then(detachedSig => {
|
|
return msg.verifyDetached(detachedSig, [generatedKey.toPublic(), pubKey2]).then(async result => {
|
|
expect(await result[0].verified).to.be.true;
|
|
expect(await result[1].verified).to.be.true;
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
it('Sign message with key without password', function() {
|
|
const opt = {numBits: 512, userIds: { name:'test', email:'a@b.com' }, passphrase: null};
|
|
if (openpgp.util.getWebCryptoAll()) { opt.numBits = 2048; } // webkit webcrypto accepts minimum 2048 bit keys
|
|
return openpgp.generateKey(opt).then(function(gen) {
|
|
const key = gen.key;
|
|
let message = openpgp.message.fromText('hello world');
|
|
message = message.sign([key]);
|
|
expect(message).to.exist;
|
|
});
|
|
});
|
|
|
|
it('Verify signed key', async function() {
|
|
const signedArmor = [
|
|
'-----BEGIN PGP PUBLIC KEY BLOCK-----',
|
|
'Version: GnuPG v1',
|
|
'',
|
|
'mI0EUmEvTgEEANyWtQQMOybQ9JltDqmaX0WnNPJeLILIM36sw6zL0nfTQ5zXSS3+',
|
|
'fIF6P29lJFxpblWk02PSID5zX/DYU9/zjM2xPO8Oa4xo0cVTOTLj++Ri5mtr//f5',
|
|
'GLsIXxFrBJhD/ghFsL3Op0GXOeLJ9A5bsOn8th7x6JucNKuaRB6bQbSPABEBAAG0',
|
|
'JFRlc3QgTWNUZXN0aW5ndG9uIDx0ZXN0QGV4YW1wbGUuY29tPoi5BBMBAgAjBQJS',
|
|
'YS9OAhsvBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQSmNhOk1uQJQwDAP6',
|
|
'AgrTyqkRlJVqz2pb46TfbDM2TDF7o9CBnBzIGoxBhlRwpqALz7z2kxBDmwpQa+ki',
|
|
'Bq3jZN/UosY9y8bhwMAlnrDY9jP1gdCo+H0sD48CdXybblNwaYpwqC8VSpDdTndf',
|
|
'9j2wE/weihGp/DAdy/2kyBCaiOY1sjhUfJ1GogF49rCIRgQQEQIABgUCVuXBfQAK',
|
|
'CRARJ5QDyxae+O0fAJ9hUQPejXvZv6VW1Q3/Pm3+x2wfJACgwFg9NlrPPfejoC1w',
|
|
'P+z+vE5NFA24jQRSYS9OAQQA6R/PtBFaJaT4jq10yqASk4sqwVMsc6HcifM5lSdx',
|
|
'zExFP74naUMMyEsKHP53QxTF0GrqusagQg/ZtgT0CN1HUM152y7ACOdp1giKjpMz',
|
|
'OTQClqCoclyvWOFB+L/SwGEIJf7LSCErwoBuJifJc8xAVr0XX0JthoW+uP91eTQ3',
|
|
'XpsAEQEAAYkBPQQYAQIACQUCUmEvTgIbLgCoCRBKY2E6TW5AlJ0gBBkBAgAGBQJS',
|
|
'YS9OAAoJEOCE90RsICyXuqIEANmmiRCASF7YK7PvFkieJNwzeK0V3F2lGX+uu6Y3',
|
|
'Q/Zxdtwc4xR+me/CSBmsURyXTO29OWhPGLszPH9zSJU9BdDi6v0yNprmFPX/1Ng0',
|
|
'Abn/sCkwetvjxC1YIvTLFwtUL/7v6NS2bZpsUxRTg9+cSrMWWSNjiY9qUKajm1tu',
|
|
'zPDZXAUEAMNmAN3xXN/Kjyvj2OK2ck0XW748sl/tc3qiKPMJ+0AkMF7Pjhmh9nxq',
|
|
'E9+QCEl7qinFqqBLjuzgUhBU4QlwX1GDAtNTq6ihLMD5v1d82ZC7tNatdlDMGWnI',
|
|
'dvEMCv2GZcuIqDQ9rXWs49e7tq1NncLYhz3tYjKhoFTKEIq3y3Pp',
|
|
'=fvK7',
|
|
'-----END PGP PUBLIC KEY BLOCK-----'
|
|
].join('\n');
|
|
|
|
const signedKey = (await openpgp.key.readArmored(signedArmor)).keys[0];
|
|
const signerKey = (await openpgp.key.readArmored(priv_key_arm1)).keys[0];
|
|
return signedKey.verifyPrimaryUser([signerKey]).then(signatures => {
|
|
expect(signatures[0].valid).to.be.null;
|
|
expect(signatures[0].keyid.toHex()).to.equal(signedKey.getKeyId().toHex());
|
|
expect(signatures[1].valid).to.be.true;
|
|
expect(signatures[1].keyid.toHex()).to.equal(signerKey.getKeyId().toHex());
|
|
});
|
|
});
|
|
|
|
it('Verify signed UserIDs and User Attributes', async function() {
|
|
const armoredKeyWithPhoto = `-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
|
|
mI0EW1CJGAEEAM+BzuFzcYk9HttmDbjGexQ8dfme074Q5PuHas3PBISPm0AwmnDM
|
|
tzjlcrrg2VGuLqHvNF600w2ZgOo2gElNYCOas1q/fVFuIgJ4SUduNOEe/JnIW4uP
|
|
iEGU9l6zOVVgTc/nGVpZdvHgvOL8nl9BKHtWEnMD3Du7UYAm+Avshu9jABEBAAG0
|
|
AViI1AQTAQoAPhYhBKcH118Rrg0wLBrTk5IyMikCym+4BQJbUIkYAhsDBQkDwmcA
|
|
BQsJCAcDBRUKCQgLBRYDAgEAAh4BAheAAAoJEJIyMikCym+4K8oEAJc7YFiNau6V
|
|
HTVK4cTvWU5MuYiejejFZai4ELUJy+WF6cZYrLuF/z/kRt8B7hpumXChPCUlT0q7
|
|
FWypQtA3leu83DGMXqhfS80h2S1+VLmDVVWKQXOwgOb44jT9F08bDU5QK08SkjF8
|
|
/EirIy8ANzdwCA4rHytIS2yx6tLlthvX0cBwwG4BEAABAQAAAAAAAAAAAAAAAP/Y
|
|
/+AAEEpGSUYAAQEAAAEAAQAA/9sAQwABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
|
|
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/9sAQwEBAQEB
|
|
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
|
|
AQEBAQEBAQEBAQEB/8AAEQgAAQABAwEiAAIRAQMRAf/EABUAAQEAAAAAAAAAAAAA
|
|
AAAAAAAK/8QAFBABAAAAAAAAAAAAAAAAAAAAAP/EABQBAQAAAAAAAAAAAAAAAAAA
|
|
AAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwC/gAH/2YjUBBMB
|
|
CgA+FiEEpwfXXxGuDTAsGtOTkjIyKQLKb7gFAltQimUCGwMFCQPCZwAFCwkIBwMF
|
|
FQoJCAsFFgMCAQACHgECF4AACgkQkjIyKQLKb7gm/wQAiyZF89qr8hf3XQNJ6Ir/
|
|
QtaniPcesjrYCIE47ZfeDYpBTPeiMm295o2dZXVJS4ItllYsplASw5DJiIMnQKlJ
|
|
mbXakYFzzclTa/JrKzFYCy/DPT95xK+633omgrIUgJodizoKJE7XeB2U6aRUJJ4O
|
|
iTuGu4fEU1UligAXSrZmCdE=
|
|
=VK6I
|
|
-----END PGP PUBLIC KEY BLOCK-----`;
|
|
|
|
const key = (await openpgp.key.readArmored(armoredKeyWithPhoto)).keys[0];
|
|
for (const user of key.users) {
|
|
await user.verify(key.primaryKey);
|
|
}
|
|
});
|
|
|
|
});
|