certs

package
v0.0.0-...-fd5a099 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

The certs package contains all of the needed components for the ca to deal with certificates.

Index

Constants

View Source
const AuthCertValidDays int = 10

AuthCertValidDays represents the number of days an Authenticator Certificate signed by this package will be valid for.

View Source
const RootCertValidDays int = 365

RootCertValidDays represents the number of days the Root Certificate signed by this package will be valid for.

View Source
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.

Jump to

Keyboard shortcuts

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