cert

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateAuthority

type CertificateAuthority struct {
	Certificate []byte
	PrivateKey  []byte
}

func Load

func Load(caPath string) (*CertificateAuthority, error)

Load takes a given path to what is presumed to be a valid certificate authority and attempts to load both the certificate and private key. If the path is a directory then it is assumed that there are two files "ca.crt" and "ca.key" which represent the certificate and private key respectively.

If the argument is not a directory, it must be a file ending in either of the .crt or .key extensions. Load will read the given file and attempt to load the other associated file. For example, if the path given is /path/to/my-ca.crt, then load will attempt to load the private key file at /path/to/my-ca.key.

Jump to

Keyboard shortcuts

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