csr

package
v0.0.0-...-7c4bba2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2021 License: MIT Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL