ssl

package
v0.0.0-...-12f02b5 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderSSLConf

func RenderSSLConf(w io.Writer, data *SSLTemplateArgs) error

func RenderSignSSLConf

func RenderSignSSLConf(w io.Writer, data *SignSSLTemplateArgs) error

Types

type CaProjectConfig

type CaProjectConfig struct {
	C            string `json:"country"`
	O            string `json:"organization"`
	ST           string `json:"state"`
	L            string `json:"locality"`
	CaOU         string `json:"caOrganizationUnit"`
	CaCN         string `json:"caCommonName"`
	EmailAddress string `json:"emailAddress"`
}

type Env

type Env struct {
	*OpenSSLEnv
	ProjectRoot string
	CaProjectConfig
}

func CreateEnv

func CreateEnv() *Env

func (*Env) SwitchToProject

func (env *Env) SwitchToProject(path string) error

type OpenSSLEnv

type OpenSSLEnv struct {
	CmdName string
	Out     *bytes.Buffer
	Err     *bytes.Buffer
	// contains filtered or unexported fields
}

func (*OpenSSLEnv) Abs

func (env *OpenSSLEnv) Abs(str string) string

func (*OpenSSLEnv) CheckBin

func (env *OpenSSLEnv) CheckBin() bool

func (*OpenSSLEnv) CheckVersion

func (env *OpenSSLEnv) CheckVersion() *OpenSSLVersion

func (*OpenSSLEnv) CreateSignedCrt

func (env *OpenSSLEnv) CreateSignedCrt(confLoc string, csrLoc string, crtLoc string, caCrtLoc string, caPriLoc string)

func (*OpenSSLEnv) GenerateCSR

func (env *OpenSSLEnv) GenerateCSR(confLoc string, priLoc string, csrLoc string)

func (*OpenSSLEnv) GenerateRSAKey

func (env *OpenSSLEnv) GenerateRSAKey(loc string)

func (*OpenSSLEnv) GenerateRootCACrt

func (env *OpenSSLEnv) GenerateRootCACrt(confLoc string, priLoc string, crtLoc string)

func (*OpenSSLEnv) HasErr

func (env *OpenSSLEnv) HasErr() bool

func (*OpenSSLEnv) MakeDir

func (env *OpenSSLEnv) MakeDir(path string)

func (*OpenSSLEnv) PopWd

func (env *OpenSSLEnv) PopWd(wd string)

func (*OpenSSLEnv) PushWd

func (env *OpenSSLEnv) PushWd(wd string)

func (*OpenSSLEnv) SetFile

func (env *OpenSSLEnv) SetFile(path string, content string)

func (*OpenSSLEnv) VerifyCrt

func (env *OpenSSLEnv) VerifyCrt(confLoc string, crtLoc string)

func (*OpenSSLEnv) WriteConf

func (env *OpenSSLEnv) WriteConf(confLoc string, callback func(f *os.File) error)

func (*OpenSSLEnv) WriteSSLConf

func (env *OpenSSLEnv) WriteSSLConf(confLoc string, args *SSLTemplateArgs)

func (*OpenSSLEnv) WriteSignSSLConf

func (env *OpenSSLEnv) WriteSignSSLConf(confLoc string, args *SignSSLTemplateArgs)

type OpenSSLVersion

type OpenSSLVersion struct {
	Version string
	Date    string
}

type SSLTemplateArgs

type SSLTemplateArgs struct {
	C            string
	O            string
	ST           string
	L            string
	OU           string
	CN           string
	EmailAddress string
}

type SignSSLTemplateArgs

type SignSSLTemplateArgs struct {
	C                 string
	O                 string
	ST                string
	L                 string
	OU                string
	CN                string
	IP                string
	BasicConstraints  string
	IsCA              string
	EmailAddress      string
	KeyUsage          string
	RestrictPolicyOfO string
}

Jump to

Keyboard shortcuts

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