Documentation ¶
Index ¶
- func BootstrapCertificates(authOptions *auth.Options) error
- func CheckCertificateDate(certPath string) (bool, error)
- func GenerateCACertificate(certFile, keyFile, org string, bits int) error
- func GenerateCert(opts *Options) error
- func ReadTLSConfig(addr string, authOptions *auth.Options) (*tls.Config, error)
- func SetCertGenerator(cg Generator)
- func ValidateCertificate(addr string, authOptions *auth.Options) (bool, error)
- type Generator
- type Options
- type X509CertGenerator
- func (xcg *X509CertGenerator) GenerateCACertificate(certFile, keyFile, org string, bits int) error
- func (xcg *X509CertGenerator) GenerateCert(opts *Options) error
- func (xcg *X509CertGenerator) ReadTLSConfig(addr string, authOptions *auth.Options) (*tls.Config, error)
- func (xcg *X509CertGenerator) ValidateCertificate(addr string, authOptions *auth.Options) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootstrapCertificates ¶
func CheckCertificateDate ¶
func GenerateCACertificate ¶
func GenerateCert ¶
func ReadTLSConfig ¶ added in v0.5.5
func SetCertGenerator ¶
func SetCertGenerator(cg Generator)
Types ¶
type Generator ¶
type Generator interface { GenerateCACertificate(certFile, keyFile, org string, bits int) error GenerateCert(opts *Options) error ReadTLSConfig(addr string, authOptions *auth.Options) (*tls.Config, error) ValidateCertificate(addr string, authOptions *auth.Options) (bool, error) }
func NewX509CertGenerator ¶
func NewX509CertGenerator() Generator
type X509CertGenerator ¶
type X509CertGenerator struct{}
func (*X509CertGenerator) GenerateCACertificate ¶
func (xcg *X509CertGenerator) GenerateCACertificate(certFile, keyFile, org string, bits int) error
GenerateCACertificate generates a new certificate authority from the specified org and bit size and stores the resulting certificate and key file in the arguments.
func (*X509CertGenerator) GenerateCert ¶
func (xcg *X509CertGenerator) GenerateCert(opts *Options) error
GenerateCert generates a new certificate signed using the provided certificate authority files and stores the result in the certificate file and key provided. The provided host names are set to the appropriate certificate fields.
func (*X509CertGenerator) ReadTLSConfig ¶ added in v0.5.5
func (xcg *X509CertGenerator) ReadTLSConfig(addr string, authOptions *auth.Options) (*tls.Config, error)
ReadTLSConfig reads the tls config for a machine.
func (*X509CertGenerator) ValidateCertificate ¶
func (xcg *X509CertGenerator) ValidateCertificate(addr string, authOptions *auth.Options) (bool, error)
ValidateCertificate validate the certificate installed on the vm.
Click to show internal directories.
Click to hide internal directories.