Skip to content

Commit 2ca49bb

Browse files
committed
Use SerializedIdemixIdentity proto def from idemix
Use the `SerializedIdemixIdentity` proto definition from the idemix repo and not from fabric, whence idemix has been removed. Signed-off-by: Alessandro Sorniotti <[email protected]> Signed-off-by: Angelo De Caro <[email protected]>
1 parent d4c67f2 commit 2ca49bb

File tree

6 files changed

+22
-16
lines changed

6 files changed

+22
-16
lines changed

go.mod

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module github.com/hyperledger-labs/fabric-token-sdk
33
go 1.21
44

55
require (
6-
github.com/IBM/idemix v0.0.2-0.20231107110441-534ea4193b8f
7-
github.com/IBM/idemix/bccsp/types v0.0.0-20231107110234-4cf31dd43660
6+
github.com/IBM/idemix v0.0.2-0.20240613141508-82a5e092849a
7+
github.com/IBM/idemix/bccsp/types v0.0.0-20240613141508-82a5e092849a
88
github.com/IBM/mathlib v0.0.3-0.20231011094432-44ee0eb539da
99
github.com/dgraph-io/badger/v3 v3.2103.2
1010
github.com/hashicorp/go-uuid v1.0.2
@@ -48,6 +48,7 @@ replace github.com/hyperledger-labs/fabric-token-sdk/txgen => ./cmd/txgen
4848

4949
require (
5050
github.com/ale-linux/aries-framework-go/component/kmscrypto v0.0.0-20231023164747-f3f972769504 // indirect
51+
github.com/hyperledger/aries-bbs-go v0.0.0-20240528084656-761671ea73bc // indirect
5152
github.com/jackc/pgpassfile v1.0.0 // indirect
5253
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
5354
github.com/jackc/puddle/v2 v2.2.1 // indirect
@@ -58,8 +59,8 @@ require (
5859
dario.cat/mergo v1.0.0 // indirect
5960
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
6061
github.com/BurntSushi/toml v1.2.1 // indirect
61-
github.com/IBM/idemix/bccsp/schemes/aries v0.0.0-20231107110234-4cf31dd43660 // indirect
62-
github.com/IBM/idemix/bccsp/schemes/weak-bb v0.0.0-20231107110234-4cf31dd43660 // indirect
62+
github.com/IBM/idemix/bccsp/schemes/aries v0.0.0-20240613141508-82a5e092849a // indirect
63+
github.com/IBM/idemix/bccsp/schemes/weak-bb v0.0.0-20240613141508-82a5e092849a // indirect
6364
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
6465
github.com/Microsoft/go-winio v0.6.1 // indirect
6566
github.com/Microsoft/hcsshim v0.11.4 // indirect

go.sum

+10-8
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
3030
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
3131
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
3232
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
33-
github.com/IBM/idemix v0.0.2-0.20231107110441-534ea4193b8f h1:SFWg5b/I49LcVurx/v7MFwQ4t/0wTX6TlPzxhEYEr3U=
34-
github.com/IBM/idemix v0.0.2-0.20231107110441-534ea4193b8f/go.mod h1:nOEyL+adzVsbzAKiDV3/Qcn703tN6cdgGmVyXIfEhWg=
35-
github.com/IBM/idemix/bccsp/schemes/aries v0.0.0-20231107110234-4cf31dd43660 h1:Np3oYfF4a6SNtiPJCP8AQ5QDpajkT8UfWTkdlh3DfPQ=
36-
github.com/IBM/idemix/bccsp/schemes/aries v0.0.0-20231107110234-4cf31dd43660/go.mod h1:hO4IoGeT6yuwCduXpnvV4fskpjJi28ipZChV861S96E=
37-
github.com/IBM/idemix/bccsp/schemes/weak-bb v0.0.0-20231107110234-4cf31dd43660 h1:rdnFfRbHThWOzGcS7vR/iH67Pa9DeevsuOCHoE7dOi4=
38-
github.com/IBM/idemix/bccsp/schemes/weak-bb v0.0.0-20231107110234-4cf31dd43660/go.mod h1:FC0vVgNI6bv8GH0VTwjup+arwJ8Tau1iEhroWZ1oPwU=
39-
github.com/IBM/idemix/bccsp/types v0.0.0-20231107110234-4cf31dd43660 h1:WFXPDH/S08C+/2gsV9982+Sc2FZX8ZLEpXbOS4u/pfY=
40-
github.com/IBM/idemix/bccsp/types v0.0.0-20231107110234-4cf31dd43660/go.mod h1:IMIJ8WcUpBmV4gcOO/BYKuFYpdXCPYZjpNhFSUlO9b8=
33+
github.com/IBM/idemix v0.0.2-0.20240613141508-82a5e092849a h1:N2YIhHUNHABHfoOA5cVV00xaL09Pc8Ikji/6GEJsr6I=
34+
github.com/IBM/idemix v0.0.2-0.20240613141508-82a5e092849a/go.mod h1:46iNIkGm/8hQBo8ziI4oxiVW3WQkkxIqEbq+VbJviR8=
35+
github.com/IBM/idemix/bccsp/schemes/aries v0.0.0-20240613141508-82a5e092849a h1:c3E1cDamIZdj9zLNGyDbCOue1W6HNFEgKna5Y4l7bY4=
36+
github.com/IBM/idemix/bccsp/schemes/aries v0.0.0-20240613141508-82a5e092849a/go.mod h1:ldQeOz5oa0iJicd2FFEd2jToS9XNncKSvFnUVNjTjRk=
37+
github.com/IBM/idemix/bccsp/schemes/weak-bb v0.0.0-20240613141508-82a5e092849a h1:JLtm1020NbMrtRPZRDS5vPn4eBIJvWLAPEnYgcjC0vk=
38+
github.com/IBM/idemix/bccsp/schemes/weak-bb v0.0.0-20240613141508-82a5e092849a/go.mod h1:FC0vVgNI6bv8GH0VTwjup+arwJ8Tau1iEhroWZ1oPwU=
39+
github.com/IBM/idemix/bccsp/types v0.0.0-20240613141508-82a5e092849a h1:96D1gepUlk1oTWWMOeGw5EfJnBqT9ZhpdGNos1I9QMs=
40+
github.com/IBM/idemix/bccsp/types v0.0.0-20240613141508-82a5e092849a/go.mod h1:IMIJ8WcUpBmV4gcOO/BYKuFYpdXCPYZjpNhFSUlO9b8=
4141
github.com/IBM/mathlib v0.0.3-0.20231011094432-44ee0eb539da h1:qqGozq4tF6EOVnWoTgBoJGudRKKZXSAYnEtDggzTnsw=
4242
github.com/IBM/mathlib v0.0.3-0.20231011094432-44ee0eb539da/go.mod h1:Tco9QzE3fQzjMS7nPbHDeFfydAzctStf1Pa8hsh6Hjs=
4343
github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
@@ -473,6 +473,8 @@ github.com/hyperledger-labs/orion-sdk-go v0.2.10 h1:lFgWgxyvngIhWnIqymYGBmtmq9D6
473473
github.com/hyperledger-labs/orion-sdk-go v0.2.10/go.mod h1:iN2xZB964AqwVJwL+EnwPOs8z1EkMEbbIg/qYeC7gDY=
474474
github.com/hyperledger-labs/orion-server v0.2.10 h1:G4zbQEL5Egk0Oj+TwHCZWdTOLDBHOjaAEvYOT4G7ozw=
475475
github.com/hyperledger-labs/orion-server v0.2.10/go.mod h1:PfuEZFOxbR1o1TjdqL7gQXWD3B0WFET58u9p40rGN+Q=
476+
github.com/hyperledger/aries-bbs-go v0.0.0-20240528084656-761671ea73bc h1:3Ykk6MtyfnlzMOQry9zkxsoLWpCWZwDPqehO/BJwArM=
477+
github.com/hyperledger/aries-bbs-go v0.0.0-20240528084656-761671ea73bc/go.mod h1:Kofn6A6WWea1ZM8Rys5aBW9dszwJ7Ywa0kyyYL0TPYw=
476478
github.com/hyperledger/fabric v1.4.0-rc1.0.20230405174026-695dd57e01c2 h1:w5BGxCYEsc9vjdDEdZGrZ5redvs263RYsdT2tqF7cNk=
477479
github.com/hyperledger/fabric v1.4.0-rc1.0.20230405174026-695dd57e01c2/go.mod h1:LSwfuRgX/5C2uHkdT3hJtBFu/ALxuL7dFj1pmBby2R4=
478480
github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2 h1:B1Nt8hKb//KvgGRprk0h1t4lCnwhE9/ryb1WqfZbV+M=

token/services/identity/msp/idemix/msp/audit.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"encoding/json"
1111

1212
csp "github.com/IBM/idemix/bccsp/types"
13+
im "github.com/IBM/idemix/idemixmsp"
1314
"github.com/hyperledger-labs/fabric-smart-client/pkg/utils/proto"
1415
m "github.com/hyperledger/fabric-protos-go/msp"
1516
"github.com/pkg/errors"
@@ -46,7 +47,7 @@ func (a *AuditInfo) Match(id []byte) error {
4647
return errors.Wrap(err, "failed to unmarshal to msp.SerializedIdentity{}")
4748
}
4849

49-
serialized := new(m.SerializedIdemixIdentity)
50+
serialized := new(im.SerializedIdemixIdentity)
5051
err = proto.Unmarshal(si.IdBytes, serialized)
5152
if err != nil {
5253
return errors.Wrap(err, "could not deserialize a SerializedIdemixIdentity")

token/services/identity/msp/idemix/msp/deserializer.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package msp
88

99
import (
1010
bccsp "github.com/IBM/idemix/bccsp/types"
11+
im "github.com/IBM/idemix/idemixmsp"
1112
"github.com/hyperledger-labs/fabric-smart-client/pkg/utils/proto"
1213
m "github.com/hyperledger/fabric-protos-go/msp"
1314
"github.com/pkg/errors"
@@ -44,7 +45,7 @@ func (c *Deserializer) DeserializeAgainstNymEID(raw []byte, checkValidity bool,
4445
return nil, errors.Wrap(err, "failed to unmarshal to msp.SerializedIdentity{}")
4546
}
4647

47-
serialized := new(m.SerializedIdemixIdentity)
48+
serialized := new(im.SerializedIdemixIdentity)
4849
err = proto.Unmarshal(si.IdBytes, serialized)
4950
if err != nil {
5051
return nil, errors.Wrap(err, "could not deserialize a SerializedIdemixIdentity")

token/services/identity/msp/idemix/msp/id.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"time"
1212

1313
bccsp "github.com/IBM/idemix/bccsp/types"
14+
im "github.com/IBM/idemix/idemixmsp"
1415
"github.com/hyperledger-labs/fabric-smart-client/pkg/utils/proto"
1516
"github.com/hyperledger-labs/fabric-token-sdk/token/services/logging"
1617
m "github.com/hyperledger/fabric-protos-go/msp"
@@ -115,7 +116,7 @@ func (id *Identity) SatisfiesPrincipal(principal *m.MSPPrincipal) error {
115116
}
116117

117118
func (id *Identity) Serialize() ([]byte, error) {
118-
serialized := &m.SerializedIdemixIdentity{}
119+
serialized := &im.SerializedIdemixIdentity{}
119120

120121
raw, err := id.NymPublicKey.Bytes()
121122
if err != nil {

token/services/identity/msp/idemix/provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func (p *Provider) DeserializeSigningIdentity(raw []byte) (driver.SigningIdentit
375375
return nil, errors.Wrap(err, "failed to unmarshal to msp.SerializedIdentity{}")
376376
}
377377

378-
serialized := new(m.SerializedIdemixIdentity)
378+
serialized := new(idemixmsp.SerializedIdemixIdentity)
379379
err = proto.Unmarshal(si.IdBytes, serialized)
380380
if err != nil {
381381
return nil, errors.Wrap(err, "could not deserialize a SerializedIdemixIdentity")

0 commit comments

Comments
 (0)