From aef44d389a63d0dab33fd635d1eb10aad15bad31 Mon Sep 17 00:00:00 2001 From: Andrii Holovko Date: Wed, 27 Nov 2024 18:39:08 +0200 Subject: [PATCH] feat(sdk): data integrity proof for vcplayground integration Signed-off-by: Andrii Holovko --- cmd/wallet-sdk-gomobile/go.mod | 4 +- cmd/wallet-sdk-gomobile/go.sum | 8 +- go.mod | 4 +- go.sum | 8 +- pkg/openid4vp/openid4vp.go | 123 ++++++++++++++++------ pkg/openid4vp/openid4vp_test.go | 20 ++-- test/integration/attestation/go.mod | 4 +- test/integration/attestation/go.sum | 8 +- test/integration/go.mod | 4 +- test/integration/go.sum | 8 +- test/integration/pkg/helpers/openid4ci.go | 1 - test/integration/trustregistry/go.mod | 4 +- test/integration/trustregistry/go.sum | 8 +- 13 files changed, 133 insertions(+), 71 deletions(-) diff --git a/cmd/wallet-sdk-gomobile/go.mod b/cmd/wallet-sdk-gomobile/go.mod index e0635455..7cb8573f 100644 --- a/cmd/wallet-sdk-gomobile/go.mod +++ b/cmd/wallet-sdk-gomobile/go.mod @@ -15,9 +15,9 @@ require ( github.com/gowebpki/jcs v1.0.1 github.com/piprate/json-gold v0.5.1-0.20230111113000-6ddbe6e6f19f github.com/stretchr/testify v1.8.3 - github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 + github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88 - github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc + github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 github.com/trustbloc/wallet-sdk v0.0.0-00010101000000-000000000000 ) diff --git a/cmd/wallet-sdk-gomobile/go.sum b/cmd/wallet-sdk-gomobile/go.sum index 5137f5a3..6a1500ff 100644 --- a/cmd/wallet-sdk-gomobile/go.sum +++ b/cmd/wallet-sdk-gomobile/go.sum @@ -147,16 +147,16 @@ github.com/tidwall/sjson v1.1.4 h1:bTSsPLdAYF5QNLSwYsKfBKKTnlGbIuhqL3CpRsjzGhg= github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= github.com/trustbloc/bbs-signature-go v1.0.2 h1:gepEsbLiZHv/vva9FKG5gF38mGtOIyGez7desZxiI1o= github.com/trustbloc/bbs-signature-go v1.0.2/go.mod h1:xYotcXHAbcE0TO+SteW0J6XI3geQaXq4wdnXR2k+XCU= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 h1:z9x5gLgDeUtcPUS8uQgHD/KQ/PL5VK2QV9oENYjsWbU= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396/go.mod h1:L5m4TVlPwe7VN5FRrANPMg6EJN8wIlthC8CvossDZVI= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 h1:ZCRVqTJfEZD33IvHcTYFI3M00UdYzn9mdAeCuqOvR/c= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580/go.mod h1:vD37dDNNfeVci/vJpicD1A4vhF9HcdQVB1kNGKu0rQ4= github.com/trustbloc/json-gold v0.5.1 h1:0HHf0ildMnN4rUr7Rgxwnm1CO116JoGMrgoWIFngM1U= github.com/trustbloc/json-gold v0.5.1/go.mod h1:RVhE35veDX19r5gfUAR+IYHkAUuPwJO8Ie/qVeFaIzw= github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88 h1:k3KNf9tE4TBVdpEtImmZIbUWFZRoL/96GPR7FSqCr9k= github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88/go.mod h1:OKOtsLbE6W5s4mpjWkvk8XEqcmt9vTgVmDNkHELpWO0= github.com/trustbloc/sidetree-go v1.1.0 h1:ZNCtYTut5MHVXJR26FvOPSo8uCGDR0YTNeA155s/QIo= github.com/trustbloc/sidetree-go v1.1.0/go.mod h1:IQ1iX/gLe/YL+M6kzenc5Oi14uzaYqfL7KgMyNuSGvI= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc h1:hw0PseUDqXeXTJV/yeHYBteiU3f8BMMGVE9GfozygZw= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc/go.mod h1:3/GbrzF7phN+SxBTZaUBS6VxnoxpXGBUjjk3Eg4ImUk= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 h1:+A9r9mKaofDng9dVPu4SV896o6as6Ux9M0PQkRW8EHQ= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382/go.mod h1:bBE54VGTHhLpFW4guWqxsnz2gmCDq1QkTeIRHc2olO4= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd h1:QhdCHSW1/oosJbzBTEYLU6xcKxXbQzzqFnhCtW2UWbA= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd/go.mod h1:D1wnviyjdmcF8AO5Y9kVGU6OGuvXUMGiE0Auo/fYRYo= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= diff --git a/go.mod b/go.mod index 3ad2b028..fc364421 100644 --- a/go.mod +++ b/go.mod @@ -15,10 +15,10 @@ require ( github.com/piprate/json-gold v0.5.1-0.20230111113000-6ddbe6e6f19f github.com/stretchr/testify v1.8.3 github.com/trustbloc/bbs-signature-go v1.0.2 - github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 + github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88 github.com/trustbloc/sidetree-go v1.1.0 - github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc + github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 golang.org/x/oauth2 v0.13.0 ) diff --git a/go.sum b/go.sum index 23b3c4e4..de210cdf 100644 --- a/go.sum +++ b/go.sum @@ -144,16 +144,16 @@ github.com/tidwall/sjson v1.1.4 h1:bTSsPLdAYF5QNLSwYsKfBKKTnlGbIuhqL3CpRsjzGhg= github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= github.com/trustbloc/bbs-signature-go v1.0.2 h1:gepEsbLiZHv/vva9FKG5gF38mGtOIyGez7desZxiI1o= github.com/trustbloc/bbs-signature-go v1.0.2/go.mod h1:xYotcXHAbcE0TO+SteW0J6XI3geQaXq4wdnXR2k+XCU= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 h1:z9x5gLgDeUtcPUS8uQgHD/KQ/PL5VK2QV9oENYjsWbU= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396/go.mod h1:L5m4TVlPwe7VN5FRrANPMg6EJN8wIlthC8CvossDZVI= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 h1:ZCRVqTJfEZD33IvHcTYFI3M00UdYzn9mdAeCuqOvR/c= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580/go.mod h1:vD37dDNNfeVci/vJpicD1A4vhF9HcdQVB1kNGKu0rQ4= github.com/trustbloc/json-gold v0.5.1 h1:0HHf0ildMnN4rUr7Rgxwnm1CO116JoGMrgoWIFngM1U= github.com/trustbloc/json-gold v0.5.1/go.mod h1:RVhE35veDX19r5gfUAR+IYHkAUuPwJO8Ie/qVeFaIzw= github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88 h1:k3KNf9tE4TBVdpEtImmZIbUWFZRoL/96GPR7FSqCr9k= github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88/go.mod h1:OKOtsLbE6W5s4mpjWkvk8XEqcmt9vTgVmDNkHELpWO0= github.com/trustbloc/sidetree-go v1.1.0 h1:ZNCtYTut5MHVXJR26FvOPSo8uCGDR0YTNeA155s/QIo= github.com/trustbloc/sidetree-go v1.1.0/go.mod h1:IQ1iX/gLe/YL+M6kzenc5Oi14uzaYqfL7KgMyNuSGvI= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc h1:hw0PseUDqXeXTJV/yeHYBteiU3f8BMMGVE9GfozygZw= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc/go.mod h1:3/GbrzF7phN+SxBTZaUBS6VxnoxpXGBUjjk3Eg4ImUk= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 h1:+A9r9mKaofDng9dVPu4SV896o6as6Ux9M0PQkRW8EHQ= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382/go.mod h1:bBE54VGTHhLpFW4guWqxsnz2gmCDq1QkTeIRHc2olO4= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd h1:QhdCHSW1/oosJbzBTEYLU6xcKxXbQzzqFnhCtW2UWbA= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd/go.mod h1:D1wnviyjdmcF8AO5Y9kVGU6OGuvXUMGiE0Auo/fYRYo= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= diff --git a/pkg/openid4vp/openid4vp.go b/pkg/openid4vp/openid4vp.go index 1506a2e3..3f6d09b0 100644 --- a/pkg/openid4vp/openid4vp.go +++ b/pkg/openid4vp/openid4vp.go @@ -29,17 +29,19 @@ import ( "github.com/trustbloc/kms-go/spi/kms" wrapperapi "github.com/trustbloc/kms-go/wrapper/api" "github.com/trustbloc/vc-go/dataintegrity" + "github.com/trustbloc/vc-go/dataintegrity/suite" "github.com/trustbloc/vc-go/dataintegrity/suite/ecdsa2019" + "github.com/trustbloc/vc-go/dataintegrity/suite/eddsa2022" "github.com/trustbloc/vc-go/jwt" "github.com/trustbloc/vc-go/presexch" "github.com/trustbloc/vc-go/proof/defaults" "github.com/trustbloc/vc-go/verifiable" - "github.com/trustbloc/wallet-sdk/pkg/ldproof" "github.com/trustbloc/wallet-sdk/pkg/api" "github.com/trustbloc/wallet-sdk/pkg/common" "github.com/trustbloc/wallet-sdk/pkg/did/wellknown" "github.com/trustbloc/wallet-sdk/pkg/internal/httprequest" + "github.com/trustbloc/wallet-sdk/pkg/ldproof" "github.com/trustbloc/wallet-sdk/pkg/models" "github.com/trustbloc/wallet-sdk/pkg/walleterror" ) @@ -527,10 +529,7 @@ func createAuthorizedResponseOneCred( //nolint:funlen,gocyclo // Unable to decom vpFormat := presexch.FormatJWTVP if vpFormats := requestObject.ClientMetadata.VPFormats; vpFormats != nil { - switch { - case vpFormats.JwtVP != nil: - break - case vpFormats.LdpVP != nil: + if vpFormats.LdpVP != nil { vpFormat = presexch.FormatLDPVP } } @@ -564,32 +563,20 @@ func createAuthorizedResponseOneCred( //nolint:funlen,gocyclo // Unable to decom return nil, err } - if opts != nil && opts.signer != nil { - err = addDataIntegrityProof( - fullVMID(did, signingVM.ID), - didResolver, - documentLoader, - opts.signer, - presentation, - ) - if err != nil { - return nil, fmt.Errorf("failed to add data integrity proof to VP: %w", err) - } - } - jwtSigner, err := getHolderSigner(signingVM, crypto) if err != nil { return nil, err } presentationSubmission := presentation.CustomFields["presentation_submission"] - presentation.CustomFields["presentation_submission"] = nil - presentationSubmissionBytes, err := json.Marshal(presentationSubmission) if err != nil { return nil, fmt.Errorf("marshal presentation submission: %w", err) } + presentation.CustomFields = nil + presentation.ID = "urn:uuid:" + presentation.ID //TODO: Resolve this properly in the vc-go + var vpToken string switch vpFormat { @@ -610,9 +597,51 @@ func createAuthorizedResponseOneCred( //nolint:funlen,gocyclo // Unable to decom return nil, fmt.Errorf("sign vp token: %w", err) } case presexch.FormatLDPVP: - vpToken, err = createLdpVPToken(crypto, documentLoader, signingVM, requestObject, presentation) - if err != nil { - return nil, fmt.Errorf("create ldp vp token: %w", err) + var proofAdded bool + + vpFormats := requestObject.ClientMetadata.VPFormats + + if vpFormats != nil && vpFormats.LdpVP != nil { + for _, proofType := range vpFormats.LdpVP.ProofType { + if proofType == ecdsa2019.SuiteTypeNew || proofType == eddsa2022.SuiteType { + if opts == nil || opts.signer == nil { + return nil, errors.New("signer is required for ldp_vp data integrity proof") + } + + err = addDataIntegrityProof( + fullVMID(did, signingVM.ID), + didResolver, + documentLoader, + opts.signer, + presentation, + proofType, + requestObject.Nonce, + requestObject.ClientID, + ) + if err != nil { + return nil, fmt.Errorf("failed to add data integrity proof to vp: %w", err) + } + + proofAdded = true + break + } + } + } + + if !proofAdded { + vpToken, err = createLdpVPToken(crypto, documentLoader, signingVM, requestObject, presentation) + if err != nil { + return nil, fmt.Errorf("create ldp vp token: %w", err) + } + } else { + var vpBytes []byte + + vpBytes, err = presentation.MarshalJSON() + if err != nil { + return nil, fmt.Errorf("marshal vp into vp token: %w", err) + } + + vpToken = string(vpBytes) } default: return nil, fmt.Errorf("unsupported presentation exchange format: %s", vpFormat) @@ -709,6 +738,9 @@ func createAuthorizedResponseMultiCred( //nolint:funlen,gocyclo // Unable to dec documentLoader, signer, presentation, + ecdsa2019.SuiteTypeNew, + requestObject.Nonce, + requestObject.ClientID, ) if e != nil { return nil, fmt.Errorf("failed to add data integrity proof to VP: %w", e) @@ -800,23 +832,48 @@ func createAuthorizedResponseMultiCred( //nolint:funlen,gocyclo // Unable to dec func addDataIntegrityProof(did string, didResolver api.DIDResolver, documentLoader ld.DocumentLoader, signer wrapperapi.KMSCryptoSigner, presentation *verifiable.Presentation, + dataIntegritySuite, challenge, domain string, ) error { - proofContext := &verifiable.DataIntegrityProofContext{ - SigningKeyID: did, - CryptoSuite: ecdsa2019.SuiteType, + var signerInitializer suite.SignerInitializer + + switch dataIntegritySuite { + case ecdsa2019.SuiteTypeNew: + signerInitializer = ecdsa2019.NewSignerInitializer( + &ecdsa2019.SignerInitializerOptions{ + LDDocumentLoader: documentLoader, + SignerGetter: ecdsa2019.WithKMSCryptoWrapper(signer), + }, + ) + case eddsa2022.SuiteType: + signerInitializer = eddsa2022.NewSignerInitializer( + &eddsa2022.SignerInitializerOptions{ + LDDocumentLoader: documentLoader, + SignerGetter: eddsa2022.WithKMSCryptoWrapper(signer), + }, + ) + default: + return fmt.Errorf("unsupported data integrity suite: %s", dataIntegritySuite) } - signerOpts := dataintegrity.Options{DIDResolver: &didResolverWrapper{didResolver: didResolver}} - - dataIntegritySigner, err := dataintegrity.NewSigner(&signerOpts, - ecdsa2019.NewSignerInitializer(&ecdsa2019.SignerInitializerOptions{ - LDDocumentLoader: documentLoader, - SignerGetter: ecdsa2019.WithKMSCryptoWrapper(signer), - })) + dataIntegritySigner, err := dataintegrity.NewSigner( + &dataintegrity.Options{ + DIDResolver: &didResolverWrapper{ + didResolver: didResolver, + }, + }, + signerInitializer) if err != nil { return err } + proofContext := &verifiable.DataIntegrityProofContext{ + SigningKeyID: did, + CryptoSuite: dataIntegritySuite, + ProofPurpose: "authentication", + Challenge: challenge, + Domain: domain, + } + err = presentation.AddDataIntegrityProof(proofContext, dataIntegritySigner) if err != nil { return err diff --git a/pkg/openid4vp/openid4vp_test.go b/pkg/openid4vp/openid4vp_test.go index 1aec67cb..db3413e5 100644 --- a/pkg/openid4vp/openid4vp_test.go +++ b/pkg/openid4vp/openid4vp_test.go @@ -483,7 +483,7 @@ func TestOpenID4VP_PresentCredential(t *testing.T) { require.NoError(t, err) }) - t.Run("Success - with ldp_vp", func(t *testing.T) { + t.Run("Success - with ldp_vp, single cred", func(t *testing.T) { mockHTTPClient := &mock.HTTPClientMock{ StatusCode: 200, } @@ -736,6 +736,14 @@ func TestOpenID4VP_PresentCredential(t *testing.T) { }) t.Run("fail to add data integrity proof", func(t *testing.T) { + reqObject := &requestObject{ + Nonce: "test123456", + State: "test34566", + PresentationDefinition: mockPresentationDefinition, + ResponseType: "vp_token id_token", + ClientMetadata: clientMetadata{VPFormats: &presexch.Format{LdpVP: &presexch.LdpType{}}}, + } + t.Run("single credential", func(t *testing.T) { localKMS, err := localkms.NewLocalKMS(localkms.Config{ Storage: localkms.NewMemKMSStore(), @@ -747,15 +755,14 @@ func TestOpenID4VP_PresentCredential(t *testing.T) { _, err = createAuthorizedResponse( singleCred, - mockRequestObject, + reqObject, CustomClaims{}, &didResolverMock{ResolveValue: mockDoc}, &cryptoMock{}, lddl, &presentOpts{signer: signer}, ) - require.Contains(t, err.Error(), - "failed to add data integrity proof to VP: data integrity proof generation error") + require.ErrorContains(t, err, "no supported linked data proof found") }) t.Run("multiple credentials", func(t *testing.T) { localKMS, err := localkms.NewLocalKMS(localkms.Config{ @@ -768,15 +775,14 @@ func TestOpenID4VP_PresentCredential(t *testing.T) { _, err = createAuthorizedResponse( credentials, - mockRequestObject, + reqObject, CustomClaims{}, &didResolverMock{ResolveValue: mockDoc}, &cryptoMock{}, lddl, &presentOpts{signer: signer}, ) - require.Contains(t, err.Error(), - "failed to add data integrity proof to VP: data integrity proof generation error") + require.ErrorContains(t, err, "failed to add data integrity proof to VP") }) }) diff --git a/test/integration/attestation/go.mod b/test/integration/attestation/go.mod index d2c58455..b118b8db 100644 --- a/test/integration/attestation/go.mod +++ b/test/integration/attestation/go.mod @@ -12,9 +12,9 @@ require ( github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/trustbloc/cmdutil-go v1.0.0 - github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 + github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88 - github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc + github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 github.com/trustbloc/wallet-sdk v0.0.0-00010101000000-000000000000 ) diff --git a/test/integration/attestation/go.sum b/test/integration/attestation/go.sum index acedf44b..db3f2248 100644 --- a/test/integration/attestation/go.sum +++ b/test/integration/attestation/go.sum @@ -147,16 +147,16 @@ github.com/trustbloc/bbs-signature-go v1.0.2 h1:gepEsbLiZHv/vva9FKG5gF38mGtOIyGe github.com/trustbloc/bbs-signature-go v1.0.2/go.mod h1:xYotcXHAbcE0TO+SteW0J6XI3geQaXq4wdnXR2k+XCU= github.com/trustbloc/cmdutil-go v1.0.0 h1:QCe7wVEIASWmy9ZDD0l0tsQCEsX6fx+kBFX5UqCVRdk= github.com/trustbloc/cmdutil-go v1.0.0/go.mod h1:o/v7C1z6d/5UrjaC6GAUc1hk0XVuE3M4tpyvsMMUw5k= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 h1:z9x5gLgDeUtcPUS8uQgHD/KQ/PL5VK2QV9oENYjsWbU= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396/go.mod h1:L5m4TVlPwe7VN5FRrANPMg6EJN8wIlthC8CvossDZVI= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 h1:ZCRVqTJfEZD33IvHcTYFI3M00UdYzn9mdAeCuqOvR/c= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580/go.mod h1:vD37dDNNfeVci/vJpicD1A4vhF9HcdQVB1kNGKu0rQ4= github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88 h1:k3KNf9tE4TBVdpEtImmZIbUWFZRoL/96GPR7FSqCr9k= github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88/go.mod h1:OKOtsLbE6W5s4mpjWkvk8XEqcmt9vTgVmDNkHELpWO0= github.com/trustbloc/logutil-go v0.0.0-20221124174025-c46110e3ea42 h1:Mzg9wvEoUIWPoI/GHz3YlVbd4nKWeSPGc6+3l95eOZU= github.com/trustbloc/logutil-go v0.0.0-20221124174025-c46110e3ea42/go.mod h1:HRaXVV1caceumbDBwLO3ByiCcAc18KwrNvZ7JQBvDIQ= github.com/trustbloc/sidetree-go v1.1.0 h1:ZNCtYTut5MHVXJR26FvOPSo8uCGDR0YTNeA155s/QIo= github.com/trustbloc/sidetree-go v1.1.0/go.mod h1:IQ1iX/gLe/YL+M6kzenc5Oi14uzaYqfL7KgMyNuSGvI= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc h1:hw0PseUDqXeXTJV/yeHYBteiU3f8BMMGVE9GfozygZw= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc/go.mod h1:3/GbrzF7phN+SxBTZaUBS6VxnoxpXGBUjjk3Eg4ImUk= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 h1:+A9r9mKaofDng9dVPu4SV896o6as6Ux9M0PQkRW8EHQ= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382/go.mod h1:bBE54VGTHhLpFW4guWqxsnz2gmCDq1QkTeIRHc2olO4= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd h1:QhdCHSW1/oosJbzBTEYLU6xcKxXbQzzqFnhCtW2UWbA= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd/go.mod h1:D1wnviyjdmcF8AO5Y9kVGU6OGuvXUMGiE0Auo/fYRYo= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= diff --git a/test/integration/go.mod b/test/integration/go.mod index 3bdb8bfe..786d124b 100644 --- a/test/integration/go.mod +++ b/test/integration/go.mod @@ -12,9 +12,9 @@ require ( github.com/piprate/json-gold v0.5.1-0.20230111113000-6ddbe6e6f19f github.com/stretchr/testify v1.8.3 github.com/trustbloc/cmdutil-go v0.0.0-20221125151303-09d42adcc811 - github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 + github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 github.com/trustbloc/logutil-go v1.0.0-rc1 - github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc + github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 github.com/trustbloc/wallet-sdk v0.0.0-00010101000000-000000000000 github.com/trustbloc/wallet-sdk/cmd/wallet-sdk-gomobile v0.0.0-00010101000000-000000000000 go.uber.org/zap v1.23.0 diff --git a/test/integration/go.sum b/test/integration/go.sum index 7654ce1c..c7ecc3ea 100644 --- a/test/integration/go.sum +++ b/test/integration/go.sum @@ -155,8 +155,8 @@ github.com/trustbloc/bbs-signature-go v1.0.2 h1:gepEsbLiZHv/vva9FKG5gF38mGtOIyGe github.com/trustbloc/bbs-signature-go v1.0.2/go.mod h1:xYotcXHAbcE0TO+SteW0J6XI3geQaXq4wdnXR2k+XCU= github.com/trustbloc/cmdutil-go v0.0.0-20221125151303-09d42adcc811 h1:0e1d1w9o662+e7ZnJvRYJH8yblcBXngme8qbsjTvhQc= github.com/trustbloc/cmdutil-go v0.0.0-20221125151303-09d42adcc811/go.mod h1:o/v7C1z6d/5UrjaC6GAUc1hk0XVuE3M4tpyvsMMUw5k= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 h1:z9x5gLgDeUtcPUS8uQgHD/KQ/PL5VK2QV9oENYjsWbU= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396/go.mod h1:L5m4TVlPwe7VN5FRrANPMg6EJN8wIlthC8CvossDZVI= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 h1:ZCRVqTJfEZD33IvHcTYFI3M00UdYzn9mdAeCuqOvR/c= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580/go.mod h1:vD37dDNNfeVci/vJpicD1A4vhF9HcdQVB1kNGKu0rQ4= github.com/trustbloc/json-gold v0.5.1 h1:0HHf0ildMnN4rUr7Rgxwnm1CO116JoGMrgoWIFngM1U= github.com/trustbloc/json-gold v0.5.1/go.mod h1:RVhE35veDX19r5gfUAR+IYHkAUuPwJO8Ie/qVeFaIzw= github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88 h1:k3KNf9tE4TBVdpEtImmZIbUWFZRoL/96GPR7FSqCr9k= @@ -165,8 +165,8 @@ github.com/trustbloc/logutil-go v1.0.0-rc1 h1:rRJbvgQfrlUfyej+mY0nuQJymGqjRW4oZE github.com/trustbloc/logutil-go v1.0.0-rc1/go.mod h1:JlxT0oZfNKgIlSNtgc001WEeDMxlnAvOM43gNm8DQVc= github.com/trustbloc/sidetree-go v1.1.0 h1:ZNCtYTut5MHVXJR26FvOPSo8uCGDR0YTNeA155s/QIo= github.com/trustbloc/sidetree-go v1.1.0/go.mod h1:IQ1iX/gLe/YL+M6kzenc5Oi14uzaYqfL7KgMyNuSGvI= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc h1:hw0PseUDqXeXTJV/yeHYBteiU3f8BMMGVE9GfozygZw= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc/go.mod h1:3/GbrzF7phN+SxBTZaUBS6VxnoxpXGBUjjk3Eg4ImUk= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 h1:+A9r9mKaofDng9dVPu4SV896o6as6Ux9M0PQkRW8EHQ= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382/go.mod h1:bBE54VGTHhLpFW4guWqxsnz2gmCDq1QkTeIRHc2olO4= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd h1:QhdCHSW1/oosJbzBTEYLU6xcKxXbQzzqFnhCtW2UWbA= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd/go.mod h1:D1wnviyjdmcF8AO5Y9kVGU6OGuvXUMGiE0Auo/fYRYo= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= diff --git a/test/integration/pkg/helpers/openid4ci.go b/test/integration/pkg/helpers/openid4ci.go index 44080cfd..a0b5529e 100644 --- a/test/integration/pkg/helpers/openid4ci.go +++ b/test/integration/pkg/helpers/openid4ci.go @@ -49,7 +49,6 @@ func NewCITestHelper(t *testing.T, didMethod string, keyType string) *CITestHelp switch didMethod { case "key": - didDoc, err = didkey.Create(jwk) require.NoError(t, err) case "jwk": diff --git a/test/integration/trustregistry/go.mod b/test/integration/trustregistry/go.mod index aaba389f..70914fe4 100644 --- a/test/integration/trustregistry/go.mod +++ b/test/integration/trustregistry/go.mod @@ -47,9 +47,9 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.1.4 // indirect github.com/trustbloc/bbs-signature-go v1.0.2 // indirect - github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 // indirect + github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 // indirect github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88 // indirect - github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc // indirect + github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 // indirect github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect diff --git a/test/integration/trustregistry/go.sum b/test/integration/trustregistry/go.sum index 0850afa4..12c3099d 100644 --- a/test/integration/trustregistry/go.sum +++ b/test/integration/trustregistry/go.sum @@ -122,12 +122,12 @@ github.com/tidwall/sjson v1.1.4 h1:bTSsPLdAYF5QNLSwYsKfBKKTnlGbIuhqL3CpRsjzGhg= github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= github.com/trustbloc/bbs-signature-go v1.0.2 h1:gepEsbLiZHv/vva9FKG5gF38mGtOIyGez7desZxiI1o= github.com/trustbloc/bbs-signature-go v1.0.2/go.mod h1:xYotcXHAbcE0TO+SteW0J6XI3geQaXq4wdnXR2k+XCU= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396 h1:z9x5gLgDeUtcPUS8uQgHD/KQ/PL5VK2QV9oENYjsWbU= -github.com/trustbloc/did-go v1.3.1-0.20241021165331-5721a3ff7396/go.mod h1:L5m4TVlPwe7VN5FRrANPMg6EJN8wIlthC8CvossDZVI= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580 h1:ZCRVqTJfEZD33IvHcTYFI3M00UdYzn9mdAeCuqOvR/c= +github.com/trustbloc/did-go v1.3.1-0.20241122115441-c010226da580/go.mod h1:vD37dDNNfeVci/vJpicD1A4vhF9HcdQVB1kNGKu0rQ4= github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88 h1:k3KNf9tE4TBVdpEtImmZIbUWFZRoL/96GPR7FSqCr9k= github.com/trustbloc/kms-go v1.1.3-0.20241001141623-8d9510c6bb88/go.mod h1:OKOtsLbE6W5s4mpjWkvk8XEqcmt9vTgVmDNkHELpWO0= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc h1:hw0PseUDqXeXTJV/yeHYBteiU3f8BMMGVE9GfozygZw= -github.com/trustbloc/vc-go v1.2.1-0.20241119140508-59af0e10bdcc/go.mod h1:3/GbrzF7phN+SxBTZaUBS6VxnoxpXGBUjjk3Eg4ImUk= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382 h1:+A9r9mKaofDng9dVPu4SV896o6as6Ux9M0PQkRW8EHQ= +github.com/trustbloc/vc-go v1.2.1-0.20241125142751-c33f1ff65382/go.mod h1:bBE54VGTHhLpFW4guWqxsnz2gmCDq1QkTeIRHc2olO4= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd h1:QhdCHSW1/oosJbzBTEYLU6xcKxXbQzzqFnhCtW2UWbA= github.com/veraison/go-cose v1.1.1-0.20240126165338-2300d5c96dbd/go.mod h1:D1wnviyjdmcF8AO5Y9kVGU6OGuvXUMGiE0Auo/fYRYo= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=