certstore

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 17

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 New added in v1.1.1

func New(fs blobfs.Interface, dir string, duration time.Duration, organization ...string) *CertStore

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) GetServerCertPair added in v1.6.0

func (cs *CertStore) GetServerCertPair(name string, sans cert.AltNames) (*x509.Certificate, *rsa.PrivateKey, error)

func (*CertStore) GetServerCertPairBytes added in v1.6.0

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

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