diff --git a/api/serverresponses.go b/api/serverresponses.go index 4f33c12fc..c685b4c95 100644 --- a/api/serverresponses.go +++ b/api/serverresponses.go @@ -20,7 +20,7 @@ type CAInfoResponseNet struct { // Base64 encoding of Idemix issuer public key IssuerPublicKey string // Base64 encoding of PEM-encoded Idemix issuer revocation public key - IssuerRevocationPublicKey string + RevocationPublicKey string // Version of the server Version string } diff --git a/cmd/fabric-ca-client/command/enroll.go b/cmd/fabric-ca-client/command/enroll.go index 5d62bc95a..4cb189c6b 100644 --- a/cmd/fabric-ca-client/command/enroll.go +++ b/cmd/fabric-ca-client/command/enroll.go @@ -88,5 +88,5 @@ func (c *enrollCmd) runEnroll(cmd *cobra.Command, args []string) error { if err != nil { return err } - return storeIssuerRevocationPublicKey(cfg, &resp.CAInfo) + return storeRevocationPublicKey(cfg, &resp.CAInfo) } diff --git a/cmd/fabric-ca-client/command/getcainfo.go b/cmd/fabric-ca-client/command/getcainfo.go index b362f59e6..8f7b80f78 100644 --- a/cmd/fabric-ca-client/command/getcainfo.go +++ b/cmd/fabric-ca-client/command/getcainfo.go @@ -102,7 +102,7 @@ func (c *getCAInfoCmd) runGetCACert(cmd *cobra.Command, args []string) error { if err != nil { return err } - return storeIssuerRevocationPublicKey(client.Config, si) + return storeRevocationPublicKey(client.Config, si) } // Store the CAChain in the CACerts folder of MSP (Membership Service Provider) @@ -200,9 +200,9 @@ func storeIssuerPublicKey(config *lib.ClientConfig, si *lib.GetCAInfoResponse) e return nil } -func storeIssuerRevocationPublicKey(config *lib.ClientConfig, si *lib.GetCAInfoResponse) error { - if len(si.IssuerRevocationPublicKey) > 0 { - err := storeToFile("Issuer revocation public key", config.MSPDir, "IssuerRevocationPublicKey", si.IssuerRevocationPublicKey) +func storeRevocationPublicKey(config *lib.ClientConfig, si *lib.GetCAInfoResponse) error { + if len(si.RevocationPublicKey) > 0 { + err := storeToFile("Issuer revocation public key", config.MSPDir, "RevocationPublicKey", si.RevocationPublicKey) if err != nil { return err } diff --git a/cmd/fabric-ca-client/command/main_test.go b/cmd/fabric-ca-client/command/main_test.go index 9e703f02e..e54b5ac80 100644 --- a/cmd/fabric-ca-client/command/main_test.go +++ b/cmd/fabric-ca-client/command/main_test.go @@ -2189,7 +2189,7 @@ func TestCleanUp(t *testing.T) { os.Remove(filepath.Join(tdDir, "ca-key.pem")) os.Remove(filepath.Join(tdDir, "IssuerPublicKey")) os.Remove(filepath.Join(tdDir, "IssuerSecretKey")) - os.Remove(filepath.Join(tdDir, "IssuerRevocationPublicKey")) + os.Remove(filepath.Join(tdDir, "RevocationPublicKey")) os.Remove(testYaml) os.Remove(fabricCADB) os.RemoveAll(moptionDir) @@ -2200,7 +2200,7 @@ func cleanMultiCADir() { caFolder := filepath.Join(tdDir, "ca/rootca") nestedFolders := []string{"ca1", "ca2"} removeFiles := []string{"msp", "ca-cert.pem", - "fabric-ca-server.db", "fabric-ca2-server.db", "ca-chain.pem", "IssuerPublicKey", "IssuerSecretKey", "IssuerRevocationPublicKey"} + "fabric-ca-server.db", "fabric-ca2-server.db", "ca-chain.pem", "IssuerPublicKey", "IssuerSecretKey", "RevocationPublicKey"} for _, nestedFolder := range nestedFolders { path := filepath.Join(caFolder, nestedFolder) diff --git a/cmd/fabric-ca-server/main_test.go b/cmd/fabric-ca-server/main_test.go index 0e9a6e74a..ead05965e 100644 --- a/cmd/fabric-ca-server/main_test.go +++ b/cmd/fabric-ca-server/main_test.go @@ -435,7 +435,7 @@ func TestClean(t *testing.T) { os.Remove("ca-cert.pem") os.Remove("IssuerSecretKey") os.Remove("IssuerPublicKey") - os.Remove("IssuerRevocationPublicKey") + os.Remove("RevocationPublicKey") os.Remove("fabric-ca-server.db") os.RemoveAll("keystore") os.RemoveAll("msp") @@ -444,7 +444,7 @@ func TestClean(t *testing.T) { os.Remove("../../testdata/ca-cert.pem") os.Remove("../../testdata/IssuerSecretKey") os.Remove("../../testdata/IssuerPublicKey") - os.Remove("../../testdata/IssuerRevocationPublicKey") + os.Remove("../../testdata/RevocationPublicKey") os.RemoveAll(ldapTestDir) os.RemoveAll("testregattr") } @@ -453,7 +453,7 @@ func cleanUpMultiCAFiles() { caFolder := "../../testdata/ca/rootca" nestedFolders := []string{"ca1", "ca2"} removeFiles := []string{"msp", "ca-cert.pem", "ca-key.pem", "fabric-ca-server.db", - "fabric-ca2-server.db", "IssuerSecretKey", "IssuerPublicKey", "IssuerRevocationPublicKey"} + "fabric-ca2-server.db", "IssuerSecretKey", "IssuerPublicKey", "RevocationPublicKey"} for _, nestedFolder := range nestedFolders { path := filepath.Join(caFolder, nestedFolder) diff --git a/docs/source/deployguide/cadeploy.md b/docs/source/deployguide/cadeploy.md index ad154800e..933164dde 100644 --- a/docs/source/deployguide/cadeploy.md +++ b/docs/source/deployguide/cadeploy.md @@ -311,7 +311,7 @@ Because you've already registered and enrolled your organization CA bootstrap id ├── rcaadmin ├── msp       ├── IssuerPublicKey -       ├── IssuerRevocationPublicKey +       ├── RevocationPublicKey       ├── cacerts    ├── keystore      └── key.pem @@ -412,7 +412,7 @@ The folder structure we are using for these commands is: └── cert.pem ├── user ├── IssuerPublicKey - └── IssuerRevocationPublicKey + └── RevocationPublicKey ``` Where: @@ -473,7 +473,7 @@ The resulting folder structure is similar to the following structure. (Some fold ├── tlscacerts ├── user ├── IssuerPublicKey -      └── IssuerRevocationPublicKey +      └── RevocationPublicKey fabric-ca-server-int-ca └── tls └── tls-ca-cert.pem diff --git a/docs/source/operations_guide.rst b/docs/source/operations_guide.rst index 229dc3ab2..e67e8936c 100644 --- a/docs/source/operations_guide.rst +++ b/docs/source/operations_guide.rst @@ -235,7 +235,7 @@ issued form the CA. You will see files such as the ones below: ├── fabric-ca-client-config.yaml └── msp ├── IssuerPublicKey - ├── IssuerRevocationPublicKey + ├── RevocationPublicKey ├── cacerts │ └── 0-0-0-0-7053.pem ├── keystore diff --git a/go.mod b/go.mod index 42c3621f2..89e738664 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/grantae/certinfo v0.0.0-20170412194111-59d56a35515b github.com/hyperledger/fabric v1.4.11 github.com/hyperledger/fabric-lib-go v1.0.0 + github.com/hyperledger/fabric-protos-go v0.0.0-20210911123859-041d13f0980c github.com/jinzhu/copier v0.3.5 github.com/jmoiron/sqlx v1.2.0 github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46 diff --git a/go.sum b/go.sum index 51fc0dd34..18c783271 100644 --- a/go.sum +++ b/go.sum @@ -97,6 +97,7 @@ github.com/hyperledger/fabric-amcl v0.0.0-20210603140002-2670f91851c8 h1:BCR8ZlO github.com/hyperledger/fabric-amcl v0.0.0-20210603140002-2670f91851c8/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE= github.com/hyperledger/fabric-lib-go v1.0.0 h1:UL1w7c9LvHZUSkIvHTDGklxFv2kTeva1QI2emOVc324= github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc= +github.com/hyperledger/fabric-protos-go v0.0.0-20210911123859-041d13f0980c h1:QPhSriw6EzMOj/d7gcGiKEvozVvQ5HLk9UWie4KAvSs= github.com/hyperledger/fabric-protos-go v0.0.0-20210911123859-041d13f0980c/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= diff --git a/lib/ca.go b/lib/ca.go index f031fbc80..33c2a1c3b 100644 --- a/lib/ca.go +++ b/lib/ca.go @@ -1014,7 +1014,7 @@ func (ca *CA) fillCAInfo(info *api.CAInfoResponseNet) error { return err } info.IssuerPublicKey = util.B64Encode(ipkBytes) - info.IssuerRevocationPublicKey = util.B64Encode(rpkBytes) + info.RevocationPublicKey = util.B64Encode(rpkBytes) return nil } diff --git a/lib/client.go b/lib/client.go index cc8c66902..e0bcc6472 100644 --- a/lib/client.go +++ b/lib/client.go @@ -73,7 +73,7 @@ type GetCAInfoResponse struct { // Idemix issuer public key of the CA IssuerPublicKey []byte // Idemix issuer revocation public key of the CA - IssuerRevocationPublicKey []byte + RevocationPublicKey []byte // Version of the server Version string } @@ -308,12 +308,12 @@ func (c *Client) net2LocalCAInfo(net *api.CAInfoResponseNet, local *GetCAInfoRes } local.IssuerPublicKey = ipk } - if net.IssuerRevocationPublicKey != "" { - rpk, err := util.B64Decode(net.IssuerRevocationPublicKey) + if net.RevocationPublicKey != "" { + rpk, err := util.B64Decode(net.RevocationPublicKey) if err != nil { return errors.WithMessage(err, "Failed to decode issuer revocation key") } - local.IssuerRevocationPublicKey = rpk + local.RevocationPublicKey = rpk } local.CAName = net.CAName local.CAChain = caChain @@ -517,7 +517,6 @@ func (c *Client) newIdemixEnrollmentResponse(identity *Identity, result *api.Ide ou, _ := result.Attrs["OU"].(string) enrollmentID, _ := result.Attrs["EnrollmentID"].(string) signerConfig := &idemixcred.SignerConfig{ - CurveID: cidemix.Curves.ByID(c.curveID), Cred: credBytes, Sk: sk.Bytes(), Role: role, diff --git a/lib/client/credential/idemix/credential.go b/lib/client/credential/idemix/credential.go index 3103f6cca..db8fded83 100644 --- a/lib/client/credential/idemix/credential.go +++ b/lib/client/credential/idemix/credential.go @@ -19,6 +19,7 @@ import ( "github.com/hyperledger/fabric-ca/api" idemix4 "github.com/hyperledger/fabric-ca/lib/common/idemix" "github.com/hyperledger/fabric-ca/util" + m "github.com/hyperledger/fabric-protos-go/msp" "github.com/hyperledger/fabric/bccsp" "github.com/pkg/errors" ) @@ -88,7 +89,16 @@ func (cred *Credential) Store() error { if err != nil { return err } - signerConfigBytes, err := json.Marshal(val) + caSignerConfig := val.(*SignerConfig) + mspSignerConfig := &m.IdemixMSPSignerConfig{ + Cred: caSignerConfig.Cred, + Sk: caSignerConfig.Sk, + OrganizationalUnitIdentifier: caSignerConfig.OrganizationalUnitIdentifier, + Role: int32(caSignerConfig.Role), + EnrollmentId: caSignerConfig.EnrollmentID, + CredentialRevocationInformation: caSignerConfig.CredentialRevocationInformation, + } + signerConfigBytes, err := proto.Marshal(mspSignerConfig) if err != nil { return errors.Wrapf(err, "Failed to marshal SignerConfig") } @@ -108,14 +118,31 @@ func (cred *Credential) Load() error { log.Debugf("No credential found at %s: %s", cred.signerConfigFile, err.Error()) return err } - val := SignerConfig{} - err = json.Unmarshal(signerConfigBytes, &val) - if err != nil { - return errors.Wrapf(err, fmt.Sprintf("Failed to unmarshal SignerConfig bytes from %s", cred.signerConfigFile)) + + // Load the MSP signer config + var val SignerConfig + mspSignerConfig := &m.IdemixMSPSignerConfig{} + err = proto.Unmarshal(signerConfigBytes, mspSignerConfig) + if err == nil { + val = SignerConfig{ + Cred: mspSignerConfig.Cred, + Sk: mspSignerConfig.Sk, + OrganizationalUnitIdentifier: mspSignerConfig.OrganizationalUnitIdentifier, + Role: int(mspSignerConfig.Role), + EnrollmentID: mspSignerConfig.EnrollmentId, + CredentialRevocationInformation: mspSignerConfig.CredentialRevocationInformation, + } } - if val.CurveID == "" { - val.CurveID = idemix4.DefaultIdemixCurve + + if err != nil { + // try to unmarshal via json + val = SignerConfig{} + err = json.Unmarshal(signerConfigBytes, &val) + if err != nil { + return errors.Wrapf(err, fmt.Sprintf("Failed to unmarshal SignerConfig bytes from %s", cred.signerConfigFile)) + } } + cred.val = &val return nil } diff --git a/lib/client/credential/idemix/signerconfig.go b/lib/client/credential/idemix/signerconfig.go index bfeabbcfd..2348e5431 100644 --- a/lib/client/credential/idemix/signerconfig.go +++ b/lib/client/credential/idemix/signerconfig.go @@ -20,8 +20,6 @@ type SignerConfig struct { EnrollmentID string `protobuf:"bytes,5,opt,name=enrollment_id,json=enrollmentId" json:"enrollment_id,omitempty"` // CRI contains a serialized Credential Revocation Information CredentialRevocationInformation []byte `protobuf:"bytes,6,opt,name=credential_revocation_information,json=credentialRevocationInformation,proto3" json:"credential_revocation_information,omitempty"` - // CurveID specifies the name of the Idemix curve to use, defaults to 'amcl.Fp256bn' - CurveID string `protobuf:"bytes,7,opt,name=curve_id,json=curveID" json:"curveID,omitempty"` } // GetCred returns credential associated with this signer config diff --git a/lib/server/idemix/config.go b/lib/server/idemix/config.go index 2866af3dd..b04b3ce01 100644 --- a/lib/server/idemix/config.go +++ b/lib/server/idemix/config.go @@ -18,9 +18,9 @@ const ( // DefaultIssuerSecretKeyFile is the default name of the file that contains issuer secret key DefaultIssuerSecretKeyFile = "IssuerSecretKey" // DefaultRevocationPublicKeyFile is the name of the file where revocation public key is stored - DefaultRevocationPublicKeyFile = "IssuerRevocationPublicKey" + DefaultRevocationPublicKeyFile = "RevocationPublicKey" // DefaultRevocationPrivateKeyFile is the name of the file where revocation private key is stored - DefaultRevocationPrivateKeyFile = "IssuerRevocationPrivateKey" + DefaultRevocationPrivateKeyFile = "RevocationPrivateKey" // KeystoreDir is the keystore directory where all keys are stored. It is relative to the server home directory. KeystoreDir = "msp/keystore" ) @@ -30,8 +30,8 @@ type Config struct { Curve string `def:"amcl.Fp256bn" help:"Name of the curve among {'amcl.Fp256bn', 'gurvy.Bn254', 'amcl.Fp256Miraclbn'}, defaults to 'amcl.Fp256bn'"` IssuerPublicKeyfile string `def:"IssuerPublicKey" skip:"true" help:"Name of the file that contains marshalled bytes of CA's Idemix issuer public key"` IssuerSecretKeyfile string `def:"IssuerSecretKey" skip:"true" help:"Name of the file that contains CA's Idemix issuer secret key"` - RevocationPublicKeyfile string `def:"IssuerRevocationPublicKey" skip:"true" help:"Name of the file that contains Idemix issuer revocation public key"` - RevocationPrivateKeyfile string `def:"IssuerRevocationPrivateKey" skip:"true" help:"Name of the file that contains Idemix issuer revocation private key"` + RevocationPublicKeyfile string `def:"RevocationPublicKey" skip:"true" help:"Name of the file that contains Idemix issuer revocation public key"` + RevocationPrivateKeyfile string `def:"RevocationPrivateKey" skip:"true" help:"Name of the file that contains Idemix issuer revocation private key"` RHPoolSize int `def:"100" help:"Specifies revocation handle pool size"` NonceExpiration string `def:"15s" help:"Duration after which a nonce expires"` NonceSweepInterval string `def:"15m" help:"Interval at which expired nonces are deleted"` diff --git a/lib/server_test.go b/lib/server_test.go index ff3a21cbe..6234864ba 100644 --- a/lib/server_test.go +++ b/lib/server_test.go @@ -1238,7 +1238,7 @@ func TestSRVMultiCAWithIntermediate(t *testing.T) { if err != nil { t.Errorf("RemoveAll failed: %s", err) } - err = os.RemoveAll("../testdata/IssuerRevocationPublicKey") + err = os.RemoveAll("../testdata/RevocationPublicKey") if err != nil { t.Errorf("RemoveAll failed: %s", err) } @@ -2399,7 +2399,7 @@ func cleanMultiCADir(t *testing.T) { toplevelFolders := []string{"intermediateca", "rootca"} nestedFolders := []string{"ca1", "ca2", "ca3"} removeFiles := []string{"ca-cert.pem", "ca-key.pem", "fabric-ca-server.db", - "fabric-ca2-server.db", "ca-chain.pem", "IssuerPublicKey", "IssuerSecretKey", "IssuerRevocationPublicKey"} + "fabric-ca2-server.db", "ca-chain.pem", "IssuerPublicKey", "IssuerSecretKey", "RevocationPublicKey"} for _, topFolder := range toplevelFolders { for _, nestedFolder := range nestedFolders { diff --git a/swagger/openapi.json b/swagger/openapi.json index 46d287e28..579b64004 100644 --- a/swagger/openapi.json +++ b/swagger/openapi.json @@ -55,7 +55,7 @@ "type": "string", "description": "Base 64 encoding of proto bytes of the CA's Idemix issuer public key" }, - "IssuerRevocationPublicKey": { + "RevocationPublicKey": { "type": "string", "description": "Base 64 encoding of PEM-encoded bytes of the CA's Idemix issuer revocation public key" }, @@ -166,7 +166,7 @@ "CAChain", "CAName", "IssuerPublicKey", - "IssuerRevocationPublicKey", + "RevocationPublicKey", "Version" ], "type": "object", @@ -183,7 +183,7 @@ "type": "string", "description": "Base 64 encoding of proto bytes of the CA's Idemix issuer public key" }, - "IssuerRevocationPublicKey": { + "RevocationPublicKey": { "type": "string", "description": "Base 64 encoding of PEM-encoded bytes of the CA's Idemix issuer revocation public key" }, @@ -302,7 +302,7 @@ "CAChain", "CAName", "IssuerPublicKey", - "IssuerRevocationPublicKey", + "RevocationPublicKey", "Version" ], "type": "object", @@ -319,7 +319,7 @@ "type": "string", "description": "Base 64 encoding of proto bytes of the CA's Idemix issuer public key" }, - "IssuerRevocationPublicKey": { + "RevocationPublicKey": { "type": "string", "description": "Base 64 encoding of PEM-encoded bytes of the CA's Idemix issuer revocation public key" }, @@ -500,7 +500,7 @@ "CAChain", "CAName", "IssuerPublicKey", - "IssuerRevocationPublicKey", + "RevocationPublicKey", "Version" ], "type": "object", @@ -517,7 +517,7 @@ "type": "string", "description": "Base 64 encoding of proto bytes of the CA's Idemix issuer public key" }, - "IssuerRevocationPublicKey": { + "RevocationPublicKey": { "type": "string", "description": "Base 64 encoding of PEM-encoded bytes of the CA's Idemix issuer revocation public key" }, diff --git a/swagger/swagger-fabric-ca.json b/swagger/swagger-fabric-ca.json index ab17aca34..168a56c7f 100644 --- a/swagger/swagger-fabric-ca.json +++ b/swagger/swagger-fabric-ca.json @@ -160,7 +160,7 @@ "type": "string", "description": "Base 64 encoding of proto bytes of the CA's Idemix issuer public key" }, - "IssuerRevocationPublicKey": { + "RevocationPublicKey": { "type": "string", "description": "Base 64 encoding of PEM-encoded bytes of the CA's Idemix issuer revocation public key" }, @@ -327,7 +327,7 @@ "type": "string", "description": "Base 64 encoding of proto bytes of the CA's Idemix issuer public key" }, - "IssuerRevocationPublicKey": { + "RevocationPublicKey": { "type": "string", "description": "Base 64 encoding of PEM-encoded bytes of the CA's Idemix issuer revocation public key" }, @@ -340,7 +340,7 @@ "CAName", "CAChain", "IssuerPublicKey", - "IssuerRevocationPublicKey", + "RevocationPublicKey", "Version" ] } @@ -505,7 +505,7 @@ "type": "string", "description": "Base 64 encoding of proto bytes of the CA's Idemix issuer public key" }, - "IssuerRevocationPublicKey": { + "RevocationPublicKey": { "type": "string", "description": "Base 64 encoding of PEM-encoded bytes of the CA's Idemix issuer revocation public key" }, @@ -518,7 +518,7 @@ "CAName", "CAChain", "IssuerPublicKey", - "IssuerRevocationPublicKey", + "RevocationPublicKey", "Version" ] } @@ -793,7 +793,7 @@ "type": "string", "description": "Base 64 encoding of proto bytes of the CA's Idemix issuer public key" }, - "IssuerRevocationPublicKey": { + "RevocationPublicKey": { "type": "string", "description": "Base 64 encoding of PEM-encoded bytes of the CA's Idemix issuer revocation public key" }, @@ -806,7 +806,7 @@ "CAName", "CAChain", "IssuerPublicKey", - "IssuerRevocationPublicKey", + "RevocationPublicKey", "Version" ] } diff --git a/vendor/github.com/hyperledger/fabric-protos-go/LICENSE b/vendor/github.com/hyperledger/fabric-protos-go/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/github.com/hyperledger/fabric-protos-go/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/hyperledger/fabric-protos-go/msp/identities.pb.go b/vendor/github.com/hyperledger/fabric-protos-go/msp/identities.pb.go new file mode 100644 index 000000000..65bcfb216 --- /dev/null +++ b/vendor/github.com/hyperledger/fabric-protos-go/msp/identities.pb.go @@ -0,0 +1,184 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: msp/identities.proto + +package msp + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// This struct represents an Identity +// (with its MSP identifier) to be used +// to serialize it and deserialize it +type SerializedIdentity struct { + // The identifier of the associated membership service provider + Mspid string `protobuf:"bytes,1,opt,name=mspid,proto3" json:"mspid,omitempty"` + // the Identity, serialized according to the rules of its MPS + IdBytes []byte `protobuf:"bytes,2,opt,name=id_bytes,json=idBytes,proto3" json:"id_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SerializedIdentity) Reset() { *m = SerializedIdentity{} } +func (m *SerializedIdentity) String() string { return proto.CompactTextString(m) } +func (*SerializedIdentity) ProtoMessage() {} +func (*SerializedIdentity) Descriptor() ([]byte, []int) { + return fileDescriptor_872f7fc14bf2c238, []int{0} +} + +func (m *SerializedIdentity) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SerializedIdentity.Unmarshal(m, b) +} +func (m *SerializedIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SerializedIdentity.Marshal(b, m, deterministic) +} +func (m *SerializedIdentity) XXX_Merge(src proto.Message) { + xxx_messageInfo_SerializedIdentity.Merge(m, src) +} +func (m *SerializedIdentity) XXX_Size() int { + return xxx_messageInfo_SerializedIdentity.Size(m) +} +func (m *SerializedIdentity) XXX_DiscardUnknown() { + xxx_messageInfo_SerializedIdentity.DiscardUnknown(m) +} + +var xxx_messageInfo_SerializedIdentity proto.InternalMessageInfo + +func (m *SerializedIdentity) GetMspid() string { + if m != nil { + return m.Mspid + } + return "" +} + +func (m *SerializedIdentity) GetIdBytes() []byte { + if m != nil { + return m.IdBytes + } + return nil +} + +// This struct represents an Idemix Identity +// to be used to serialize it and deserialize it. +// The IdemixMSP will first serialize an idemix identity to bytes using +// this proto, and then uses these bytes as id_bytes in SerializedIdentity +type SerializedIdemixIdentity struct { + // nym_x is the X-component of the pseudonym elliptic curve point. + // It is a []byte representation of an amcl.BIG + // The pseudonym can be seen as a public key of the identity, it is used to verify signatures. + NymX []byte `protobuf:"bytes,1,opt,name=nym_x,json=nymX,proto3" json:"nym_x,omitempty"` + // nym_y is the Y-component of the pseudonym elliptic curve point. + // It is a []byte representation of an amcl.BIG + // The pseudonym can be seen as a public key of the identity, it is used to verify signatures. + NymY []byte `protobuf:"bytes,2,opt,name=nym_y,json=nymY,proto3" json:"nym_y,omitempty"` + // ou contains the organizational unit of the idemix identity + Ou []byte `protobuf:"bytes,3,opt,name=ou,proto3" json:"ou,omitempty"` + // role contains the role of this identity (e.g., ADMIN or MEMBER) + Role []byte `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` + // proof contains the cryptographic evidence that this identity is valid + Proof []byte `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SerializedIdemixIdentity) Reset() { *m = SerializedIdemixIdentity{} } +func (m *SerializedIdemixIdentity) String() string { return proto.CompactTextString(m) } +func (*SerializedIdemixIdentity) ProtoMessage() {} +func (*SerializedIdemixIdentity) Descriptor() ([]byte, []int) { + return fileDescriptor_872f7fc14bf2c238, []int{1} +} + +func (m *SerializedIdemixIdentity) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SerializedIdemixIdentity.Unmarshal(m, b) +} +func (m *SerializedIdemixIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SerializedIdemixIdentity.Marshal(b, m, deterministic) +} +func (m *SerializedIdemixIdentity) XXX_Merge(src proto.Message) { + xxx_messageInfo_SerializedIdemixIdentity.Merge(m, src) +} +func (m *SerializedIdemixIdentity) XXX_Size() int { + return xxx_messageInfo_SerializedIdemixIdentity.Size(m) +} +func (m *SerializedIdemixIdentity) XXX_DiscardUnknown() { + xxx_messageInfo_SerializedIdemixIdentity.DiscardUnknown(m) +} + +var xxx_messageInfo_SerializedIdemixIdentity proto.InternalMessageInfo + +func (m *SerializedIdemixIdentity) GetNymX() []byte { + if m != nil { + return m.NymX + } + return nil +} + +func (m *SerializedIdemixIdentity) GetNymY() []byte { + if m != nil { + return m.NymY + } + return nil +} + +func (m *SerializedIdemixIdentity) GetOu() []byte { + if m != nil { + return m.Ou + } + return nil +} + +func (m *SerializedIdemixIdentity) GetRole() []byte { + if m != nil { + return m.Role + } + return nil +} + +func (m *SerializedIdemixIdentity) GetProof() []byte { + if m != nil { + return m.Proof + } + return nil +} + +func init() { + proto.RegisterType((*SerializedIdentity)(nil), "msp.SerializedIdentity") + proto.RegisterType((*SerializedIdemixIdentity)(nil), "msp.SerializedIdemixIdentity") +} + +func init() { proto.RegisterFile("msp/identities.proto", fileDescriptor_872f7fc14bf2c238) } + +var fileDescriptor_872f7fc14bf2c238 = []byte{ + // 243 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0x31, 0x4f, 0xfb, 0x30, + 0x10, 0x47, 0x95, 0x34, 0xf9, 0xff, 0xc1, 0xaa, 0x18, 0x4c, 0x07, 0xb3, 0x95, 0x4e, 0x95, 0x50, + 0x9d, 0x81, 0x6f, 0x50, 0x89, 0x81, 0x0d, 0x85, 0x05, 0x58, 0xaa, 0xa6, 0xbe, 0xa6, 0x27, 0xe5, + 0x72, 0x96, 0xed, 0x48, 0x35, 0x03, 0x9f, 0x1d, 0x25, 0x06, 0x04, 0x9b, 0x7f, 0x4f, 0x4f, 0x4f, + 0x3e, 0xb1, 0x20, 0x6f, 0x2b, 0x34, 0xd0, 0x07, 0x0c, 0x08, 0x5e, 0x5b, 0xc7, 0x81, 0xe5, 0x8c, + 0xbc, 0x5d, 0x3d, 0x08, 0xf9, 0x0c, 0x0e, 0xf7, 0x1d, 0xbe, 0x83, 0x79, 0x4c, 0x4a, 0x94, 0x0b, + 0x51, 0x92, 0xb7, 0x68, 0x54, 0xb6, 0xcc, 0xd6, 0x97, 0x75, 0x1a, 0xf2, 0x46, 0x5c, 0xa0, 0xd9, + 0x35, 0x31, 0x80, 0x57, 0xf9, 0x32, 0x5b, 0xcf, 0xeb, 0xff, 0x68, 0xb6, 0xe3, 0x5c, 0x7d, 0x08, + 0xf5, 0x27, 0x43, 0x78, 0xfe, 0x89, 0x5d, 0x8b, 0xb2, 0x8f, 0xb4, 0x3b, 0x4f, 0xb1, 0x79, 0x5d, + 0xf4, 0x91, 0x5e, 0xbe, 0x61, 0xfc, 0x0a, 0x8d, 0xf0, 0x55, 0x5e, 0x89, 0x9c, 0x07, 0x35, 0x9b, + 0x48, 0xce, 0x83, 0x94, 0xa2, 0x70, 0xdc, 0x81, 0x2a, 0x92, 0x33, 0xbe, 0xc7, 0xaf, 0x59, 0xc7, + 0x7c, 0x54, 0xe5, 0x04, 0xd3, 0xd8, 0x3e, 0x89, 0x5b, 0x76, 0xad, 0x3e, 0x45, 0x0b, 0xae, 0x03, + 0xd3, 0x82, 0xd3, 0xc7, 0x7d, 0xe3, 0xf0, 0x90, 0x6e, 0xf5, 0x9a, 0xbc, 0x7d, 0xbb, 0x6b, 0x31, + 0x9c, 0x86, 0x46, 0x1f, 0x98, 0xaa, 0x5f, 0x66, 0x95, 0xcc, 0x4d, 0x32, 0x37, 0x2d, 0x57, 0xe4, + 0x6d, 0xf3, 0x6f, 0x9a, 0xf7, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xf7, 0x41, 0xf7, 0x3c, + 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/hyperledger/fabric-protos-go/msp/msp_config.pb.go b/vendor/github.com/hyperledger/fabric-protos-go/msp/msp_config.pb.go new file mode 100644 index 000000000..005663c1b --- /dev/null +++ b/vendor/github.com/hyperledger/fabric-protos-go/msp/msp_config.pb.go @@ -0,0 +1,775 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: msp/msp_config.proto + +package msp + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// MSPConfig collects all the configuration information for +// an MSP. The Config field should be unmarshalled in a way +// that depends on the Type +type MSPConfig struct { + // Type holds the type of the MSP; the default one would + // be of type FABRIC implementing an X.509 based provider + Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` + // Config is MSP dependent configuration info + Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MSPConfig) Reset() { *m = MSPConfig{} } +func (m *MSPConfig) String() string { return proto.CompactTextString(m) } +func (*MSPConfig) ProtoMessage() {} +func (*MSPConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_9c34771f529d9d1a, []int{0} +} + +func (m *MSPConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MSPConfig.Unmarshal(m, b) +} +func (m *MSPConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MSPConfig.Marshal(b, m, deterministic) +} +func (m *MSPConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_MSPConfig.Merge(m, src) +} +func (m *MSPConfig) XXX_Size() int { + return xxx_messageInfo_MSPConfig.Size(m) +} +func (m *MSPConfig) XXX_DiscardUnknown() { + xxx_messageInfo_MSPConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_MSPConfig proto.InternalMessageInfo + +func (m *MSPConfig) GetType() int32 { + if m != nil { + return m.Type + } + return 0 +} + +func (m *MSPConfig) GetConfig() []byte { + if m != nil { + return m.Config + } + return nil +} + +// FabricMSPConfig collects all the configuration information for +// a Fabric MSP. +// Here we assume a default certificate validation policy, where +// any certificate signed by any of the listed rootCA certs would +// be considered as valid under this MSP. +// This MSP may or may not come with a signing identity. If it does, +// it can also issue signing identities. If it does not, it can only +// be used to validate and verify certificates. +type FabricMSPConfig struct { + // Name holds the identifier of the MSP; MSP identifier + // is chosen by the application that governs this MSP. + // For example, and assuming the default implementation of MSP, + // that is X.509-based and considers a single Issuer, + // this can refer to the Subject OU field or the Issuer OU field. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // List of root certificates trusted by this MSP + // they are used upon certificate validation (see + // comment for IntermediateCerts below) + RootCerts [][]byte `protobuf:"bytes,2,rep,name=root_certs,json=rootCerts,proto3" json:"root_certs,omitempty"` + // List of intermediate certificates trusted by this MSP; + // they are used upon certificate validation as follows: + // validation attempts to build a path from the certificate + // to be validated (which is at one end of the path) and + // one of the certs in the RootCerts field (which is at + // the other end of the path). If the path is longer than + // 2, certificates in the middle are searched within the + // IntermediateCerts pool + IntermediateCerts [][]byte `protobuf:"bytes,3,rep,name=intermediate_certs,json=intermediateCerts,proto3" json:"intermediate_certs,omitempty"` + // Identity denoting the administrator of this MSP + Admins [][]byte `protobuf:"bytes,4,rep,name=admins,proto3" json:"admins,omitempty"` + // Identity revocation list + RevocationList [][]byte `protobuf:"bytes,5,rep,name=revocation_list,json=revocationList,proto3" json:"revocation_list,omitempty"` + // SigningIdentity holds information on the signing identity + // this peer is to use, and which is to be imported by the + // MSP defined before + SigningIdentity *SigningIdentityInfo `protobuf:"bytes,6,opt,name=signing_identity,json=signingIdentity,proto3" json:"signing_identity,omitempty"` + // OrganizationalUnitIdentifiers holds one or more + // fabric organizational unit identifiers that belong to + // this MSP configuration + OrganizationalUnitIdentifiers []*FabricOUIdentifier `protobuf:"bytes,7,rep,name=organizational_unit_identifiers,json=organizationalUnitIdentifiers,proto3" json:"organizational_unit_identifiers,omitempty"` + // FabricCryptoConfig contains the configuration parameters + // for the cryptographic algorithms used by this MSP + CryptoConfig *FabricCryptoConfig `protobuf:"bytes,8,opt,name=crypto_config,json=cryptoConfig,proto3" json:"crypto_config,omitempty"` + // List of TLS root certificates trusted by this MSP. + // They are returned by GetTLSRootCerts. + TlsRootCerts [][]byte `protobuf:"bytes,9,rep,name=tls_root_certs,json=tlsRootCerts,proto3" json:"tls_root_certs,omitempty"` + // List of TLS intermediate certificates trusted by this MSP; + // They are returned by GetTLSIntermediateCerts. + TlsIntermediateCerts [][]byte `protobuf:"bytes,10,rep,name=tls_intermediate_certs,json=tlsIntermediateCerts,proto3" json:"tls_intermediate_certs,omitempty"` + // fabric_node_ous contains the configuration to distinguish clients from peers from orderers + // based on the OUs. + FabricNodeOus *FabricNodeOUs `protobuf:"bytes,11,opt,name=fabric_node_ous,json=fabricNodeOus,proto3" json:"fabric_node_ous,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FabricMSPConfig) Reset() { *m = FabricMSPConfig{} } +func (m *FabricMSPConfig) String() string { return proto.CompactTextString(m) } +func (*FabricMSPConfig) ProtoMessage() {} +func (*FabricMSPConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_9c34771f529d9d1a, []int{1} +} + +func (m *FabricMSPConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FabricMSPConfig.Unmarshal(m, b) +} +func (m *FabricMSPConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FabricMSPConfig.Marshal(b, m, deterministic) +} +func (m *FabricMSPConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_FabricMSPConfig.Merge(m, src) +} +func (m *FabricMSPConfig) XXX_Size() int { + return xxx_messageInfo_FabricMSPConfig.Size(m) +} +func (m *FabricMSPConfig) XXX_DiscardUnknown() { + xxx_messageInfo_FabricMSPConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_FabricMSPConfig proto.InternalMessageInfo + +func (m *FabricMSPConfig) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *FabricMSPConfig) GetRootCerts() [][]byte { + if m != nil { + return m.RootCerts + } + return nil +} + +func (m *FabricMSPConfig) GetIntermediateCerts() [][]byte { + if m != nil { + return m.IntermediateCerts + } + return nil +} + +func (m *FabricMSPConfig) GetAdmins() [][]byte { + if m != nil { + return m.Admins + } + return nil +} + +func (m *FabricMSPConfig) GetRevocationList() [][]byte { + if m != nil { + return m.RevocationList + } + return nil +} + +func (m *FabricMSPConfig) GetSigningIdentity() *SigningIdentityInfo { + if m != nil { + return m.SigningIdentity + } + return nil +} + +func (m *FabricMSPConfig) GetOrganizationalUnitIdentifiers() []*FabricOUIdentifier { + if m != nil { + return m.OrganizationalUnitIdentifiers + } + return nil +} + +func (m *FabricMSPConfig) GetCryptoConfig() *FabricCryptoConfig { + if m != nil { + return m.CryptoConfig + } + return nil +} + +func (m *FabricMSPConfig) GetTlsRootCerts() [][]byte { + if m != nil { + return m.TlsRootCerts + } + return nil +} + +func (m *FabricMSPConfig) GetTlsIntermediateCerts() [][]byte { + if m != nil { + return m.TlsIntermediateCerts + } + return nil +} + +func (m *FabricMSPConfig) GetFabricNodeOus() *FabricNodeOUs { + if m != nil { + return m.FabricNodeOus + } + return nil +} + +// FabricCryptoConfig contains configuration parameters +// for the cryptographic algorithms used by the MSP +// this configuration refers to +type FabricCryptoConfig struct { + // SignatureHashFamily is a string representing the hash family to be used + // during sign and verify operations. + // Allowed values are "SHA2" and "SHA3". + SignatureHashFamily string `protobuf:"bytes,1,opt,name=signature_hash_family,json=signatureHashFamily,proto3" json:"signature_hash_family,omitempty"` + // IdentityIdentifierHashFunction is a string representing the hash function + // to be used during the computation of the identity identifier of an MSP identity. + // Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384". + IdentityIdentifierHashFunction string `protobuf:"bytes,2,opt,name=identity_identifier_hash_function,json=identityIdentifierHashFunction,proto3" json:"identity_identifier_hash_function,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FabricCryptoConfig) Reset() { *m = FabricCryptoConfig{} } +func (m *FabricCryptoConfig) String() string { return proto.CompactTextString(m) } +func (*FabricCryptoConfig) ProtoMessage() {} +func (*FabricCryptoConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_9c34771f529d9d1a, []int{2} +} + +func (m *FabricCryptoConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FabricCryptoConfig.Unmarshal(m, b) +} +func (m *FabricCryptoConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FabricCryptoConfig.Marshal(b, m, deterministic) +} +func (m *FabricCryptoConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_FabricCryptoConfig.Merge(m, src) +} +func (m *FabricCryptoConfig) XXX_Size() int { + return xxx_messageInfo_FabricCryptoConfig.Size(m) +} +func (m *FabricCryptoConfig) XXX_DiscardUnknown() { + xxx_messageInfo_FabricCryptoConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_FabricCryptoConfig proto.InternalMessageInfo + +func (m *FabricCryptoConfig) GetSignatureHashFamily() string { + if m != nil { + return m.SignatureHashFamily + } + return "" +} + +func (m *FabricCryptoConfig) GetIdentityIdentifierHashFunction() string { + if m != nil { + return m.IdentityIdentifierHashFunction + } + return "" +} + +// IdemixMSPConfig collects all the configuration information for +// an Idemix MSP. +type IdemixMSPConfig struct { + // Name holds the identifier of the MSP + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // ipk represents the (serialized) issuer public key + Ipk []byte `protobuf:"bytes,2,opt,name=ipk,proto3" json:"ipk,omitempty"` + // signer may contain crypto material to configure a default signer + Signer *IdemixMSPSignerConfig `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` + // revocation_pk is the public key used for revocation of credentials + RevocationPk []byte `protobuf:"bytes,4,opt,name=revocation_pk,json=revocationPk,proto3" json:"revocation_pk,omitempty"` + // epoch represents the current epoch (time interval) used for revocation + Epoch int64 `protobuf:"varint,5,opt,name=epoch,proto3" json:"epoch,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IdemixMSPConfig) Reset() { *m = IdemixMSPConfig{} } +func (m *IdemixMSPConfig) String() string { return proto.CompactTextString(m) } +func (*IdemixMSPConfig) ProtoMessage() {} +func (*IdemixMSPConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_9c34771f529d9d1a, []int{3} +} + +func (m *IdemixMSPConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IdemixMSPConfig.Unmarshal(m, b) +} +func (m *IdemixMSPConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IdemixMSPConfig.Marshal(b, m, deterministic) +} +func (m *IdemixMSPConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_IdemixMSPConfig.Merge(m, src) +} +func (m *IdemixMSPConfig) XXX_Size() int { + return xxx_messageInfo_IdemixMSPConfig.Size(m) +} +func (m *IdemixMSPConfig) XXX_DiscardUnknown() { + xxx_messageInfo_IdemixMSPConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_IdemixMSPConfig proto.InternalMessageInfo + +func (m *IdemixMSPConfig) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *IdemixMSPConfig) GetIpk() []byte { + if m != nil { + return m.Ipk + } + return nil +} + +func (m *IdemixMSPConfig) GetSigner() *IdemixMSPSignerConfig { + if m != nil { + return m.Signer + } + return nil +} + +func (m *IdemixMSPConfig) GetRevocationPk() []byte { + if m != nil { + return m.RevocationPk + } + return nil +} + +func (m *IdemixMSPConfig) GetEpoch() int64 { + if m != nil { + return m.Epoch + } + return 0 +} + +// IdemixMSPSIgnerConfig contains the crypto material to set up an idemix signing identity +type IdemixMSPSignerConfig struct { + // cred represents the serialized idemix credential of the default signer + Cred []byte `protobuf:"bytes,1,opt,name=cred,proto3" json:"cred,omitempty"` + // sk is the secret key of the default signer, corresponding to credential Cred + Sk []byte `protobuf:"bytes,2,opt,name=sk,proto3" json:"sk,omitempty"` + // organizational_unit_identifier defines the organizational unit the default signer is in + OrganizationalUnitIdentifier string `protobuf:"bytes,3,opt,name=organizational_unit_identifier,json=organizationalUnitIdentifier,proto3" json:"organizational_unit_identifier,omitempty"` + // role defines whether the default signer is admin, peer, member or client + Role int32 `protobuf:"varint,4,opt,name=role,proto3" json:"role,omitempty"` + // enrollment_id contains the enrollment id of this signer + EnrollmentId string `protobuf:"bytes,5,opt,name=enrollment_id,json=enrollmentId,proto3" json:"enrollment_id,omitempty"` + // credential_revocation_information contains a serialized CredentialRevocationInformation + CredentialRevocationInformation []byte `protobuf:"bytes,6,opt,name=credential_revocation_information,json=credentialRevocationInformation,proto3" json:"credential_revocation_information,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IdemixMSPSignerConfig) Reset() { *m = IdemixMSPSignerConfig{} } +func (m *IdemixMSPSignerConfig) String() string { return proto.CompactTextString(m) } +func (*IdemixMSPSignerConfig) ProtoMessage() {} +func (*IdemixMSPSignerConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_9c34771f529d9d1a, []int{4} +} + +func (m *IdemixMSPSignerConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IdemixMSPSignerConfig.Unmarshal(m, b) +} +func (m *IdemixMSPSignerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IdemixMSPSignerConfig.Marshal(b, m, deterministic) +} +func (m *IdemixMSPSignerConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_IdemixMSPSignerConfig.Merge(m, src) +} +func (m *IdemixMSPSignerConfig) XXX_Size() int { + return xxx_messageInfo_IdemixMSPSignerConfig.Size(m) +} +func (m *IdemixMSPSignerConfig) XXX_DiscardUnknown() { + xxx_messageInfo_IdemixMSPSignerConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_IdemixMSPSignerConfig proto.InternalMessageInfo + +func (m *IdemixMSPSignerConfig) GetCred() []byte { + if m != nil { + return m.Cred + } + return nil +} + +func (m *IdemixMSPSignerConfig) GetSk() []byte { + if m != nil { + return m.Sk + } + return nil +} + +func (m *IdemixMSPSignerConfig) GetOrganizationalUnitIdentifier() string { + if m != nil { + return m.OrganizationalUnitIdentifier + } + return "" +} + +func (m *IdemixMSPSignerConfig) GetRole() int32 { + if m != nil { + return m.Role + } + return 0 +} + +func (m *IdemixMSPSignerConfig) GetEnrollmentId() string { + if m != nil { + return m.EnrollmentId + } + return "" +} + +func (m *IdemixMSPSignerConfig) GetCredentialRevocationInformation() []byte { + if m != nil { + return m.CredentialRevocationInformation + } + return nil +} + +// SigningIdentityInfo represents the configuration information +// related to the signing identity the peer is to use for generating +// endorsements +type SigningIdentityInfo struct { + // PublicSigner carries the public information of the signing + // identity. For an X.509 provider this would be represented by + // an X.509 certificate + PublicSigner []byte `protobuf:"bytes,1,opt,name=public_signer,json=publicSigner,proto3" json:"public_signer,omitempty"` + // PrivateSigner denotes a reference to the private key of the + // peer's signing identity + PrivateSigner *KeyInfo `protobuf:"bytes,2,opt,name=private_signer,json=privateSigner,proto3" json:"private_signer,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SigningIdentityInfo) Reset() { *m = SigningIdentityInfo{} } +func (m *SigningIdentityInfo) String() string { return proto.CompactTextString(m) } +func (*SigningIdentityInfo) ProtoMessage() {} +func (*SigningIdentityInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_9c34771f529d9d1a, []int{5} +} + +func (m *SigningIdentityInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SigningIdentityInfo.Unmarshal(m, b) +} +func (m *SigningIdentityInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SigningIdentityInfo.Marshal(b, m, deterministic) +} +func (m *SigningIdentityInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SigningIdentityInfo.Merge(m, src) +} +func (m *SigningIdentityInfo) XXX_Size() int { + return xxx_messageInfo_SigningIdentityInfo.Size(m) +} +func (m *SigningIdentityInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SigningIdentityInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SigningIdentityInfo proto.InternalMessageInfo + +func (m *SigningIdentityInfo) GetPublicSigner() []byte { + if m != nil { + return m.PublicSigner + } + return nil +} + +func (m *SigningIdentityInfo) GetPrivateSigner() *KeyInfo { + if m != nil { + return m.PrivateSigner + } + return nil +} + +// KeyInfo represents a (secret) key that is either already stored +// in the bccsp/keystore or key material to be imported to the +// bccsp key-store. In later versions it may contain also a +// keystore identifier +type KeyInfo struct { + // Identifier of the key inside the default keystore; this for + // the case of Software BCCSP as well as the HSM BCCSP would be + // the SKI of the key + KeyIdentifier string `protobuf:"bytes,1,opt,name=key_identifier,json=keyIdentifier,proto3" json:"key_identifier,omitempty"` + // KeyMaterial (optional) for the key to be imported; this is + // properly encoded key bytes, prefixed by the type of the key + KeyMaterial []byte `protobuf:"bytes,2,opt,name=key_material,json=keyMaterial,proto3" json:"key_material,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KeyInfo) Reset() { *m = KeyInfo{} } +func (m *KeyInfo) String() string { return proto.CompactTextString(m) } +func (*KeyInfo) ProtoMessage() {} +func (*KeyInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_9c34771f529d9d1a, []int{6} +} + +func (m *KeyInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KeyInfo.Unmarshal(m, b) +} +func (m *KeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KeyInfo.Marshal(b, m, deterministic) +} +func (m *KeyInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyInfo.Merge(m, src) +} +func (m *KeyInfo) XXX_Size() int { + return xxx_messageInfo_KeyInfo.Size(m) +} +func (m *KeyInfo) XXX_DiscardUnknown() { + xxx_messageInfo_KeyInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyInfo proto.InternalMessageInfo + +func (m *KeyInfo) GetKeyIdentifier() string { + if m != nil { + return m.KeyIdentifier + } + return "" +} + +func (m *KeyInfo) GetKeyMaterial() []byte { + if m != nil { + return m.KeyMaterial + } + return nil +} + +// FabricOUIdentifier represents an organizational unit and +// its related chain of trust identifier. +type FabricOUIdentifier struct { + // Certificate represents the second certificate in a certification chain. + // (Notice that the first certificate in a certification chain is supposed + // to be the certificate of an identity). + // It must correspond to the certificate of root or intermediate CA + // recognized by the MSP this message belongs to. + // Starting from this certificate, a certification chain is computed + // and bound to the OrganizationUnitIdentifier specified + Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"` + // OrganizationUnitIdentifier defines the organizational unit under the + // MSP identified with MSPIdentifier + OrganizationalUnitIdentifier string `protobuf:"bytes,2,opt,name=organizational_unit_identifier,json=organizationalUnitIdentifier,proto3" json:"organizational_unit_identifier,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FabricOUIdentifier) Reset() { *m = FabricOUIdentifier{} } +func (m *FabricOUIdentifier) String() string { return proto.CompactTextString(m) } +func (*FabricOUIdentifier) ProtoMessage() {} +func (*FabricOUIdentifier) Descriptor() ([]byte, []int) { + return fileDescriptor_9c34771f529d9d1a, []int{7} +} + +func (m *FabricOUIdentifier) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FabricOUIdentifier.Unmarshal(m, b) +} +func (m *FabricOUIdentifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FabricOUIdentifier.Marshal(b, m, deterministic) +} +func (m *FabricOUIdentifier) XXX_Merge(src proto.Message) { + xxx_messageInfo_FabricOUIdentifier.Merge(m, src) +} +func (m *FabricOUIdentifier) XXX_Size() int { + return xxx_messageInfo_FabricOUIdentifier.Size(m) +} +func (m *FabricOUIdentifier) XXX_DiscardUnknown() { + xxx_messageInfo_FabricOUIdentifier.DiscardUnknown(m) +} + +var xxx_messageInfo_FabricOUIdentifier proto.InternalMessageInfo + +func (m *FabricOUIdentifier) GetCertificate() []byte { + if m != nil { + return m.Certificate + } + return nil +} + +func (m *FabricOUIdentifier) GetOrganizationalUnitIdentifier() string { + if m != nil { + return m.OrganizationalUnitIdentifier + } + return "" +} + +// FabricNodeOUs contains configuration to tell apart clients from peers from orderers +// based on OUs. If NodeOUs recognition is enabled then an msp identity +// that does not contain any of the specified OU will be considered invalid. +type FabricNodeOUs struct { + // If true then an msp identity that does not contain any of the specified OU will be considered invalid. + Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` + // OU Identifier of the clients + ClientOuIdentifier *FabricOUIdentifier `protobuf:"bytes,2,opt,name=client_ou_identifier,json=clientOuIdentifier,proto3" json:"client_ou_identifier,omitempty"` + // OU Identifier of the peers + PeerOuIdentifier *FabricOUIdentifier `protobuf:"bytes,3,opt,name=peer_ou_identifier,json=peerOuIdentifier,proto3" json:"peer_ou_identifier,omitempty"` + // OU Identifier of the admins + AdminOuIdentifier *FabricOUIdentifier `protobuf:"bytes,4,opt,name=admin_ou_identifier,json=adminOuIdentifier,proto3" json:"admin_ou_identifier,omitempty"` + // OU Identifier of the orderers + OrdererOuIdentifier *FabricOUIdentifier `protobuf:"bytes,5,opt,name=orderer_ou_identifier,json=ordererOuIdentifier,proto3" json:"orderer_ou_identifier,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FabricNodeOUs) Reset() { *m = FabricNodeOUs{} } +func (m *FabricNodeOUs) String() string { return proto.CompactTextString(m) } +func (*FabricNodeOUs) ProtoMessage() {} +func (*FabricNodeOUs) Descriptor() ([]byte, []int) { + return fileDescriptor_9c34771f529d9d1a, []int{8} +} + +func (m *FabricNodeOUs) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FabricNodeOUs.Unmarshal(m, b) +} +func (m *FabricNodeOUs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FabricNodeOUs.Marshal(b, m, deterministic) +} +func (m *FabricNodeOUs) XXX_Merge(src proto.Message) { + xxx_messageInfo_FabricNodeOUs.Merge(m, src) +} +func (m *FabricNodeOUs) XXX_Size() int { + return xxx_messageInfo_FabricNodeOUs.Size(m) +} +func (m *FabricNodeOUs) XXX_DiscardUnknown() { + xxx_messageInfo_FabricNodeOUs.DiscardUnknown(m) +} + +var xxx_messageInfo_FabricNodeOUs proto.InternalMessageInfo + +func (m *FabricNodeOUs) GetEnable() bool { + if m != nil { + return m.Enable + } + return false +} + +func (m *FabricNodeOUs) GetClientOuIdentifier() *FabricOUIdentifier { + if m != nil { + return m.ClientOuIdentifier + } + return nil +} + +func (m *FabricNodeOUs) GetPeerOuIdentifier() *FabricOUIdentifier { + if m != nil { + return m.PeerOuIdentifier + } + return nil +} + +func (m *FabricNodeOUs) GetAdminOuIdentifier() *FabricOUIdentifier { + if m != nil { + return m.AdminOuIdentifier + } + return nil +} + +func (m *FabricNodeOUs) GetOrdererOuIdentifier() *FabricOUIdentifier { + if m != nil { + return m.OrdererOuIdentifier + } + return nil +} + +func init() { + proto.RegisterType((*MSPConfig)(nil), "msp.MSPConfig") + proto.RegisterType((*FabricMSPConfig)(nil), "msp.FabricMSPConfig") + proto.RegisterType((*FabricCryptoConfig)(nil), "msp.FabricCryptoConfig") + proto.RegisterType((*IdemixMSPConfig)(nil), "msp.IdemixMSPConfig") + proto.RegisterType((*IdemixMSPSignerConfig)(nil), "msp.IdemixMSPSignerConfig") + proto.RegisterType((*SigningIdentityInfo)(nil), "msp.SigningIdentityInfo") + proto.RegisterType((*KeyInfo)(nil), "msp.KeyInfo") + proto.RegisterType((*FabricOUIdentifier)(nil), "msp.FabricOUIdentifier") + proto.RegisterType((*FabricNodeOUs)(nil), "msp.FabricNodeOUs") +} + +func init() { proto.RegisterFile("msp/msp_config.proto", fileDescriptor_9c34771f529d9d1a) } + +var fileDescriptor_9c34771f529d9d1a = []byte{ + // 883 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xdb, 0x6e, 0x23, 0x45, + 0x13, 0x96, 0x8f, 0xbb, 0x2e, 0x8f, 0xed, 0x6c, 0xe7, 0xf0, 0x8f, 0x7e, 0xb1, 0xbb, 0x8e, 0x01, + 0x61, 0x09, 0xc5, 0x91, 0xb2, 0x48, 0x48, 0x88, 0xab, 0x0d, 0x2c, 0x0c, 0x4b, 0x48, 0xd4, 0x51, + 0x6e, 0xb8, 0x19, 0xb5, 0x67, 0xda, 0xe3, 0x96, 0x67, 0xba, 0x47, 0xdd, 0x3d, 0x2b, 0x8c, 0xb8, + 0xe6, 0x05, 0x78, 0x07, 0xae, 0x79, 0x13, 0x5e, 0x09, 0xf5, 0x21, 0xf6, 0x38, 0x89, 0x0c, 0x77, + 0x5d, 0x55, 0x5f, 0x7d, 0x53, 0xfd, 0x55, 0x55, 0x0f, 0x1c, 0x15, 0xaa, 0x3c, 0x2f, 0x54, 0x19, + 0x27, 0x82, 0x2f, 0x58, 0x36, 0x2b, 0xa5, 0xd0, 0x02, 0xb5, 0x0a, 0x55, 0x4e, 0xbe, 0x84, 0xde, + 0xd5, 0xed, 0xcd, 0xa5, 0xf5, 0x23, 0x04, 0x6d, 0xbd, 0x2e, 0x69, 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, 0xcf, + 0x9c, 0x9f, 0x91, 0xc1, 0x8a, 0xd6, 0x06, 0x0c, 0x9d, 0x42, 0x60, 0x60, 0x05, 0xd1, 0x54, 0x32, + 0x92, 0xfb, 0x3e, 0xf4, 0x57, 0x74, 0x7d, 0xe5, 0x5d, 0x93, 0xdf, 0xee, 0x97, 0xa1, 0xfe, 0x30, + 0xa0, 0x31, 0xf4, 0xcd, 0x12, 0xb2, 0x05, 0x4b, 0x88, 0xa6, 0xfe, 0x0a, 0x75, 0xd7, 0x7f, 0x68, + 0x64, 0xf3, 0xdf, 0x1b, 0x39, 0xf9, 0xbb, 0x09, 0x83, 0x9d, 0x65, 0x35, 0x4f, 0x2b, 0xe5, 0x64, + 0x9e, 0xbb, 0x8f, 0x3e, 0xc7, 0xde, 0x42, 0x11, 0x1c, 0x25, 0x39, 0x33, 0xad, 0x15, 0xd5, 0xc3, + 0xaf, 0xec, 0x79, 0xe1, 0x90, 0x4b, 0xba, 0xae, 0x6a, 0x97, 0xfb, 0x16, 0x50, 0x49, 0xa9, 0x7c, + 0x40, 0xd4, 0xda, 0x4f, 0x74, 0x60, 0x52, 0x76, 0x68, 0xbe, 0x83, 0x43, 0xfb, 0xec, 0x3f, 0xe0, + 0x69, 0xef, 0xe7, 0x79, 0x61, 0x73, 0x76, 0x88, 0xde, 0xc3, 0xb1, 0x90, 0x29, 0x95, 0x8f, 0x4a, + 0xea, 0xec, 0xa7, 0x3a, 0xf4, 0x59, 0x75, 0xb2, 0xb7, 0x73, 0x38, 0x15, 0x32, 0x9b, 0x2d, 0xd7, + 0x25, 0x95, 0x39, 0x4d, 0x33, 0x2a, 0x67, 0xee, 0xf9, 0x73, 0xbf, 0x5b, 0x65, 0xc8, 0xde, 0x1e, + 0x5c, 0xa9, 0xd2, 0x2d, 0xed, 0x0d, 0x49, 0x56, 0x24, 0xa3, 0x3f, 0x7f, 0x9e, 0x31, 0xbd, 0xac, + 0xe6, 0xb3, 0x44, 0x14, 0xe7, 0xb5, 0xdc, 0x73, 0x97, 0x7b, 0xe6, 0x72, 0xcf, 0x32, 0x61, 0xfe, + 0xdf, 0xf3, 0xae, 0x35, 0xdf, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0x42, 0x15, 0x49, 0x47, 0xd1, + 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/hyperledger/fabric-protos-go/msp/msp_principal.pb.go b/vendor/github.com/hyperledger/fabric-protos-go/msp/msp_principal.pb.go new file mode 100644 index 000000000..028c1a633 --- /dev/null +++ b/vendor/github.com/hyperledger/fabric-protos-go/msp/msp_principal.pb.go @@ -0,0 +1,451 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: msp/msp_principal.proto + +package msp + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type MSPPrincipal_Classification int32 + +const ( + MSPPrincipal_ROLE MSPPrincipal_Classification = 0 + // one of a member of MSP network, and the one of an + // administrator of an MSP network + MSPPrincipal_ORGANIZATION_UNIT MSPPrincipal_Classification = 1 + // groupping of entities, per MSP affiliation + // E.g., this can well be represented by an MSP's + // Organization unit + MSPPrincipal_IDENTITY MSPPrincipal_Classification = 2 + // identity + MSPPrincipal_ANONYMITY MSPPrincipal_Classification = 3 + // an identity to be anonymous or nominal. + MSPPrincipal_COMBINED MSPPrincipal_Classification = 4 +) + +var MSPPrincipal_Classification_name = map[int32]string{ + 0: "ROLE", + 1: "ORGANIZATION_UNIT", + 2: "IDENTITY", + 3: "ANONYMITY", + 4: "COMBINED", +} + +var MSPPrincipal_Classification_value = map[string]int32{ + "ROLE": 0, + "ORGANIZATION_UNIT": 1, + "IDENTITY": 2, + "ANONYMITY": 3, + "COMBINED": 4, +} + +func (x MSPPrincipal_Classification) String() string { + return proto.EnumName(MSPPrincipal_Classification_name, int32(x)) +} + +func (MSPPrincipal_Classification) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_82e08b7ead29bd48, []int{0, 0} +} + +type MSPRole_MSPRoleType int32 + +const ( + MSPRole_MEMBER MSPRole_MSPRoleType = 0 + MSPRole_ADMIN MSPRole_MSPRoleType = 1 + MSPRole_CLIENT MSPRole_MSPRoleType = 2 + MSPRole_PEER MSPRole_MSPRoleType = 3 + MSPRole_ORDERER MSPRole_MSPRoleType = 4 +) + +var MSPRole_MSPRoleType_name = map[int32]string{ + 0: "MEMBER", + 1: "ADMIN", + 2: "CLIENT", + 3: "PEER", + 4: "ORDERER", +} + +var MSPRole_MSPRoleType_value = map[string]int32{ + "MEMBER": 0, + "ADMIN": 1, + "CLIENT": 2, + "PEER": 3, + "ORDERER": 4, +} + +func (x MSPRole_MSPRoleType) String() string { + return proto.EnumName(MSPRole_MSPRoleType_name, int32(x)) +} + +func (MSPRole_MSPRoleType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_82e08b7ead29bd48, []int{2, 0} +} + +type MSPIdentityAnonymity_MSPIdentityAnonymityType int32 + +const ( + MSPIdentityAnonymity_NOMINAL MSPIdentityAnonymity_MSPIdentityAnonymityType = 0 + MSPIdentityAnonymity_ANONYMOUS MSPIdentityAnonymity_MSPIdentityAnonymityType = 1 +) + +var MSPIdentityAnonymity_MSPIdentityAnonymityType_name = map[int32]string{ + 0: "NOMINAL", + 1: "ANONYMOUS", +} + +var MSPIdentityAnonymity_MSPIdentityAnonymityType_value = map[string]int32{ + "NOMINAL": 0, + "ANONYMOUS": 1, +} + +func (x MSPIdentityAnonymity_MSPIdentityAnonymityType) String() string { + return proto.EnumName(MSPIdentityAnonymity_MSPIdentityAnonymityType_name, int32(x)) +} + +func (MSPIdentityAnonymity_MSPIdentityAnonymityType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_82e08b7ead29bd48, []int{3, 0} +} + +// MSPPrincipal aims to represent an MSP-centric set of identities. +// In particular, this structure allows for definition of +// - a group of identities that are member of the same MSP +// - a group of identities that are member of the same organization unit +// in the same MSP +// - a group of identities that are administering a specific MSP +// - a specific identity +// Expressing these groups is done given two fields of the fields below +// - Classification, that defines the type of classification of identities +// in an MSP this principal would be defined on; Classification can take +// three values: +// (i) ByMSPRole: that represents a classification of identities within +// MSP based on one of the two pre-defined MSP rules, "member" and "admin" +// (ii) ByOrganizationUnit: that represents a classification of identities +// within MSP based on the organization unit an identity belongs to +// (iii)ByIdentity that denotes that MSPPrincipal is mapped to a single +// identity/certificate; this would mean that the Principal bytes +// message +type MSPPrincipal struct { + // Classification describes the way that one should process + // Principal. An Classification value of "ByOrganizationUnit" reflects + // that "Principal" contains the name of an organization this MSP + // handles. A Classification value "ByIdentity" means that + // "Principal" contains a specific identity. Default value + // denotes that Principal contains one of the groups by + // default supported by all MSPs ("admin" or "member"). + PrincipalClassification MSPPrincipal_Classification `protobuf:"varint,1,opt,name=principal_classification,json=principalClassification,proto3,enum=common.MSPPrincipal_Classification" json:"principal_classification,omitempty"` + // Principal completes the policy principal definition. For the default + // principal types, Principal can be either "Admin" or "Member". + // For the ByOrganizationUnit/ByIdentity values of Classification, + // PolicyPrincipal acquires its value from an organization unit or + // identity, respectively. + // For the Combined Classification type, the Principal is a marshalled + // CombinedPrincipal. + Principal []byte `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MSPPrincipal) Reset() { *m = MSPPrincipal{} } +func (m *MSPPrincipal) String() string { return proto.CompactTextString(m) } +func (*MSPPrincipal) ProtoMessage() {} +func (*MSPPrincipal) Descriptor() ([]byte, []int) { + return fileDescriptor_82e08b7ead29bd48, []int{0} +} + +func (m *MSPPrincipal) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MSPPrincipal.Unmarshal(m, b) +} +func (m *MSPPrincipal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MSPPrincipal.Marshal(b, m, deterministic) +} +func (m *MSPPrincipal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MSPPrincipal.Merge(m, src) +} +func (m *MSPPrincipal) XXX_Size() int { + return xxx_messageInfo_MSPPrincipal.Size(m) +} +func (m *MSPPrincipal) XXX_DiscardUnknown() { + xxx_messageInfo_MSPPrincipal.DiscardUnknown(m) +} + +var xxx_messageInfo_MSPPrincipal proto.InternalMessageInfo + +func (m *MSPPrincipal) GetPrincipalClassification() MSPPrincipal_Classification { + if m != nil { + return m.PrincipalClassification + } + return MSPPrincipal_ROLE +} + +func (m *MSPPrincipal) GetPrincipal() []byte { + if m != nil { + return m.Principal + } + return nil +} + +// OrganizationUnit governs the organization of the Principal +// field of a policy principal when a specific organization unity members +// are to be defined within a policy principal. +type OrganizationUnit struct { + // MSPIdentifier represents the identifier of the MSP this organization unit + // refers to + MspIdentifier string `protobuf:"bytes,1,opt,name=msp_identifier,json=mspIdentifier,proto3" json:"msp_identifier,omitempty"` + // OrganizationUnitIdentifier defines the organizational unit under the + // MSP identified with MSPIdentifier + OrganizationalUnitIdentifier string `protobuf:"bytes,2,opt,name=organizational_unit_identifier,json=organizationalUnitIdentifier,proto3" json:"organizational_unit_identifier,omitempty"` + // CertifiersIdentifier is the hash of certificates chain of trust + // related to this organizational unit + CertifiersIdentifier []byte `protobuf:"bytes,3,opt,name=certifiers_identifier,json=certifiersIdentifier,proto3" json:"certifiers_identifier,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrganizationUnit) Reset() { *m = OrganizationUnit{} } +func (m *OrganizationUnit) String() string { return proto.CompactTextString(m) } +func (*OrganizationUnit) ProtoMessage() {} +func (*OrganizationUnit) Descriptor() ([]byte, []int) { + return fileDescriptor_82e08b7ead29bd48, []int{1} +} + +func (m *OrganizationUnit) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrganizationUnit.Unmarshal(m, b) +} +func (m *OrganizationUnit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OrganizationUnit.Marshal(b, m, deterministic) +} +func (m *OrganizationUnit) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrganizationUnit.Merge(m, src) +} +func (m *OrganizationUnit) XXX_Size() int { + return xxx_messageInfo_OrganizationUnit.Size(m) +} +func (m *OrganizationUnit) XXX_DiscardUnknown() { + xxx_messageInfo_OrganizationUnit.DiscardUnknown(m) +} + +var xxx_messageInfo_OrganizationUnit proto.InternalMessageInfo + +func (m *OrganizationUnit) GetMspIdentifier() string { + if m != nil { + return m.MspIdentifier + } + return "" +} + +func (m *OrganizationUnit) GetOrganizationalUnitIdentifier() string { + if m != nil { + return m.OrganizationalUnitIdentifier + } + return "" +} + +func (m *OrganizationUnit) GetCertifiersIdentifier() []byte { + if m != nil { + return m.CertifiersIdentifier + } + return nil +} + +// MSPRole governs the organization of the Principal +// field of an MSPPrincipal when it aims to define one of the +// two dedicated roles within an MSP: Admin and Members. +type MSPRole struct { + // MSPIdentifier represents the identifier of the MSP this principal + // refers to + MspIdentifier string `protobuf:"bytes,1,opt,name=msp_identifier,json=mspIdentifier,proto3" json:"msp_identifier,omitempty"` + // MSPRoleType defines which of the available, pre-defined MSP-roles + // an identiy should posess inside the MSP with identifier MSPidentifier + Role MSPRole_MSPRoleType `protobuf:"varint,2,opt,name=role,proto3,enum=common.MSPRole_MSPRoleType" json:"role,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MSPRole) Reset() { *m = MSPRole{} } +func (m *MSPRole) String() string { return proto.CompactTextString(m) } +func (*MSPRole) ProtoMessage() {} +func (*MSPRole) Descriptor() ([]byte, []int) { + return fileDescriptor_82e08b7ead29bd48, []int{2} +} + +func (m *MSPRole) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MSPRole.Unmarshal(m, b) +} +func (m *MSPRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MSPRole.Marshal(b, m, deterministic) +} +func (m *MSPRole) XXX_Merge(src proto.Message) { + xxx_messageInfo_MSPRole.Merge(m, src) +} +func (m *MSPRole) XXX_Size() int { + return xxx_messageInfo_MSPRole.Size(m) +} +func (m *MSPRole) XXX_DiscardUnknown() { + xxx_messageInfo_MSPRole.DiscardUnknown(m) +} + +var xxx_messageInfo_MSPRole proto.InternalMessageInfo + +func (m *MSPRole) GetMspIdentifier() string { + if m != nil { + return m.MspIdentifier + } + return "" +} + +func (m *MSPRole) GetRole() MSPRole_MSPRoleType { + if m != nil { + return m.Role + } + return MSPRole_MEMBER +} + +// MSPIdentityAnonymity can be used to enforce an identity to be anonymous or nominal. +type MSPIdentityAnonymity struct { + AnonymityType MSPIdentityAnonymity_MSPIdentityAnonymityType `protobuf:"varint,1,opt,name=anonymity_type,json=anonymityType,proto3,enum=common.MSPIdentityAnonymity_MSPIdentityAnonymityType" json:"anonymity_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MSPIdentityAnonymity) Reset() { *m = MSPIdentityAnonymity{} } +func (m *MSPIdentityAnonymity) String() string { return proto.CompactTextString(m) } +func (*MSPIdentityAnonymity) ProtoMessage() {} +func (*MSPIdentityAnonymity) Descriptor() ([]byte, []int) { + return fileDescriptor_82e08b7ead29bd48, []int{3} +} + +func (m *MSPIdentityAnonymity) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MSPIdentityAnonymity.Unmarshal(m, b) +} +func (m *MSPIdentityAnonymity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MSPIdentityAnonymity.Marshal(b, m, deterministic) +} +func (m *MSPIdentityAnonymity) XXX_Merge(src proto.Message) { + xxx_messageInfo_MSPIdentityAnonymity.Merge(m, src) +} +func (m *MSPIdentityAnonymity) XXX_Size() int { + return xxx_messageInfo_MSPIdentityAnonymity.Size(m) +} +func (m *MSPIdentityAnonymity) XXX_DiscardUnknown() { + xxx_messageInfo_MSPIdentityAnonymity.DiscardUnknown(m) +} + +var xxx_messageInfo_MSPIdentityAnonymity proto.InternalMessageInfo + +func (m *MSPIdentityAnonymity) GetAnonymityType() MSPIdentityAnonymity_MSPIdentityAnonymityType { + if m != nil { + return m.AnonymityType + } + return MSPIdentityAnonymity_NOMINAL +} + +// CombinedPrincipal governs the organization of the Principal +// field of a policy principal when principal_classification has +// indicated that a combined form of principals is required +type CombinedPrincipal struct { + // Principals refer to combined principals + Principals []*MSPPrincipal `protobuf:"bytes,1,rep,name=principals,proto3" json:"principals,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CombinedPrincipal) Reset() { *m = CombinedPrincipal{} } +func (m *CombinedPrincipal) String() string { return proto.CompactTextString(m) } +func (*CombinedPrincipal) ProtoMessage() {} +func (*CombinedPrincipal) Descriptor() ([]byte, []int) { + return fileDescriptor_82e08b7ead29bd48, []int{4} +} + +func (m *CombinedPrincipal) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CombinedPrincipal.Unmarshal(m, b) +} +func (m *CombinedPrincipal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CombinedPrincipal.Marshal(b, m, deterministic) +} +func (m *CombinedPrincipal) XXX_Merge(src proto.Message) { + xxx_messageInfo_CombinedPrincipal.Merge(m, src) +} +func (m *CombinedPrincipal) XXX_Size() int { + return xxx_messageInfo_CombinedPrincipal.Size(m) +} +func (m *CombinedPrincipal) XXX_DiscardUnknown() { + xxx_messageInfo_CombinedPrincipal.DiscardUnknown(m) +} + +var xxx_messageInfo_CombinedPrincipal proto.InternalMessageInfo + +func (m *CombinedPrincipal) GetPrincipals() []*MSPPrincipal { + if m != nil { + return m.Principals + } + return nil +} + +func init() { + proto.RegisterEnum("common.MSPPrincipal_Classification", MSPPrincipal_Classification_name, MSPPrincipal_Classification_value) + proto.RegisterEnum("common.MSPRole_MSPRoleType", MSPRole_MSPRoleType_name, MSPRole_MSPRoleType_value) + proto.RegisterEnum("common.MSPIdentityAnonymity_MSPIdentityAnonymityType", MSPIdentityAnonymity_MSPIdentityAnonymityType_name, MSPIdentityAnonymity_MSPIdentityAnonymityType_value) + proto.RegisterType((*MSPPrincipal)(nil), "common.MSPPrincipal") + proto.RegisterType((*OrganizationUnit)(nil), "common.OrganizationUnit") + proto.RegisterType((*MSPRole)(nil), "common.MSPRole") + proto.RegisterType((*MSPIdentityAnonymity)(nil), "common.MSPIdentityAnonymity") + proto.RegisterType((*CombinedPrincipal)(nil), "common.CombinedPrincipal") +} + +func init() { proto.RegisterFile("msp/msp_principal.proto", fileDescriptor_82e08b7ead29bd48) } + +var fileDescriptor_82e08b7ead29bd48 = []byte{ + // 528 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x5f, 0x6b, 0xdb, 0x3e, + 0x14, 0xad, 0x93, 0xfc, 0xda, 0xe6, 0xe6, 0x0f, 0xaa, 0x48, 0x69, 0xe0, 0x57, 0x46, 0xf0, 0x36, + 0x08, 0x8c, 0x3a, 0x90, 0x6e, 0x7b, 0x77, 0x12, 0x53, 0x0c, 0xb1, 0x1c, 0x14, 0xe7, 0xa1, 0xa5, + 0x2c, 0x38, 0x8e, 0x92, 0x0a, 0x6c, 0xcb, 0xd8, 0xee, 0x83, 0xf7, 0x91, 0xc6, 0x1e, 0xf7, 0xa9, + 0xf6, 0x29, 0x86, 0xed, 0x26, 0x51, 0xb6, 0x0e, 0xf6, 0x64, 0xce, 0xbd, 0xe7, 0x1c, 0x1f, 0x49,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, 0x3e, 0xec, 0xc0, 0x47, + 0x80, 0xfd, 0x48, 0x26, 0x5d, 0xa5, 0x57, 0xed, 0x37, 0x86, 0x9d, 0xd7, 0xa6, 0x9e, 0x4a, 0xbc, + 0xd1, 0x1c, 0xde, 0x89, 0x78, 0xab, 0x3d, 0x65, 0x11, 0x8b, 0x7d, 0xb6, 0xde, 0xb2, 0x58, 0xdb, + 0xb8, 0xab, 0x98, 0x7b, 0xe5, 0xca, 0x25, 0x2f, 0x06, 0x0f, 0x1f, 0xb6, 0x3c, 0x7d, 0x7a, 0x5e, + 0xe5, 0x70, 0x20, 0x91, 0x07, 0x25, 0xf9, 0xa6, 0x24, 0xdf, 0x6c, 0x45, 0xbe, 0xb7, 0xab, 0xd3, + 0x02, 0xde, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x94, 0x15, 0xa2, 0xc9, 0x03, 0x00, 0x00, +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4b3b2a892..07a3a5b1a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -147,6 +147,9 @@ github.com/hyperledger/fabric-amcl/core/FP256BN # github.com/hyperledger/fabric-lib-go v1.0.0 ## explicit github.com/hyperledger/fabric-lib-go/healthz +# github.com/hyperledger/fabric-protos-go v0.0.0-20210911123859-041d13f0980c +## explicit; go 1.12 +github.com/hyperledger/fabric-protos-go/msp # github.com/inconshreveable/mousetrap v1.0.0 ## explicit github.com/inconshreveable/mousetrap