klinpki

package
v0.0.0-...-151ea04 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 15 Imported by: 1

README

INTRODUCTION

Own version of PKI with my own defaults

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenCA

func GenCA(p *CAConfig)

func GenCSRv2

func GenCSRv2(c *CSRConfig) (*pem.Block, *pem.Block)

func Hostname

func Hostname() string

func SignCSRv2

func SignCSRv2(s *SignConfig) ([]byte, error)

func SignCSRv3

func SignCSRv3(s *SignConfig) ([]byte, error)

Types

type CAConfig

type CAConfig struct {
	EmailAddress string
	EcdsaCurve   string
	Certpath     string
	Keypath      string
	MaxDays      float64
	RsaBits      int
	Organization string
}

type CSRConfig

type CSRConfig struct {
	RsaBits            int
	Country            string
	Province           string
	Locality           string
	EmailAddress       string
	Organization       string
	OrganizationalUnit string
	CommonName         string
	DNSNames           []string
}

type SignConfig

type SignConfig struct {
	Crtpath  string
	Keypath  string
	CrtBytes []byte
	KeyBytes []byte
	CsrBytes []byte
	Days     float64
	IsCA     bool
}

Jump to

Keyboard shortcuts

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