Documentation ¶
Index ¶
- func GenCRL(pkiroot string, expire int) error
- func GenerateCertificate(genReq *GenerationRequest) error
- func GeneratePKIStructure(pkiroot string) error
- func GeneratePrivateKey(path string) (*rsa.PrivateKey, error)
- func GetCA(pkiroot string) (*x509.Certificate, *rsa.PrivateKey, error)
- func GetCertificate(path string) (*x509.Certificate, error)
- func NextNumber(pkiroot, name string) (*big.Int, error)
- func RevokeSerial(pkiroot string, serial *big.Int) error
- func WriteIndex(pkiroot, filename string, crt *x509.Certificate) error
- type GenerationRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCertificate ¶
func GenerateCertificate(genReq *GenerationRequest) error
GenerateCertificate is a function for helping to generate new x509 certificates and keys from the GenerationRequest. This function renders the content out to the filesystem.
func GeneratePKIStructure ¶
|-ca.crt |-crlnumber |-index.txt |-index.txt.attr |-serial |-issued/
|- name.crt
|-private
|- ca.key |- name.key
func GeneratePrivateKey ¶
func GeneratePrivateKey(path string) (*rsa.PrivateKey, error)
func GetCA ¶
func GetCA(pkiroot string) (*x509.Certificate, *rsa.PrivateKey, error)
func GetCertificate ¶
func GetCertificate(path string) (*x509.Certificate, error)
func WriteIndex ¶
func WriteIndex(pkiroot, filename string, crt *x509.Certificate) error
Types ¶
type GenerationRequest ¶
type GenerationRequest struct { PKIRoot string Name string Template *x509.Certificate MaxPathLen int IsIntermediateCA bool IsClientCertificate bool }
GenerationRequest is a struct for providing configuration to GenerateCertificate when actioning a certification generation request.
Click to show internal directories.
Click to hide internal directories.