pachyderm: github.com/pachyderm/pachyderm/src/server/pkg/cert Index | Files

package cert

import "github.com/pachyderm/pachyderm/src/server/pkg/cert"

Index

Package Files

cert.go logging_conn.go

func GenerateSelfSignedCert Uses

func GenerateSelfSignedCert(address string, name *pkix.Name, ipAddresses ...string) (*tls.Certificate, error)

GenerateSelfSignedCert generates a self-signed TLS cert for the domain name 'address', with a private key. Other attributes of the subject can be set in 'name' and ip addresses can be set in 'ipAddresses'

func KeyToPEM Uses

func KeyToPEM(cert *tls.Certificate) []byte

KeyToPEM serializes the private key in 'cert' to a PEM-formatted block if it's an RSA key, or nil otherwise (all certs returned by GenerateSelfSignedCert use RSA keys)

func PublicCertToPEM Uses

func PublicCertToPEM(cert *tls.Certificate) []byte

PublicCertToPEM serializes the public x509 cert in 'cert' to a PEM-formatted block

type TestListener Uses

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

TestListener implements the net.Listener interface, returning loggingConns

func NewTestListener Uses

func NewTestListener() *TestListener

NewTestListener initializes and returns a new TestListener. To create a new connection that that this Listener will serve on, call Dial(). To see the logged communication over that connection's pipe, see ClientToServerLog and ServerToClientLog

func (*TestListener) Accept Uses

func (l *TestListener) Accept() (net.Conn, error)

Accept implements the corresponding method of net.Listener for TestListener

func (*TestListener) Addr Uses

func (l *TestListener) Addr() net.Addr

Addr implements the corresponding method of net.Listener for TestListener

func (*TestListener) ClientToServerLog Uses

func (l *TestListener) ClientToServerLog() []byte

ClientToServerLog returns the log of client -> server communication over the first (and only) connection spawned by this listener

func (*TestListener) Close Uses

func (l *TestListener) Close() error

Close implements the corresponding method of net.Listener for TestListener. Any blocked Accept operations will be unblocked and return errors.

func (*TestListener) Dial Uses

func (l *TestListener) Dial(context.Context, string, string) (net.Conn, error)

Dial initializes a new connection and releases a blocked call to Accept()

func (*TestListener) ServerToClientLog Uses

func (l *TestListener) ServerToClientLog() []byte

ServerToClientLog the log of server -> client communication over the first (and only) connection spawned by this listener

Package cert imports 16 packages (graph) and is imported by 1 packages. Updated 2019-05-16. Refresh now. Tools for package owners.