Versions in this module Expand all Collapse all v0 v0.0.1 Mar 10, 2023 Changes in this version + const CertificatePurposeAgent + const CertificatePurposeControl + const CertificatePurposeService + func MakeCertificateAuthority() ([]byte, []byte, error) + func ValidateCACert(certbytes []byte) error + type CA struct + func LoadCAFromFile(c Config) (*CA, error) + func MakeCAFromData(certPEM []byte, certPrivKeyPEM []byte) (*CA, error) + func (c *CA) GenerateCertificate(name CertificateName) (string, string, string, error) + func (c *CA) GetCACert() (string, error) + func (c *CA) GetCACertificate() []byte + func (c *CA) MakeCertPool() (*x509.CertPool, error) + func (c *CA) MakeServerCert(names []string) (*tls.Certificate, error) + type CertPoolGenerator interface + MakeCertPool func() (*x509.CertPool, error) + type CertificateIssuer interface + GenerateCertificate func(CertificateName) (string, string, string, error) + GetCACert func() (string, error) + type CertificateName struct + Agent string + Name string + Purpose string + Type string + func GetCertificateNameFromCert(cert *x509.Certificate) (*CertificateName, error) + type Config struct + CACertFile string + CAKeyFile string