digitalbazaar / jsonld-signatures

An implementation of the Linked Data Signatures specification for JSON-LD. Works in the browser and Node.js.
BSD 3-Clause "New" or "Revised" License
137 stars 41 forks source link

Add validation to value returned from `getPublicKey` #25

Closed mattcollier closed 5 years ago

mattcollier commented 7 years ago

https://github.com/digitalbazaar/jsonld-signatures/blob/multiSignature/lib/jsonld-signatures.js#L709

if getPublicKey returns publicKey as undefined, the following error can occur: 'TypeError: Cannot use \'in\' operator to search for \'revoked\' in undefined'

There should be some validation on the result returned from getPublicKey

dlongley commented 5 years ago

getPublicKey removed from the latest API.