Documentation ¶
Index ¶
- func SANsForIPs(s string, ips ...string) cert.AltNames
- func SANsForNames(s string, names ...string) cert.AltNames
- type CertStore
- func (s *CertStore) CACert() *x509.Certificate
- func (s *CertStore) CACertBytes() []byte
- func (s *CertStore) CAKey() *rsa.PrivateKey
- func (s *CertStore) CAKeyBytes() []byte
- func (s *CertStore) CAName() string
- func (s *CertStore) CertFile(name string) string
- func (s *CertStore) InitCA(prefix ...string) error
- func (s *CertStore) IsExists(name string, prefix ...string) bool
- func (s *CertStore) KeyFile(name string) string
- func (s *CertStore) LoadCA(prefix ...string) error
- func (s *CertStore) Location() string
- func (s *CertStore) NewCA(prefix ...string) error
- func (s *CertStore) NewClientCertPair(sans cert.AltNames, organization ...string) (*x509.Certificate, *rsa.PrivateKey, error)
- func (s *CertStore) NewClientCertPairBytes(sans cert.AltNames, organization ...string) ([]byte, []byte, error)
- func (s *CertStore) NewHostCertPair() (*x509.Certificate, *rsa.PrivateKey, error)
- func (s *CertStore) NewHostCertPairBytes() ([]byte, []byte, error)
- func (s *CertStore) NewPeerCertPair(sans cert.AltNames) (*x509.Certificate, *rsa.PrivateKey, error)
- func (s *CertStore) NewPeerCertPairBytes(sans cert.AltNames) ([]byte, []byte, error)
- func (s *CertStore) NewServerCertPair(sans cert.AltNames) (*x509.Certificate, *rsa.PrivateKey, error)
- func (s *CertStore) NewServerCertPairBytes(sans cert.AltNames) ([]byte, []byte, error)
- func (s *CertStore) PairExists(name string, prefix ...string) bool
- func (s *CertStore) Read(name string) (*x509.Certificate, *rsa.PrivateKey, error)
- func (s *CertStore) ReadBytes(name string) ([]byte, []byte, error)
- func (s *CertStore) SetCA(crtBytes, keyBytes []byte) error
- func (s *CertStore) Write(name string, crt *x509.Certificate, key *rsa.PrivateKey) error
- func (s *CertStore) WriteBytes(name string, crt, key []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CertStore ¶
type CertStore struct {
// contains filtered or unexported fields
}
func NewCertStore ¶
func (*CertStore) CACert ¶
func (s *CertStore) CACert() *x509.Certificate
func (*CertStore) CACertBytes ¶
func (*CertStore) CAKey ¶
func (s *CertStore) CAKey() *rsa.PrivateKey
func (*CertStore) CAKeyBytes ¶
func (*CertStore) NewClientCertPair ¶
func (s *CertStore) NewClientCertPair(sans cert.AltNames, organization ...string) (*x509.Certificate, *rsa.PrivateKey, error)
func (*CertStore) NewClientCertPairBytes ¶
func (*CertStore) NewHostCertPair ¶
func (s *CertStore) NewHostCertPair() (*x509.Certificate, *rsa.PrivateKey, error)
func (*CertStore) NewHostCertPairBytes ¶
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 (*CertStore) NewServerCertPair ¶
func (s *CertStore) NewServerCertPair(sans cert.AltNames) (*x509.Certificate, *rsa.PrivateKey, error)
func (*CertStore) NewServerCertPairBytes ¶
func (*CertStore) Read ¶
func (s *CertStore) Read(name string) (*x509.Certificate, *rsa.PrivateKey, error)
func (*CertStore) Write ¶
func (s *CertStore) Write(name string, crt *x509.Certificate, key *rsa.PrivateKey) error
Click to show internal directories.
Click to hide internal directories.