-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: compare owner and signer of credential on signature verification #674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we maybe move the logic inside the isSameSubject()
function? And modify it to perhaps take a checkType
flag, which fails if the subject is the same but the DID is of a different type? Flag false would return true
if the subject is the same regardless of the type.
Also I don't think we need directionality in the type check, right? If one is light and one is full, it is always an error, so that could simplify the verification logic a bit?
Like signing something with a light DID when a full DID exist is an error, and signing a DID with a full DID that does not exist is also an error.
I was looking into how this interacts with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it!
fixes KILTProtocol/ticket#1773
Checking whether the signer of a credential is (related to) the owner has is so far not happening as part of
verifyPresentation
.This adds this feature to
verifyDidSignature
, which is called byverifyPresentation
.How to test:
Unit tests related to that issue did not exist yet. I added these.
Checklist: