Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The signature/validation code in the readme fails in verification #112

Open
beejones opened this issue Sep 8, 2020 · 1 comment
Open

Comments

@beejones
Copy link

beejones commented Sep 8, 2020

Hi,

I am testing your library. I based myself on your sample but signature validation failed for me.
I created a repo to test the readme sample: https://github.com/beejones/jsonld-signature-test
The id in the publicKey is used as a remote document and this download fails. Is this by design?

This is the exception I get.

Signature verification error: VerificationError: Verification error(s).
at Object.verify (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld-signatures/lib/jsonld-signatures.js:49:22)
at UserContext. (/home/codespace/workspace/poc/jsonld-signature-test/tests/sign.spec.ts:104:24) {
errors: [
JsonLdError [jsonld.LoadDocumentError]: Could not retrieve a JSON-LD document from the URL.
at Function.jsonld.get (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld/lib/jsonld.js:880:11)
at Function.jsonld.expand (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld/lib/jsonld.js:317:23)
at Function.jsonld.frame (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld/lib/jsonld.js:471:20)
at RsaSignature2018.getVerificationMethod (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld-signatures/lib/suites/LinkedDataSignature.js:252:34)
at RsaSignature2018.getVerificationMethod (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld-signatures/lib/suites/JwsLinkedDataSignature.js:164:32)
at RsaSignature2018.verifyProof (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld-signatures/lib/suites/LinkedDataSignature.js:154:34)
at async Promise.all (index 0)
at _verify (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld-signatures/lib/ProofSet.js:325:11)
at ProofSet.verify (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld-signatures/lib/ProofSet.js:253:23)
at Object.verify (/home/codespace/workspace/poc/jsonld-signature-test/node_modules/jsonld-signatures/lib/jsonld-signatures.js:38:18) {
details: [Object]
}
]
}

Thanks

@spsingh559
Copy link

I am also facing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants