generate

package
v0.0.0-...-db43ba2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrivateKeyFile = "autograph.key"
	PublicKeyFile  = "autograph.pub"
)

PrivateKeyFile - the private key filename PublicKeyFile - the public key filename

View Source
const (
	// CertificatesDestinationFolder point to the directory where certificates will be created
	CertificatesDestinationFolder = "resources/"
)

Variables

This section is empty.

Functions

func KeyPair

func KeyPair() (*rsa.PrivateKey, *rsa.PublicKey, error)

KeyPair generated RSA key pair with 2048 bits length. Also writes RSA key pair to the file system under names defined in PrivateKeyFile and PublicKeyFile constants.

Function takes *rsa.PrivateKey and *rsa.PublicKey as arguments It might be parsed/loaded using following functions: - keys.LoadPrivateKey - keys.LoadPublicKey

func LoadPrivateKey

func LoadPrivateKey(path string) (*rsa.PrivateKey, error)

LoadPrivateKey parse key in PEM format and returns *rsa.PrivateKey.

func LoadPublicKey

func LoadPublicKey(path string) (*rsa.PublicKey, error)

LoadPublicKey parse key in PEM format and returns *rsa.PublicKey.

func TLSCertificates

func TLSCertificates()

TLSCertificates generate TLS certificates and put them in resources directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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