crypto

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2015 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertsFromPEM added in v0.4.2

func CertsFromPEM(pemCerts []byte) ([]*x509.Certificate, error)

func IPAddressesDNSNames added in v0.2.2

func IPAddressesDNSNames(hosts []string) ([]net.IP, []string)

func NewKeyPair

func NewKeyPair() (crypto.PublicKey, crypto.PrivateKey, error)

Types

type CA

type CA struct {
	SerialFile string
	Serial     int64
	Config     *TLSCertificateConfig
}

func EnsureCA added in v0.4.2

func EnsureCA(certFile, keyFile, serialFile, name string) (*CA, error)

func GetCA added in v0.4.2

func GetCA(certFile, keyFile, serialFile string) (*CA, error)

func MakeCA added in v0.4.2

func MakeCA(certFile, keyFile, serialFile, name string) (*CA, error)

func (*CA) EnsureClientCertificate added in v0.4.2

func (ca *CA) EnsureClientCertificate(certFile, keyFile string, u user.Info) (*TLSCertificateConfig, error)

func (*CA) EnsureServerCert added in v0.4.2

func (ca *CA) EnsureServerCert(certFile, keyFile string, hostnames util.StringSet) (*TLSCertificateConfig, error)

func (*CA) MakeClientCertificate added in v0.4.2

func (ca *CA) MakeClientCertificate(certFile, keyFile string, u user.Info) (*TLSCertificateConfig, error)

func (*CA) MakeServerCert

func (ca *CA) MakeServerCert(certFile, keyFile string, hostnames util.StringSet) (*TLSCertificateConfig, error)

type TLSCARoots added in v0.4.2

type TLSCARoots struct {
	Roots []*x509.Certificate
}

func GetTLSCARoots added in v0.4.2

func GetTLSCARoots(caFile string) (*TLSCARoots, error)

type TLSCertificateConfig

type TLSCertificateConfig struct {
	Certs []*x509.Certificate
	Key   crypto.PrivateKey
}

func GetServerCert added in v0.4.2

func GetServerCert(certFile, keyFile string, hostnames util.StringSet) (*TLSCertificateConfig, error)

func GetTLSCertificateConfig added in v0.4.2

func GetTLSCertificateConfig(certFile, keyFile string) (*TLSCertificateConfig, error)

Jump to

Keyboard shortcuts

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