Versions in this module Expand all Collapse all v0 v0.0.2 Sep 17, 2024 Changes in this version + func GenerateClientCert(host, name string, port int) (*mtls.ClientConfig, error) + func GenerateListenerCert(host, name string, port int) (*mtls.ClientConfig, error) + func GeneratePipelineCert(config *configs.TlsConfig) ([]byte, []byte, error) + func GenerateRootCert() error + func GenerateServerCert(name string) ([]byte, []byte, error) v0.0.1 Aug 21, 2024 Changes in this version + const ACMEDirName + const ECCKey + const ImplantCA + const ListenerCA + const ListenerName + const ListenerNamespace + const OperatorCA + const OperatorName + const RSAKey + const RootCA + const RootName + var ErrCertDoesNotExist = errors.New("certificate does not exist") + var TLSKeyLogger = newKeyLogger() + func CheckCertIsExist(certPath, keyPath, commonName string, caType int) ([]byte, []byte, error) + func ClientGenerateCertificate(host, name string, port int, clientType int) (*mtls.ClientConfig, error) + func ClientGetCertificate(operator string) ([]byte, []byte, error) + func ClientListCertificates() []*x509.Certificate + func ClientRemoveCertificate(operator string) error + func GenerateCertificateAuthority(caType int, commonName string) (*x509.Certificate, *rsa.PrivateKey) + func GenerateECCCertificate(caType int, commonName string, isCA bool, isClient bool) ([]byte, []byte) + func GenerateListenerCertificate(config *configs.TlsConfig) ([]byte, []byte, error) + func GenerateRSACertificate(caType int, commonName string, isCA bool, isClient bool, subject *pkix.Name) ([]byte, []byte) + func GetACMEDir() string + func GetACMEManager(domain string) *autocert.Manager + func GetCertificate(caType int, keyType string, commonName string) ([]byte, []byte, error) + func GetCertificateAuthority() (*x509.Certificate, *rsa.PrivateKey, error) + func GetCertificateAuthorityPEM(caCertPath, caKeyPath string) ([]byte, []byte, error) + func GetECCCertificate(caType int, commonName string) ([]byte, []byte, error) + func GetOperatorServerMTLSConfig(host string) *tls.Config + func GetRSACertificate(caType int, commonName string) ([]byte, []byte, error) + func ParseCertificateAuthority(certPEM, keyPEM []byte) (*x509.Certificate, *rsa.PrivateKey, error) + func RemoveCertificate(caType int, keyType string, commonName string) error + func RsaKeySize() int + func SaveCertificateAuthority(caType int, cert []byte, key []byte) + func SaveToPEMFile(filename string, pemData []byte) error + func ServerGenerateCertificate(name string, isCA bool, cfgPath string) ([]byte, []byte, error) + func ServerGetCertificate(hostname string) ([]byte, []byte, error)