Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateSeed ¶
type CertificateSeed struct {
	CACertFile  string
	CACountry   string
	CAKeyFile   string
	CALocality  string
	CAName      string
	CAOrg       string
	CAState     string
	DumpKeys    bool
	ECCurve     EllipticCurve
	ECScheme    bool
	NewCA       bool
	RSAKeySize  RSAKeySize
	RSAScheme   bool
	TLSAltFqdn  string
	TLSCertFile string
	TLSCountry  string
	TLSDomain   string
	TLSFqdn     string
	TLSHost     string
	TLSKeyFile  string
	TLSLocality string
	TLSOrg      string
	TLSState    string
}
    CertificateSeed is responsible for parsing the X509 configuration into values that can be readily used to generate Root CA and TLS-related certificates. It will also validate the configuration provided to it upon instantiation.
func NewCertificateSeed ¶
func NewCertificateSeed(cfg X509, lc log.Logger) (seed CertificateSeed, err error)
type DirectoryHandler ¶
type DirectoryHandler struct {
	// contains filtered or unexported fields
}
    func NewDirectoryHandler ¶
func NewDirectoryHandler(lc log.Logger) DirectoryHandler
func (DirectoryHandler) Create ¶
func (h DirectoryHandler) Create(path string) error
func (DirectoryHandler) Verify ¶
func (h DirectoryHandler) Verify(path string) error
type EllipticCurve ¶
type EllipticCurve int
const ( EC_224 EllipticCurve = 224 EC_256 EllipticCurve = 256 EC_384 EllipticCurve = 384 EC_521 EllipticCurve = 521 )
type KeyScheme ¶
type KeyScheme struct {
	DumpKeys   string `json:"dump_keys"`
	RSA        string `json:"rsa"`
	RSAKeySize string `json:"rsa_key_size"`
	EC         string `json:"ec"`
	ECCurve    string `json:"ec_curve"`
}
    KeyScheme parameters (RSA vs EC) RSA: 1024, 2048, 4096 EC: 224, 256, 384, 521
type RSAKeySize ¶
type RSAKeySize int
const ( RSA_1024 RSAKeySize = 1024 RSA_2048 RSAKeySize = 2048 RSA_4096 RSAKeySize = 4096 )
type RootCA ¶
type RootCA struct {
	CAName     string `json:"ca_name"`
	CACountry  string `json:"ca_c"`
	CAState    string `json:"ca_st"`
	CALocality string `json:"ca_l"`
	CAOrg      string `json:"ca_o"`
}
    RootCA parameters from JSON: x509_root_ca_parameters
type TLSServer ¶
type TLSServer struct {
	TLSHost     string `json:"tls_host"`
	TLSDomain   string `json:"tls_domain"`
	TLSCountry  string `json:"tls_c"`
	TLSSate     string `json:"tls_st"`
	TLSLocality string `json:"tls_l"`
	TLSOrg      string `json:"tls_o"`
}
    TLSServer parameters from JSON config: x509_tls_server_parameters
type X509 ¶
type X509 struct {
	CreateNewRootCA string    `json:"create_new_rootca"`
	WorkingDir      string    `json:"working_dir"`
	PKISetupDir     string    `json:"pki_setup_dir"`
	DumpConfig      string    `json:"dump_config"`
	KeyScheme       KeyScheme `json:"key_scheme"`
	RootCA          RootCA    `json:"x509_root_ca_parameters"`
	TLSServer       TLSServer `json:"x509_tls_server_parameters"`
}
    X509 JSON config file main structure
func (X509) GetCAPemFileName ¶
GetCAPemFileName returns the file name of CA certificate
func (X509) GetCAPrivateKeyFileName ¶
GetCAPrivateKeyFileName returns the file name of CA private key
func (X509) GetTLSPemFileName ¶
GetTLSPemFileName returns the file name of TLS certificate
func (X509) GetTLSPrivateKeyFileName ¶
GetTLSPrivateKeyFileName returns the file name of TLS private key