certs

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 60 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd(pather command.Pather) *cobra.Command

func CreateCSR

func CreateCSR(certType cppki.CertType, subject pkix.Name, priv key.PrivateKey) ([]byte, error)

func CreateCertificate

func CreateCertificate(params CertParams) ([]byte, error)

Types

type CertParams

type CertParams struct {
	Type      cppki.CertType
	Subject   pkix.Name
	PubKey    crypto.PublicKey
	NotBefore time.Time
	NotAfter  time.Time

	CACert *x509.Certificate
	CAKey  key.PrivateKey
}

type Features

type Features struct {
}

type SubjectVars

type SubjectVars struct {
	IA                 addr.IA `json:"isd_as,omitempty"`
	CommonName         string  `json:"common_name,omitempty"`
	Country            string  `json:"country,omitempty"`
	Locality           string  `json:"locality,omitempty"`
	Organization       string  `json:"organization,omitempty"`
	OrganizationalUnit string  `json:"organizational_unit,omitempty"`
	PostalCode         string  `json:"postal_code,omitempty"`
	Province           string  `json:"province,omitempty"`
	SerialNumber       string  `json:"serial_number,omitempty"`
	StreetAddress      string  `json:"street_address,omitempty"`
}

Jump to

Keyboard shortcuts

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