Documentation
¶
Index ¶
- func CertsFromPEM(pemCerts []byte) ([]*x509.Certificate, error)
- func IPAddressesDNSNames(hosts []string) ([]net.IP, []string)
- func NewKeyPair() (crypto.PublicKey, crypto.PrivateKey, error)
- type CA
- func (ca *CA) EnsureClientCertificate(certFile, keyFile string, u user.Info) (*TLSCertificateConfig, bool, error)
- func (ca *CA) EnsureServerCert(certFile, keyFile string, hostnames util.StringSet) (*TLSCertificateConfig, bool, error)
- func (ca *CA) MakeClientCertificate(certFile, keyFile string, u user.Info) (*TLSCertificateConfig, error)
- func (ca *CA) MakeServerCert(certFile, keyFile string, hostnames util.StringSet) (*TLSCertificateConfig, error)
- type TLSCARoots
- type TLSCertificateConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertsFromPEM ¶ added in v0.4.2
func CertsFromPEM(pemCerts []byte) ([]*x509.Certificate, error)
func IPAddressesDNSNames ¶ added in v0.2.2
func IPAddressesDNSNames(hosts []string) ([]net.IP, []string)
func NewKeyPair ¶
func NewKeyPair() (crypto.PublicKey, crypto.PrivateKey, error)
Types ¶
type CA ¶
type CA struct {
SerialFile string
Config *TLSCertificateConfig
Serial int64
// contains filtered or unexported fields
}
func EnsureCA ¶ added in v0.4.2
func EnsureCA(certFile, keyFile, serialFile, name string) (*CA, bool, error)
EnsureCA returns a CA, whether it was created (as opposed to pre-existing), and any error
func (*CA) EnsureClientCertificate ¶ added in v0.4.2
func (ca *CA) EnsureClientCertificate(certFile, keyFile string, u user.Info) (*TLSCertificateConfig, bool, error)
func (*CA) EnsureServerCert ¶ added in v0.4.2
func (ca *CA) EnsureServerCert(certFile, keyFile string, hostnames util.StringSet) (*TLSCertificateConfig, bool, error)
func (*CA) MakeClientCertificate ¶ added in v0.4.2
func (ca *CA) MakeClientCertificate(certFile, keyFile string, u user.Info) (*TLSCertificateConfig, error)
func (*CA) MakeServerCert ¶
func (ca *CA) MakeServerCert(certFile, keyFile string, hostnames util.StringSet) (*TLSCertificateConfig, error)
type TLSCARoots ¶ added in v0.4.2
type TLSCARoots struct {
Roots []*x509.Certificate
}
func GetTLSCARoots ¶ added in v0.4.2
func GetTLSCARoots(caFile string) (*TLSCARoots, error)
type TLSCertificateConfig ¶
type TLSCertificateConfig struct {
Certs []*x509.Certificate
Key crypto.PrivateKey
}
func GetServerCert ¶ added in v0.4.2
func GetServerCert(certFile, keyFile string, hostnames util.StringSet) (*TLSCertificateConfig, error)
func GetTLSCertificateConfig ¶ added in v0.4.2
func GetTLSCertificateConfig(certFile, keyFile string) (*TLSCertificateConfig, error)
Click to show internal directories.
Click to hide internal directories.