utils

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcCertFingerprint

func CalcCertFingerprint(leaf *x509.Certificate) string

func ConcatPrivAndPubKey

func ConcatPrivAndPubKey(privPEM, pubPEM []byte) []byte

func CreateNonExistingFolder

func CreateNonExistingFolder(path string, perm os.FileMode) error

func EncodeECDSAKey

func EncodeECDSAKey(w io.Writer, key *ecdsa.PrivateKey) error

func EncodeRSAKey

func EncodeRSAKey(w io.Writer, key *rsa.PrivateKey) error

func LimitTTL added in v0.6.0

func LimitTTL(ttl time.Duration) int64

func ParseCertificate

func ParseCertificate(data []byte) (tlscert *tls.Certificate, privPEM, pubPEM []byte, err error)

func ToPEMBlock added in v0.6.0

func ToPEMBlock(data interface{}) *pem.Block

func WriteFile

func WriteFile(name string, data []byte, perm os.FileMode) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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