Documentation ¶
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, ...) (*x509.Certificate, error)
- func ParsePEMEncodedCACert(pemdata []byte) (*x509.Certificate, error)
- func ParsePEMEncodedPrivateKey(pemdata []byte) (*rsa.PrivateKey, error)
- type AltNames
- type CertConfig
Constants ¶
View Source
const ( RSAKeySize = 2048 Duration365d = time.Hour * 24 * 365 )
Variables ¶
This section is empty.
Functions ¶
func EncodeCertificatePEM ¶
func EncodeCertificatePEM(cert *x509.Certificate) []byte
func EncodePrivateKeyPEM ¶
func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte
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 ¶
Click to show internal directories.
Click to hide internal directories.