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

Test suite does not deference verificationMethod #23

Open
filip26 opened this issue Jun 29, 2022 · 3 comments
Open

Test suite does not deference verificationMethod #23

filip26 opened this issue Jun 29, 2022 · 3 comments

Comments

@filip26
Copy link

filip26 commented Jun 29, 2022

Hi,
a test on proofValue length fails in

"proofValue" field when decoded to raw bytes, MUST be 64 bytes in length if the associated public key is 32 bytes or 114 bytes in length if the public key is 57 bytes.
    Error: "publicKeyMultibase" has invalid header bytes: "vc.apicatalog.com/key/test.json".
at new Ed25519VerificationKey2020 (node_modules/@digitalbazaar/ed25519-verification-key-2020/lib/Ed25519VerificationKey2020.js:54:13)
at Function.fromFingerprint (node_modules/@digitalbazaar/ed25519-verification-key-2020/lib/Ed25519VerificationKey2020.js:204:12)
at DidKeyDriver.get (node_modules/@digitalbazaar/did-method-key/lib/DidKeyDriver.js:140:44)
at getPublicKeyBytes (tests/helpers.js:44:37)
at Context.<anonymous> (tests/10-create.js:104:35)

when the verification method is not DID key. e.g.

"verificationMethod": "https://vc.apicatalog.com/key/test.json"

The suite just strips https:// from the URL and treats the URL as DID key.

@aljones15
Copy link
Collaborator

I just got confirmation on this, you should be using did:key for this test suite.

@msporny
Copy link
Member

msporny commented Jun 29, 2022

The test suite is set up to use did:key as the verification method (we can't support arbitrary verification methods -- did:key is the simplest one we can use). The test suite should be checking to make sure the verificationMethod is a did:key before trying to do something w/ it.

@aljones15
Copy link
Collaborator

aljones15 commented Jul 1, 2023

@msporny Perhaps we should require vendors to provide a did resolver for their did key or method in the future? That way they can use did methods we don't have implementations of.

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

3 participants