{"action":"created","issue":{"url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/807","repository_url":"https://api.github.com/repos/openpgpjs/openpgpjs","labels_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/807/labels{/name}","comments_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/807/comments","events_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/807/events","html_url":"https://github.com/openpgpjs/openpgpjs/issues/807","id":385102765,"node_id":"MDU6SXNzdWUzODUxMDI3NjU=","number":807,"title":"OpenPgpJs version 4.2.1 Decrypt fails on verify signature with error 'Error decrypting message: Corresponding signature packet missing at OnePassSignature.verify (node_modules/openpgp/dist/openpgp.js:35786:11)'","user":{"login":"LukeMcCarthy-TW","id":45156330,"node_id":"MDQ6VXNlcjQ1MTU2MzMw","avatar_url":"https://avatars0.githubusercontent.com/u/45156330?v=4","gravatar_id":"","url":"https://api.github.com/users/LukeMcCarthy-TW","html_url":"https://github.com/LukeMcCarthy-TW","followers_url":"https://api.github.com/users/LukeMcCarthy-TW/followers","following_url":"https://api.github.com/users/LukeMcCarthy-TW/following{/other_user}","gists_url":"https://api.github.com/users/LukeMcCarthy-TW/gists{/gist_id}","starred_url":"https://api.github.com/users/LukeMcCarthy-TW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukeMcCarthy-TW/subscriptions","organizations_url":"https://api.github.com/users/LukeMcCarthy-TW/orgs","repos_url":"https://api.github.com/users/LukeMcCarthy-TW/repos","events_url":"https://api.github.com/users/LukeMcCarthy-TW/events{/privacy}","received_events_url":"https://api.github.com/users/LukeMcCarthy-TW/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-11-28T05:01:01Z","updated_at":"2018-11-28T22:45:21Z","closed_at":null,"author_association":"NONE","body":"When trying to decrypt a message I get the following error\r\n\r\nError: Error decrypting message: Decryption failed due to missing MDC.\r\n  at SymmetricallyEncrypted.decrypt (node_modules/openpgp/dist/openpgp.js:38899:11)\r\nat <anonymous>\r\n\r\nIf I set\r\n```\r\n  openpgp.config.ignore_mdc_error = true\r\n```\r\nI get the following error\r\n\r\n  Error: Error decrypting message: Corresponding signature packet missing\r\nat OnePassSignature.verify (node_modules/openpgp/dist/openpgp.js:35786:11)\r\nat <anonymous>\r\nat process._tickCallback (internal/process/next_tick.js:188:7)\r\n\r\nIf I remove the public key from the options then the file decrypts correctly, however, I then don't know who sent the message\r\n\r\nThe file is sent from another organisation and it would be very difficult to change anything on their side\r\n\r\nAny help would be greatly appreciated\r\n\r\nSample code below\r\n\r\n```\r\nconst expect = require('chai').expect;\r\nconst openpgp = require('openpgp')\r\n\r\nconst pgpKeys = require('./pgp_keys_decrypt_unit_test');\r\n\r\nconst encryptedText = `-----BEGIN PGP MESSAGE-----\r\nVersion: SDS E-Business Server - 64 Bit - v9.0.1 - Full License\r\n\r\nhQEMA1Fa0FFyaYAZAQgAouMX/4Vd0JWrWsmR6mzT/RLyK16Sd449R6r0H74msyas\r\nsX6YI5Qu+inIJxWQhLF5fgaxr7+N9mwKM/G2FrErG2MDT/XTwjH9WOH4AudK9lcX\r\nNWO2ELJyxwOJhqBlxL0bzjpmL83uufIjfEA7+QsTzGnMgg122aExVs2CVacxQob1\r\nmouEpA7hp3HHBosrO/zIX773sVrOknlYNbzB6lX/+5l14FN19HRXCI7vQIX0G/D1\r\nlF+kKmOodIZFD+5k/J1FDBwwOuHXai86Nv/l0ktvUG18yXrAxq96sTFgZ6xI8Yh0\r\n4mUlZ2Pr2o82Vr5hBbyuLLmD7FMnyg+lubDwxkJXhtLAswHWpzrQ3gMlZVdrneN/\r\nfZmp1yVJWSCTo0KguUZ7OZfjBMOrFPIwk02934EdZ0jP73OMVYS0/06vavRSFDIl\r\n9ysC0UjVyCZABA04TLjf6JlleFdls7hQVEf80LPUvLrHpMA+ZueW8/rJFuruFvJk\r\n1J7M5FmLZuaeeg7DjZ4+dbZug7F+tuQFUcSO10gBVSgUFGAAgljnKhTZG8Ml3ysB\r\n91GiVzfTmOtXUIx3gAqU2I/8JApoxxINuZTZZ4uUBvQ0I2IPBtqcM7XNp68CveR0\r\njyKUeK1vHn5UZUp2JPFUNxyJQYOYVARP7Sv+YiP+jbqQPxNyKiYXlWay/HaUPGdQ\r\nkfruIznX/hDKTxKrvvB+LtFcsnSwzM54TlqHa4PkfuUcjD/2yCdyjLsy9QeC6Ttv\r\nHK6z8nr93+gqUxmf19fH1zh0J3+fSU8SB7owcG+yabZs/MaG7JngHS3RrRtACUBr\r\np9wdjv/B21G8vl/qlHnFYW11CPa6\r\n=k3nV\r\n-----END PGP MESSAGE-----`;\r\n\r\nconst expectedDecryptedMessage = `hello world!`\r\n\r\nopenpgp.initWorker({ path:'openpgp.worker.js' })\r\nopenpgp.config.ignore_mdc_error = true;\r\n\r\nconst decrypt = async (encryptedText) => {\r\n  const privKeyObj = (await openpgp.key.readArmored(pgpKeys.privkey)).keys[0];\r\n  await privKeyObj.decrypt(pgpKeys.passphrase);\r\n\r\n  const options = {\r\n    message: await openpgp.message.readArmored(encryptedText),    // parse armored message\r\n    publicKeys: (await openpgp.key.readArmored(pgpKeys.pubkey)).keys, // for verification (optional)\r\n    privateKeys: [privKeyObj]                                 // for decryption\r\n  }\r\n\r\n  return await openpgp.decrypt(options).then(plaintext => plaintext.data);\r\n};\r\n\r\ndescribe('', () => {\r\n  it('given an unencrypted string when the unencrypted string is passed to encryptString then the string returned should be encrypted', async () => {\r\n\r\n    const result = await decrypt(encryptedText)\r\n\r\n    expect(result).to.equal(expectedDecryptedMessage);\r\n  });\r\n});\r\n```\r\n  "},"comment":{"url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/comments/442634275","html_url":"https://github.com/openpgpjs/openpgpjs/issues/807#issuecomment-442634275","issue_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/807","id":442634275,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjYzNDI3NQ==","user":{"login":"LukeMcCarthy-TW","id":45156330,"node_id":"MDQ6VXNlcjQ1MTU2MzMw","avatar_url":"https://avatars0.githubusercontent.com/u/45156330?v=4","gravatar_id":"","url":"https://api.github.com/users/LukeMcCarthy-TW","html_url":"https://github.com/LukeMcCarthy-TW","followers_url":"https://api.github.com/users/LukeMcCarthy-TW/followers","following_url":"https://api.github.com/users/LukeMcCarthy-TW/following{/other_user}","gists_url":"https://api.github.com/users/LukeMcCarthy-TW/gists{/gist_id}","starred_url":"https://api.github.com/users/LukeMcCarthy-TW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukeMcCarthy-TW/subscriptions","organizations_url":"https://api.github.com/users/LukeMcCarthy-TW/orgs","repos_url":"https://api.github.com/users/LukeMcCarthy-TW/repos","events_url":"https://api.github.com/users/LukeMcCarthy-TW/events{/privacy}","received_events_url":"https://api.github.com/users/LukeMcCarthy-TW/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T22:45:21Z","updated_at":"2018-11-28T22:45:21Z","author_association":"NONE","body":"Thanks, @twiss, I will see if I can get the sender to update to version 4 of PGP, if not I guess I will have to use version 3.\r\n\r\nThanks again for your speedy replies"}}
{"actor":{"display_login":"LukeMcCarthy-TW"}}