fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/client/credential/x509 Index | Files

package x509

import "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/client/credential/x509"

Index

Package Files

credential.go signer.go

Constants

const (
    // CredType is the string that represents X509 credential type
    CredType = "X509"
)

type Client Uses

type Client interface {
    NewX509Identity(name string, creds []credential.Credential) Identity
    GetCSP() core.CryptoSuite
}

Client represents a client that will load/store an Idemix credential

type Credential Uses

type Credential struct {
    // contains filtered or unexported fields
}

Credential represents a X509 credential. Implements Credential interface

func NewCredential Uses

func NewCredential(keyFile core.Key, certFile []byte, c Client) *Credential

NewCredential is constructor for X509 Credential

func (*Credential) CreateToken Uses

func (cred *Credential) CreateToken(req *http.Request, reqBody []byte, fabCACompatibilityMode bool) (string, error)

CreateToken creates token based on this X509 credential

func (*Credential) EnrollmentID Uses

func (cred *Credential) EnrollmentID() (string, error)

EnrollmentID returns enrollment ID of this X509 credential

func (*Credential) Load Uses

func (cred *Credential) Load() error

Load loads the certificate and key from the location specified by certFile attribute using the BCCSP of the client. The private key is loaded from the location specified by the keyFile attribute, if the private key is not found in the keystore managed by BCCSP

func (*Credential) RevokeSelf Uses

func (cred *Credential) RevokeSelf() (*api.RevocationResponse, error)

RevokeSelf revokes this X509 credential

func (*Credential) SetVal Uses

func (cred *Credential) SetVal(val interface{}) error

SetVal sets *Signer for this X509 credential

func (*Credential) Store Uses

func (cred *Credential) Store() error

Store stores the certificate associated with this X509 credential to the location specified by certFile attribute

func (*Credential) Type Uses

func (cred *Credential) Type() string

Type returns X509

func (*Credential) Val Uses

func (cred *Credential) Val() (interface{}, error)

Val returns *Signer associated with this X509 credential

type Identity Uses

type Identity interface {
    Revoke(req *api.RevocationRequest) (*api.RevocationResponse, error)
}

Identity represents an identity

type Signer Uses

type Signer struct {
    // contains filtered or unexported fields
}

Signer represents a signer Each identity may have multiple signers, currently one ecert and multiple tcerts

func NewSigner Uses

func NewSigner(key core.Key, cert []byte) (*Signer, error)

NewSigner is constructor for Signer

func (*Signer) Attributes Uses

func (s *Signer) Attributes() (*attrmgr.Attributes, error)

Attributes returns the attributes that are in the certificate

func (*Signer) Cert Uses

func (s *Signer) Cert() []byte

Cert returns the cert bytes of this signer

func (*Signer) GetName Uses

func (s *Signer) GetName() string

GetName returns common name that is retrieved from the Subject of the certificate associated with this signer

func (*Signer) GetX509Cert Uses

func (s *Signer) GetX509Cert() *x509.Certificate

GetX509Cert returns the X509 certificate for this signer

func (*Signer) Key Uses

func (s *Signer) Key() core.Key

Key returns the key bytes of this signer

Package x509 imports 12 packages (graph) and is imported by 2 packages. Updated 2019-04-16. Refresh now. Tools for package owners.