sprigcrypto

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Unlicense Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePrivateKey

func GeneratePrivateKey(typ string) string

Types

type Certificate

type Certificate struct {
	Cert string
	Key  string
}

func GenerateCertificateAuthority

func GenerateCertificateAuthority(
	cn string,
	daysValid int,
) (Certificate, error)

func GenerateCertificateAuthorityWithPEMKey

func GenerateCertificateAuthorityWithPEMKey(
	cn string,
	daysValid int,
	privPEM string,
) (Certificate, error)

func GenerateSelfSignedCertificate

func GenerateSelfSignedCertificate(
	cn string,
	ips []interface{},
	alternateDNS []interface{},
	daysValid int,
) (Certificate, error)

func GenerateSignedCertificate

func GenerateSignedCertificate(
	cn string,
	ips []interface{},
	alternateDNS []interface{},
	daysValid int,
	ca Certificate,
) (Certificate, error)

func GenerateSignedCertificateWithPEMKey

func GenerateSignedCertificateWithPEMKey(
	cn string,
	ips []interface{},
	alternateDNS []interface{},
	daysValid int,
	ca Certificate,
	privPEM string,
) (Certificate, error)

type DSAKeyFormat

type DSAKeyFormat struct {
	Version       int
	P, Q, G, Y, X *big.Int
}

DSAKeyFormat stores the format for DSA keys. Used by pemBlockForKey

Jump to

Keyboard shortcuts

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