easypki

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2016 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenCRL

func GenCRL(pkiroot string, expire int) error

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

func GeneratePKIStructure(pkiroot string) error

|-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 NextNumber

func NextNumber(pkiroot, name string) (*big.Int, error)

func RevokeSerial

func RevokeSerial(pkiroot string, serial *big.Int) 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.

Jump to

Keyboard shortcuts

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