Skip to content

Commit

Permalink
[FAB-6285] Fabric-CA vendoring: remove tcerts
Browse files Browse the repository at this point in the history
Change-Id: Ia22b6795cabec28538ce5d2316202839ee346db2
Signed-off-by: Troy Ronda <[email protected]>
  • Loading branch information
troyronda committed Sep 25, 2017
1 parent b346b71 commit 541f496
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 918 deletions.
31 changes: 0 additions & 31 deletions internal/github.com/hyperledger/fabric-ca/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ limitations under the License.
package api

import (
"time"

"github.com/cloudflare/cfssl/csr"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/tcert"
)

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

// GetTCertBatchRequest is input provided to identity.GetTCertBatch
type GetTCertBatchRequest struct {
// Number of TCerts in the batch.
Count int `json:"count"`
// The attribute names whose names and values are to be sealed in the issued TCerts.
AttrNames []string `json:"attr_names,omitempty"`
// EncryptAttrs denotes whether to encrypt attribute values or not.
// When set to true, each issued TCert in the batch will contain encrypted attribute values.
EncryptAttrs bool `json:"encrypt_attrs,omitempty"`
// Certificate Validity Period. If specified, the value used
// is the minimum of this value and the configured validity period
// of the TCert manager.
ValidityPeriod time.Duration `json:"validity_period,omitempty"`
// The pre-key to be used for key derivation.
PreKey string `json:"prekey"`
// DisableKeyDerivation if true disables key derivation so that a TCert is not
// cryptographically related to an ECert. This may be necessary when using an
// HSM which does not support the TCert's key derivation function.
DisableKeyDerivation bool `json:"disable_kdf,omitempty"`
// CAName is the name of the CA to connect to
CAName string `json:"caname,omitempty" skip:"true"`
}

// GetTCertBatchResponse is the return value of identity.GetTCertBatch
type GetTCertBatchResponse struct {
tcert.GetBatchResponse
}

// GetCAInfoRequest is request to get generic CA information
type GetCAInfoRequest struct {
CAName string `json:"caname,omitempty" skip:"true"`
Expand Down
15 changes: 0 additions & 15 deletions internal/github.com/hyperledger/fabric-ca/api/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package api

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

/*
Expand Down Expand Up @@ -60,20 +59,6 @@ type RevocationRequestNet struct {
RevocationRequest
}

// GetTCertBatchRequestNet is a network request for a batch of transaction certificates
type GetTCertBatchRequestNet struct {
GetTCertBatchRequest
// KeySigs is an optional array of public keys and corresponding signatures.
// If not set, the server generates it's own keys based on a key derivation function
// which cryptographically relates the TCerts to an ECert.
KeySigs []KeySig `json:"key_sigs,omitempty"`
}

// GetTCertBatchResponseNet is the network response for a batch of transaction certificates
type GetTCertBatchResponseNet struct {
tcert.GetBatchResponse
}

// KeySig is a public key, signature, and signature algorithm tuple
type KeySig struct {
// Key is a public key
Expand Down
16 changes: 0 additions & 16 deletions internal/github.com/hyperledger/fabric-ca/lib/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,6 @@ func (i *Identity) GetECert() *Signer {
return i.ecert
}

// GetTCertBatch returns a batch of TCerts for this identity
func (i *Identity) GetTCertBatch(req *api.GetTCertBatchRequest) ([]*Signer, error) {
reqBody, err := util.Marshal(req, "GetTCertBatchRequest")
if err != nil {
return nil, err
}
err = i.Post("tcert", reqBody, nil)
if err != nil {
return nil, err
}
// Ignore the contents of the response for now. They will be processed in the future when we need to
// support the Go SDK. We currently have Node and Java SDKs which process this and they are the
// priority.
return nil, nil
}

// Register registers a new identity
// @param req The registration request
func (i *Identity) Register(req *api.RegistrationRequest) (rr *api.RegistrationResponse, err error) {
Expand Down
68 changes: 0 additions & 68 deletions internal/github.com/hyperledger/fabric-ca/lib/tcert/api.go

This file was deleted.

94 changes: 0 additions & 94 deletions internal/github.com/hyperledger/fabric-ca/lib/tcert/keytree.go

This file was deleted.

Loading

0 comments on commit 541f496

Please sign in to comment.