aries-framework-go GitHub

PR #3630 feat: change DI VM purpose resolution
Using [ResolveSigningVMWithRelationship]( function causes a bug in VM relationship verification for Data integrity. 1. For instance, let's take issuer's DID, that after resolving has the following structure: ``` { "verificationMethod": [ ID: "abc", ..... ], "authentication": [ ID: "abc", ..... ] } ``` 3. Function [docRes.DIDDocument.VerificationMethods()]( with empty arguments returns a map with 2 elements: key `VerificationRelationshipGeneral` and `Authentication`. Values for those keys are verification methods with the same `ID` field. 4. Because func [docRes.DIDDocument.VerificationMethods()]( returns a map, the order of elements in `for ... range` loop is not predictable. It might be a case, when first element will be `VerificationRelationshipGeneral`. 5. In this case function [verificationRelationshipName()]( returns `""` 6. Then, [condition]( ``` if rel == "" { rel = "assertionMethod" } ```` takes place and declares hardcoded relationship.
Created At 2023-09-01 08:31:05 +0000 UTC