Documentation
¶
Index ¶
- Variables
- func NewCA() (*x509.Certificate, crypto.PrivateKey, error)
- func NewCert(ca *x509.Certificate, caPrivateKey crypto.PrivateKey, ...) ([]byte, error)
- func NewIPCert(ca *x509.Certificate, caPrivateKey crypto.PrivateKey, pubKey crypto.PublicKey, ...) ([]byte, error)
- func NewPrivateKey() (*ecdsa.PrivateKey, error)
- func NewTLSConf(caCertDER []byte, certDER []byte, privKey *ecdsa.PrivateKey) (*tls.Config, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MarshalPublicKey = x509.MarshalPKIXPublicKey ParsePublicKey = x509.ParsePKIXPublicKey )
Functions ¶
func NewCA ¶
func NewCA() (*x509.Certificate, crypto.PrivateKey, error)
NewCA generates a new Certification Authority certificate and it's private key.
func NewCert ¶
func NewCert(ca *x509.Certificate, caPrivateKey crypto.PrivateKey, req *x509.CertificateRequest) ([]byte, error)
NewCert generates a new certificate for the given IP address signed by the given CA.
func NewIPCert ¶
func NewIPCert(ca *x509.Certificate, caPrivateKey crypto.PrivateKey, pubKey crypto.PublicKey, ips ...net.IP) ([]byte, error)
NewIPCert generates a new certificate for the given IP address signed by the given CA.
func NewPrivateKey ¶
func NewPrivateKey() (*ecdsa.PrivateKey, error)
NewPrivateKey generates a new private key.
func NewTLSConf ¶
NewTLSConf creates a new TLS config with the given CA certificate, certificate and private key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.