Documentation ¶
Overview ¶
The certs package contains all of the needed components for the ca to deal with certificates.
Index ¶
Constants ¶
const AuthCertValidDays int = 10
AuthCertValidDays represents the number of days an Authenticator Certificate signed by this package will be valid for.
const RootCertValidDays int = 365
RootCertValidDays represents the number of days the Root Certificate signed by this package will be valid for.
const SessionCertValidMins int = 10
SessionCertValidMins represents the number of minutes a Session Certificate signed by this package should be valid for.
Variables ¶
This section is empty.
Functions ¶
func ReSignRootCert ¶
func ReSignRootCert()
ReSignRootCert is the core of the routine run by the ca when the -root flag is used. It recreates and re-signs the root certificate and then writes that certificate to the file specified in the config file.
func SignAuthCertificate ¶
func SignAuthCertificate(csr *x509.CertificateRequest) (*x509.Certificate, error)
Sign an Authentication Certificate. May want to do validation of the CSR here.
func SignRoot ¶
func SignRoot(pubKey *rsa.PublicKey, privKey *rsa.PrivateKey) (*x509.Certificate, error)
SignCSR takes the ca's private key and public key and then recreates and re-signs the root certificate. The function then returns a pointer to the resulting x509.Certificate object.
Types ¶
This section is empty.