Versions in this module Expand all Collapse all v0 v0.0.2 Mar 17, 2022 v0.0.1 Nov 8, 2021 Changes in this version + const CertificateBlockType + const CertificateRequestBlockType + func CanReadCertAndKey(certPath, keyPath string) (bool, error) + func CertsFromFile(file string) ([]*x509.Certificate, error) + func EncodeCertificates(certs ...*x509.Certificate) ([]byte, error) + func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error) + func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, alternateDNS []string, ...) ([]byte, []byte, error) + func GetClientCANames(apiHost string) ([]string, error) + func GetClientCANamesForURL(kubeConfigURL string) ([]string, error) + func GetServingCertificates(apiHost, serverName string) ([]*x509.Certificate, [][]byte, error) + func GetServingCertificatesForURL(kubeConfigURL, serverName string) ([]*x509.Certificate, [][]byte, error) + func MakeCSR(privateKey interface{}, subject *pkix.Name, dnsSANs []string, ipSANs []net.IP) (csr []byte, err error) + func MakeCSRFromTemplate(privateKey interface{}, template *x509.CertificateRequest) ([]byte, error) + func NewPool(filename string) (*x509.CertPool, error) + func NewPoolFromBytes(pemBlock []byte) (*x509.CertPool, error) + func NewSelfSignedCACert(cfg Config, key crypto.Signer) (*x509.Certificate, error) + func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error) + func WriteCert(certPath string, data []byte) error + type AltNames struct + DNSNames []string + IPs []net.IP + type Config struct + AltNames AltNames + CommonName string + Organization []string + Usages []x509.ExtKeyUsage