Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 541f496

Browse files
committed
[FAB-6285] Fabric-CA vendoring: remove tcerts
Change-Id: Ia22b6795cabec28538ce5d2316202839ee346db2 Signed-off-by: Troy Ronda <troy.ronda@securekey.com>
1 parent b346b71 commit 541f496

File tree

9 files changed

+128
-918
lines changed

9 files changed

+128
-918
lines changed

internal/github.com/hyperledger/fabric-ca/api/client.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ limitations under the License.
1717
package api
1818

1919
import (
20-
"time"
21-
2220
"github.com/cloudflare/cfssl/csr"
23-
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/tcert"
2421
)
2522

2623
// RegistrationRequest for a new identity
@@ -103,34 +100,6 @@ type RevocationRequest struct {
103100
CAName string `json:"caname,omitempty" skip:"true"`
104101
}
105102

106-
// GetTCertBatchRequest is input provided to identity.GetTCertBatch
107-
type GetTCertBatchRequest struct {
108-
// Number of TCerts in the batch.
109-
Count int `json:"count"`
110-
// The attribute names whose names and values are to be sealed in the issued TCerts.
111-
AttrNames []string `json:"attr_names,omitempty"`
112-
// EncryptAttrs denotes whether to encrypt attribute values or not.
113-
// When set to true, each issued TCert in the batch will contain encrypted attribute values.
114-
EncryptAttrs bool `json:"encrypt_attrs,omitempty"`
115-
// Certificate Validity Period. If specified, the value used
116-
// is the minimum of this value and the configured validity period
117-
// of the TCert manager.
118-
ValidityPeriod time.Duration `json:"validity_period,omitempty"`
119-
// The pre-key to be used for key derivation.
120-
PreKey string `json:"prekey"`
121-
// DisableKeyDerivation if true disables key derivation so that a TCert is not
122-
// cryptographically related to an ECert. This may be necessary when using an
123-
// HSM which does not support the TCert's key derivation function.
124-
DisableKeyDerivation bool `json:"disable_kdf,omitempty"`
125-
// CAName is the name of the CA to connect to
126-
CAName string `json:"caname,omitempty" skip:"true"`
127-
}
128-
129-
// GetTCertBatchResponse is the return value of identity.GetTCertBatch
130-
type GetTCertBatchResponse struct {
131-
tcert.GetBatchResponse
132-
}
133-
134103
// GetCAInfoRequest is request to get generic CA information
135104
type GetCAInfoRequest struct {
136105
CAName string `json:"caname,omitempty" skip:"true"`

internal/github.com/hyperledger/fabric-ca/api/net.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package api
1818

1919
import (
2020
"github.com/cloudflare/cfssl/signer"
21-
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/tcert"
2221
)
2322

2423
/*
@@ -60,20 +59,6 @@ type RevocationRequestNet struct {
6059
RevocationRequest
6160
}
6261

63-
// GetTCertBatchRequestNet is a network request for a batch of transaction certificates
64-
type GetTCertBatchRequestNet struct {
65-
GetTCertBatchRequest
66-
// KeySigs is an optional array of public keys and corresponding signatures.
67-
// If not set, the server generates it's own keys based on a key derivation function
68-
// which cryptographically relates the TCerts to an ECert.
69-
KeySigs []KeySig `json:"key_sigs,omitempty"`
70-
}
71-
72-
// GetTCertBatchResponseNet is the network response for a batch of transaction certificates
73-
type GetTCertBatchResponseNet struct {
74-
tcert.GetBatchResponse
75-
}
76-
7762
// KeySig is a public key, signature, and signature algorithm tuple
7863
type KeySig struct {
7964
// Key is a public key

internal/github.com/hyperledger/fabric-ca/lib/identity.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,6 @@ func (i *Identity) GetECert() *Signer {
6363
return i.ecert
6464
}
6565

66-
// GetTCertBatch returns a batch of TCerts for this identity
67-
func (i *Identity) GetTCertBatch(req *api.GetTCertBatchRequest) ([]*Signer, error) {
68-
reqBody, err := util.Marshal(req, "GetTCertBatchRequest")
69-
if err != nil {
70-
return nil, err
71-
}
72-
err = i.Post("tcert", reqBody, nil)
73-
if err != nil {
74-
return nil, err
75-
}
76-
// Ignore the contents of the response for now. They will be processed in the future when we need to
77-
// support the Go SDK. We currently have Node and Java SDKs which process this and they are the
78-
// priority.
79-
return nil, nil
80-
}
81-
8266
// Register registers a new identity
8367
// @param req The registration request
8468
func (i *Identity) Register(req *api.RegistrationRequest) (rr *api.RegistrationResponse, err error) {

internal/github.com/hyperledger/fabric-ca/lib/tcert/api.go

Lines changed: 0 additions & 68 deletions
This file was deleted.

internal/github.com/hyperledger/fabric-ca/lib/tcert/keytree.go

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)