Documentation
¶
Overview ¶
package cert provides tools for use with cmd/9cert, used to create and use certificates for encryption and authentication.
Index ¶
- func CertUser(c *x509.Certificate) string
- func GenCA(cafile string) error
- func GenCert(uname, certfile string, ca *x509.Certificate, caPrivkey *rsa.PrivateKey) error
- func LoadCA(certf string) (ca *x509.Certificate, pk *rsa.PrivateKey, err error)
- func LoadCert(certf string) (cert *x509.Certificate, pk *rsa.PrivateKey, ca *x509.Certificate, err error)
- func LoadTLSCert(certf string) (cert tls.Certificate, ca *x509.Certificate, err error)
- func TLSCertUser(c *tls.Certificate) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertUser ¶
func CertUser(c *x509.Certificate) string
func GenCert ¶
func GenCert(uname, certfile string, ca *x509.Certificate, caPrivkey *rsa.PrivateKey) error
GenCert generates a certificate for a user with name `uname` and writes it to `certfile`. This cert is signed by the certificate authority `ca` and its private key `caPrivkey`.
func LoadCA ¶
func LoadCA(certf string) (ca *x509.Certificate, pk *rsa.PrivateKey, err error)
LoadCA loads a certificate and its private key out of certf
func LoadCert ¶
func LoadCert(certf string) (cert *x509.Certificate, pk *rsa.PrivateKey, ca *x509.Certificate, err error)
LoadCert loads a certificate and its private key out of certf
func LoadTLSCert ¶
func LoadTLSCert(certf string) (cert tls.Certificate, ca *x509.Certificate, err error)
LoadCert loads a certificate and its private key out of certf and returns them as a tls.Certificate
func TLSCertUser ¶
func TLSCertUser(c *tls.Certificate) (string, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.