Documentation ¶
Index ¶
- Constants
- func CAKeyPair(config *configupload.Configuration) (*rsa.PrivateKey, *x509.Certificate, error)
- func DownloadCA(s *state.State) error
- func EncodeCertPEM(cert *x509.Certificate) []byte
- func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte
- func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error)
- func NewPrivateKey() (*rsa.PrivateKey, error)
- func NewSignedCert(cfg *certutil.Config, key crypto.Signer, caCert *x509.Certificate, ...) (*x509.Certificate, error)
Constants ¶
View Source
const ( // PrivateKeyBlockType is a possible value for pem.Block.Type. PrivateKeyBlockType = "PRIVATE KEY" // PublicKeyBlockType is a possible value for pem.Block.Type. PublicKeyBlockType = "PUBLIC KEY" // CertificateBlockType is a possible value for pem.Block.Type. CertificateBlockType = "CERTIFICATE" // RSAPrivateKeyBlockType is a possible value for pem.Block.Type. RSAPrivateKeyBlockType = "RSA PRIVATE KEY" )
Variables ¶
This section is empty.
Functions ¶
func CAKeyPair ¶
func CAKeyPair(config *configupload.Configuration) (*rsa.PrivateKey, *x509.Certificate, error)
CAKeyPair parses generated PKI CA certificate and key
func DownloadCA ¶ added in v0.5.0
DownloadCA grabs CA certs/keys from leader host
func EncodeCertPEM ¶ added in v1.0.0
func EncodeCertPEM(cert *x509.Certificate) []byte
EncodeCertPEM returns PEM-endcoded certificate data
func EncodePrivateKeyPEM ¶ added in v1.0.0
func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte
EncodePrivateKeyPEM returns PEM-encoded private key data
func EncodePublicKeyPEM ¶ added in v1.0.0
EncodePublicKeyPEM returns PEM-encoded public data
func NewPrivateKey ¶ added in v1.0.0
func NewPrivateKey() (*rsa.PrivateKey, error)
NewPrivateKey creates an RSA private key
func NewSignedCert ¶ added in v1.0.0
func NewSignedCert(cfg *certutil.Config, key crypto.Signer, caCert *x509.Certificate, caKey crypto.Signer) (*x509.Certificate, error)
NewSignedCert creates a signed certificate using the given CA certificate and key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.