You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug doesn't affect me but I found it by chance whilst debugging #334: If you try to decrypt an EnvelopedData that doesn't have a user keying material (UKM) and you're using ECDH, you'd get the following error:
TypeError: Cannot read property 'toBER' of undefined
at LocalConstructedValueBlock.toBER (/home/gus/repos/relaynet-core-js/node_modules/asn1js/src/asn1.js:1247:35)
at Constructed.toBER (/home/gus/repos/relaynet-core-js/node_modules/asn1js/src/asn1.js:931:45)
at LocalConstructedValueBlock.toBER (/home/gus/repos/relaynet-core-js/node_modules/asn1js/src/asn1.js:1247:35)
at Sequence.toBER (/home/gus/repos/relaynet-core-js/node_modules/asn1js/src/asn1.js:931:45)
at /home/gus/repos/relaynet-core-js/node_modules/pkijs/src/EnvelopedData.js:1429:45
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Object.<anonymous> (/home/gus/repos/relaynet-core-js/src/integration_tests/pkijs_bug.test.ts:59:21)
This bug doesn't affect me but I found it by chance whilst debugging #334: If you try to decrypt an
EnvelopedData
that doesn't have a user keying material (UKM) and you're using ECDH, you'd get the following error:That's because
ukm
is assumed to be present:PKI.js/src/EnvelopedData.js
Line 953 in 699ac6e
PKI.js/src/ECCCMSSharedInfo.js
Line 187 in 682ef8d
But it doesn't have to be according to RFC 5753:
Note that
openssl cms -encrypt
doesn't add a UKM, and BouncyCastle would only do it if explicitly set.The text was updated successfully, but these errors were encountered: