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 ¶
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.
Click to show internal directories.
Click to hide internal directories.