certtools

package
v0.17.31 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CURVES = map[string]elliptic.Curve{}
View Source
var EMPTY = []string{}

Functions

func GetKey

func GetKey(eng *url.URL, file, newkey string) (crypto.PrivateKey, error)

func ListEngines

func ListEngines() []string

func LoadCert

func LoadCert(pemBytes []byte) ([]*x509.Certificate, error)

func LoadCertFromFile

func LoadCertFromFile(f string) ([]*x509.Certificate, error)

func LoadEngineKey

func LoadEngineKey(engine string, addr *url.URL) (crypto.PrivateKey, error)

func LoadPrivateKey

func LoadPrivateKey(pemBytes []byte) (crypto.PrivateKey, error)

func NewCertRequest

func NewCertRequest(subject map[string]string, dns []string) (*x509.CertificateRequest, error)

func SavePrivateKey

func SavePrivateKey(key crypto.PrivateKey, file string) error

func SupportedCurves

func SupportedCurves() []string

Types

type CsrConfig

type CsrConfig struct {
	AltNames           []string `json:"altNames"`
	Country            string   `json:"country"`
	Locality           string   `json:"locality"`
	Organization       string   `json:"organization"`
	OrganizationalUnit string   `json:"organizationalUnit"`
	Province           string   `json:"province"`
}

type Engine

type Engine interface {
	Id() string
	LoadKey(key *url.URL) (crypto.PrivateKey, error)
}

Jump to

Keyboard shortcuts

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