certs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxSerialNumber = big.NewInt(0).SetBytes(bytes.Repeat([]byte{255}, 20))

MaxSerialNumber - nothing very original, big number

Functions

func GenerateAndSave

func GenerateAndSave(name, organization string, validity time.Duration) (tlsc *tls.Certificate, err error)

GenerateAndSave - generates cert and key and saves them on your disk

func GetTLSCertificate

func GetTLSCertificate(cert *x509.Certificate, priv *rsa.PrivateKey, hostname string, validity time.Duration) (*tls.Certificate, error)

GetTLSCertificate - takes x509 cert and private key, returns tls.Certificate that is ready for proxy use

func NewCertificatePair

func NewCertificatePair(name, organization string, validity time.Duration) (*x509.Certificate, *rsa.PrivateKey, error)

NewCertificatePair - returns x509 cert + private key

func PemBlockForKey

func PemBlockForKey(priv interface{}) *pem.Block

PemBlockForKey - based on key returns a block

Types

This section is empty.

Jump to

Keyboard shortcuts

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