certstore

package
v0.0.0-...-f6121d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SANsForIPs

func SANsForIPs(s string, ips ...string) cert.AltNames

func SANsForNames

func SANsForNames(s string, names ...string) cert.AltNames

Types

type CertStore

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

func NewCertStore

func NewCertStore(fs afero.Fs, dir string, organization ...string) (*CertStore, error)

func (*CertStore) CACert

func (s *CertStore) CACert() *x509.Certificate

func (*CertStore) CACertBytes

func (s *CertStore) CACertBytes() []byte

func (*CertStore) CAKey

func (s *CertStore) CAKey() *rsa.PrivateKey

func (*CertStore) CAKeyBytes

func (s *CertStore) CAKeyBytes() []byte

func (*CertStore) CAName

func (s *CertStore) CAName() string

func (*CertStore) CertFile

func (s *CertStore) CertFile(name string) string

func (*CertStore) InitCA

func (s *CertStore) InitCA(prefix ...string) error

func (*CertStore) IsExists

func (s *CertStore) IsExists(name string, prefix ...string) bool

func (*CertStore) KeyFile

func (s *CertStore) KeyFile(name string) string

func (*CertStore) LoadCA

func (s *CertStore) LoadCA(prefix ...string) error

func (*CertStore) Location

func (s *CertStore) Location() string

func (*CertStore) NewCA

func (s *CertStore) NewCA(prefix ...string) error

func (*CertStore) NewClientCertPair

func (s *CertStore) NewClientCertPair(sans cert.AltNames, organization ...string) (*x509.Certificate, *rsa.PrivateKey, error)

func (*CertStore) NewClientCertPairBytes

func (s *CertStore) NewClientCertPairBytes(sans cert.AltNames, organization ...string) ([]byte, []byte, error)

func (*CertStore) NewHostCertPair

func (s *CertStore) NewHostCertPair() (*x509.Certificate, *rsa.PrivateKey, error)

func (*CertStore) NewHostCertPairBytes

func (s *CertStore) NewHostCertPairBytes() ([]byte, []byte, error)

func (*CertStore) NewPeerCertPair

func (s *CertStore) NewPeerCertPair(sans cert.AltNames) (*x509.Certificate, *rsa.PrivateKey, error)

NewPeerCertPair is used to create cert pair that can serve as both server and client. This is used to issue peer certificates for etcd.

func (*CertStore) NewPeerCertPairBytes

func (s *CertStore) NewPeerCertPairBytes(sans cert.AltNames) ([]byte, []byte, error)

func (*CertStore) NewServerCertPair

func (s *CertStore) NewServerCertPair(sans cert.AltNames) (*x509.Certificate, *rsa.PrivateKey, error)

func (*CertStore) NewServerCertPairBytes

func (s *CertStore) NewServerCertPairBytes(sans cert.AltNames) ([]byte, []byte, error)

func (*CertStore) PairExists

func (s *CertStore) PairExists(name string, prefix ...string) bool

func (*CertStore) Read

func (s *CertStore) Read(name string) (*x509.Certificate, *rsa.PrivateKey, error)

func (*CertStore) ReadBytes

func (s *CertStore) ReadBytes(name string) ([]byte, []byte, error)

func (*CertStore) SetCA

func (s *CertStore) SetCA(crtBytes, keyBytes []byte) error

func (*CertStore) Write

func (s *CertStore) Write(name string, crt *x509.Certificate, key *rsa.PrivateKey) error

func (*CertStore) WriteBytes

func (s *CertStore) WriteBytes(name string, crt, key []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL