fabric: github.com/hyperledger/fabric/common/crypto/tlsgen Index | Files

package tlsgen

import "github.com/hyperledger/fabric/common/crypto/tlsgen"


Package Files

ca.go key.go

type CA Uses

type CA interface {
    // CertBytes returns the certificate of the CA in PEM encoding
    CertBytes() []byte

    NewIntermediateCA() (CA, error)

    // newCertKeyPair returns a certificate and private key pair and nil,
    // or nil, error in case of failure
    // The certificate is signed by the CA and is used for TLS client authentication
    NewClientCertKeyPair() (*CertKeyPair, error)

    // NewServerCertKeyPair returns a CertKeyPair and nil,
    // with a given custom SAN.
    // The certificate is signed by the CA.
    // Returns nil, error in case of failure
    NewServerCertKeyPair(host string) (*CertKeyPair, error)

CA defines a certificate authority that can generate certificates signed by it

func NewCA Uses

func NewCA() (CA, error)

type CertKeyPair Uses

type CertKeyPair struct {
    // Cert is the certificate, PEM encoded
    Cert []byte
    // Key is the key corresponding to the certificate, PEM encoded
    Key []byte

    TLSCert *x509.Certificate

CertKeyPair denotes a TLS certificate and corresponding key, both PEM encoded

Package tlsgen imports 11 packages (graph) and is imported by 7 packages. Updated 2020-07-15. Refresh now. Tools for package owners.