Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSR ¶
type CSR struct { Country []string `json:"country,omitempty"` Locality []string `json:"locality,omitempty"` // This is used as the groups identifier for the Kubernetes CSR and its user Organization []string `json:"organization,omitempty"` OrganizationUnit []string `json:"organizationUnit,omitempty"` PostalCode []string `json:"postalCode,omitempty"` Province []string `json:"province,omitempty"` StreetAddress []string `json:"streetAddress,omitempty"` // This is used as the CommonName/CN and Kubernetes username for the CSR User string `json:"user" binding:"required"` }
CSR describes an x509 Certificate Signing Request
func (*CSR) CreateCSR ¶
func (c *CSR) CreateCSR(key *rsa.PrivateKey) ([]byte, error)
CreateCSR creates an x509 Certificate Request
func (*CSR) CreatePrivateKey ¶
func (c *CSR) CreatePrivateKey() (*rsa.PrivateKey, error)
CreatePrivateKey generates an RSA Private Key with a 2048 bit length
func (*CSR) PEMEncodePrivateKey ¶
func (c *CSR) PEMEncodePrivateKey(key *rsa.PrivateKey) []byte
PEMEncodePrivateKey encodes an RSA private key into PEM encoded format returned as a byte slice
Click to show internal directories.
Click to hide internal directories.