Documentation ¶
Index ¶
- func LoadCert(keyFile string, certFile string, bundleFile string) (*tls.Config, error)
- func ShowCertificate(certFile string) (string, error)
- func ShowCertificateDetail(cert *x509.Certificate) string
- func ShowCertificatePool(certPool *x509.CertPool) string
- func ShowCertificatePoolFromFile(certPoolFile string) (string, error)
- type CertPoolWithAccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCert ¶
LoadCert loads and returns a configured tls.Config using the provided ControllerConfig for TLS settings. It reads the CA bundle, certificate, and key files specified in the config. If any file is missing, it returns an error. The function also handles loading X.509 key pairs and appending CA certificates to a new certificate pool. Note: InsecureSkipVerify is set to true regardless of the config setting.
func ShowCertificate ¶
func ShowCertificateDetail ¶
func ShowCertificateDetail(cert *x509.Certificate) string
func ShowCertificatePool ¶
Types ¶
type CertPoolWithAccess ¶
type CertPoolWithAccess struct {
// contains filtered or unexported fields
}
CertPoolWithAccess is a wrapper over x509.CertPool
func NewCertPoolWithAccess ¶
func NewCertPoolWithAccess() *CertPoolWithAccess
NewCertPoolWithAccess creates a new CertPoolWithAccess
func (*CertPoolWithAccess) AddCert ¶
func (c *CertPoolWithAccess) AddCert(certPEM []byte) error
AddCert adds a certificate to the pool and stores it for later access
func (*CertPoolWithAccess) ListCerts ¶
func (c *CertPoolWithAccess) ListCerts() string
ListCerts prints the subjects of all certificates in the pool
Click to show internal directories.
Click to hide internal directories.