package k8stlsutil
import "github.com/coreos/pkg/k8s-tlsutil"
Index ¶
- Constants
- func EncodeCertificatePEM(cert *x509.Certificate) []byte
- func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte
- func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error)
- func NewPrivateKey() (*rsa.PrivateKey, error)
- func NewSelfSignedCACertificate(cfg CertConfig, key *rsa.PrivateKey, validDuration time.Duration) (*x509.Certificate, error)
- func NewSignedCertificate(cfg CertConfig, key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey, validDuration time.Duration) (*x509.Certificate, error)
- func ParsePEMEncodedCACert(pemdata []byte) (*x509.Certificate, error)
- func ParsePEMEncodedPrivateKey(pemdata []byte) (*rsa.PrivateKey, error)
- type AltNames
- type CertConfig
Constants ¶
Functions ¶
func EncodeCertificatePEM ¶
func EncodeCertificatePEM(cert *x509.Certificate) []byte
func EncodePrivateKeyPEM ¶
func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte
func EncodePublicKeyPEM ¶
func NewPrivateKey ¶
func NewPrivateKey() (*rsa.PrivateKey, error)
func NewSelfSignedCACertificate ¶
func NewSelfSignedCACertificate(cfg CertConfig, key *rsa.PrivateKey, validDuration time.Duration) (*x509.Certificate, error)
func NewSignedCertificate ¶
func NewSignedCertificate(cfg CertConfig, key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey, validDuration time.Duration) (*x509.Certificate, error)
func ParsePEMEncodedCACert ¶
func ParsePEMEncodedCACert(pemdata []byte) (*x509.Certificate, error)
func ParsePEMEncodedPrivateKey ¶
func ParsePEMEncodedPrivateKey(pemdata []byte) (*rsa.PrivateKey, error)
Types ¶
type AltNames ¶
AltNames contains the domain names and IP addresses that will be added to the API Server's x509 certificate SubAltNames field. The values will be passed directly to the x509.Certificate object.
type CertConfig ¶
Source Files ¶
- Version
- v0.0.0-20240122114842-bbd7aa9bf6fb (latest)
- Published
- Jan 22, 2024
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 2 weeks ago –
Tools for package owners.