|
// 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?).
go-didplc/operation.go
Lines 196 to 198 in 93df7af
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?).