Documentation
¶
Index ¶
- Variables
- func CreateRootCA(configName, labCARoot string, ns map[string]nodes.Node) error
- type CaRootInput
- type CertInput
- type Certificates
- func GenerateCert(ca, caKey string, csrJSONTpl *template.Template, input CertInput, ...) (*Certificates, error)
- func GenerateRootCa(labCARoot string, csrRootJsonTpl *template.Template, input CaRootInput) (*Certificates, error)
- func RetrieveNodeCertData(n *types.NodeConfig, labCADir string) (*Certificates, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var NodeCSRTempl string = `` /* 294-byte string literal not displayed */
Functions ¶
Types ¶
type CaRootInput ¶
type CaRootInput struct {
CommonName string
Country string
Locality string
Organization string
OrganizationUnit string
Expiry string
Prefix string
Names map[string]string // Not used right now
// prefix for certificate/key file name
NamePrefix string
}
CaRootInput struct
type CertInput ¶
type CertInput struct {
Hosts []string
CommonName string
Country string
Locality string
Organization string
OrganizationUnit string
Expiry string
Name string
LongName string
Fqdn string
Prefix string
}
CertInput struct
type Certificates ¶
func GenerateCert ¶
func GenerateCert(ca, caKey string, csrJSONTpl *template.Template, input CertInput, targetPath string) (*Certificates, error)
GenerateCert generates and signs a certificate passed as input and saves the certificate and generated private key by path CA used to sign the cert is passed as ca and caKey file paths
func GenerateRootCa ¶
func GenerateRootCa(labCARoot string, csrRootJsonTpl *template.Template, input CaRootInput) (*Certificates, error)
GenerateRootCa function
func RetrieveNodeCertData ¶
func RetrieveNodeCertData(n *types.NodeConfig, labCADir string) (*Certificates, error)
RetrieveNodeCertData reads the node private key and certificate by the well known paths if either of those files doesn't exist, an error is returned
Click to show internal directories.
Click to hide internal directories.