package
1.8.0-rc.4
Repository: https://github.com/rancher/rke.git
Documentation: pkg.go.dev

# 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.
EncodeCertPEM returns PEM-endcoded certificate data.
EncodePrivateKeyPEM returns PEM-encoded private key data.
EncodePublicKeyPEM returns PEM-encoded public data.
FormatBytesCert receives byte array certificate and formats in human-readable format.
FormatCert receives certificate and formats in human-readable format.
GenerateSelfSignedCertKey creates a self-signed certificate and key for the given host.
LoadOrGenerateKeyFile looks for a key in the file at the given path.
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.
MakeEllipticPrivateKeyPEM creates an ECDSA private key.
NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file.
NewPrivateKey creates an RSA private key.
NewSelfSignedCACert creates a CA certificate.
NewSignedCert creates a signed certificate using the given CA certificate and key.
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.
ParsePrivateKeyPEM returns a private key parsed from a PEM block in the supplied data.
ParsePublicKeysPEM is a helper function for reading an array of rsa.PublicKey or ecdsa.PublicKey from a PEM-encoded byte array.
PrivateKeyFromFile returns the private key in rsa.PrivateKey or ecdsa.PrivateKey format from a given PEM-encoded file.
PublicKeysFromFile returns the public keys in rsa.PublicKey or ecdsa.PublicKey format from a given PEM-encoded file.
WriteCert writes the pem-encoded certificate data to certPath.
WriteKey writes the pem-encoded key data to keyPath.

# Constants

CertificateBlockType is a possible value for pem.Block.Type.
CertificateRequestBlockType is a possible value for pem.Block.Type.
ECPrivateKeyBlockType is a possible value for pem.Block.Type.
PrivateKeyBlockType is a possible value for pem.Block.Type.
PublicKeyBlockType is a possible value for pem.Block.Type.
RSAPrivateKeyBlockType is a possible value for pem.Block.Type.

# Structs

AltNames contains the domain names and IP addresses that will be added to the API Server's x509 certificate SubAltNames field.
Config contains the basic fields required for creating a certificate.