# Packages
Package keyutil contains utilities for managing public/private key pairs.
# Functions
CanReadCertAndKey returns true if the certificate and key files already exists, otherwise returns false.
CertsFromFile returns the x509.Certificates contained in the given PEM-encoded file.
EncodeCertificates returns the PEM-encoded byte array that represents by the specified certs.
GenerateSelfSignedCertKey creates a self-signed certificate and key for the given host.
GenerateSelfSignedCertKeyWithFixtures creates a self-signed certificate and key for the given host.
GetClientCANames gets the CA names for client certs that a server accepts.
GetClientCANamesForURL is GetClientCANames against a URL string like we use in kubeconfigs.
GetServingCertificates returns the x509 certs used by a server as certificates and pem encoded bytes.
GetServingCertificatesForURL is GetServingCertificates against a URL string like we use in kubeconfigs.
MakeCSR generates a PEM-encoded CSR using the supplied private key, subject, and SANs.
MakeCSRFromTemplate generates a PEM-encoded CSR using the supplied private key and certificate request as a template.
NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file.
NewPoolFromBytes returns an x509.CertPool containing the certificates in the given PEM-encoded bytes.
NewSelfSignedCACert creates a CA certificate.
ParseCertsPEM returns the x509.Certificates contained in the given PEM-encoded byte array Returns an error if a certificate could not be parsed, or if the data does not contain any certificates.
WriteCert writes the pem-encoded certificate data to certPath.
# Constants
CertificateBlockType is a possible value for pem.Block.Type.
CertificateRequestBlockType is a possible value for pem.Block.Type.