Skip to content

Think about whether VerifySignatureAny early-exit logic is correct #12

@DavidBuchanan314

Description

@DavidBuchanan314

go-didplc/operation.go

Lines 196 to 198 in 93df7af

// parsing errors are not ignored (will be returned immediately if found)
// on success, the index of the first key that was able to validate the signature is returned
func VerifySignatureAny(op Operation, didKeys []string) (int, error) {

Raising parsing errors immediately might not be what we want, but I haven't thought about it hard enough yet.

I should create some test cases relating to invalid did:key encodings (I recently made some in the reference impl repo).

I'm not sure if we're enforcing the "blessed" key types properly yet (e.g. if an invalid key type came after a valid key which was able to validate the signature?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions