Documentation ¶
Index ¶
- type CertificateAuthority
- func (ca *CertificateAuthority) CompleteOrder(order *core.Order)
- func (ca *CertificateAuthority) GetIntermediateCert(no int) *core.Certificate
- func (ca *CertificateAuthority) GetIntermediateKey(no int) *rsa.PrivateKey
- func (ca *CertificateAuthority) GetNumberOfRootCerts() int
- func (ca *CertificateAuthority) GetRootCert(no int) *core.Certificate
- func (ca *CertificateAuthority) GetRootKey(no int) *rsa.PrivateKey
- type CertificateAuthorityOpts
- type Chain
- type GravelCertificateChain
- type ICertificateAuthority
- type Issuer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateAuthority ¶
type CertificateAuthority struct { // The internal certificate chains used in this CA, mostly used for client-side verification. Chains []*Chain // contains filtered or unexported fields }
A Gravel certificate authority.
func New ¶
func New(db db.GravelStore, opts *CertificateAuthorityOpts) *CertificateAuthority
func (*CertificateAuthority) CompleteOrder ¶
func (ca *CertificateAuthority) CompleteOrder(order *core.Order)
func (*CertificateAuthority) GetIntermediateCert ¶
func (ca *CertificateAuthority) GetIntermediateCert(no int) *core.Certificate
func (*CertificateAuthority) GetIntermediateKey ¶
func (ca *CertificateAuthority) GetIntermediateKey(no int) *rsa.PrivateKey
func (*CertificateAuthority) GetNumberOfRootCerts ¶
func (ca *CertificateAuthority) GetNumberOfRootCerts() int
func (*CertificateAuthority) GetRootCert ¶
func (ca *CertificateAuthority) GetRootCert(no int) *core.Certificate
func (*CertificateAuthority) GetRootKey ¶
func (ca *CertificateAuthority) GetRootKey(no int) *rsa.PrivateKey
type CertificateAuthorityOpts ¶
type CertificateAuthorityOpts struct { OcspResponderUrl string AlternateRoots int // Logger Logger *logrus.Logger }
Options used to configure the certificate authority.
func NewDefaultCertificateAuthorityOpts ¶
func NewDefaultCertificateAuthorityOpts() *CertificateAuthorityOpts
type GravelCertificateChain ¶
type GravelCertificateChain struct { RootCertificatePublicKey []byte RootCertificatePrivateKey []byte // contains filtered or unexported fields }
A root certificate that can be used for testing purposes.
func GenerateGravelRootCertificateChain ¶
func GenerateGravelRootCertificateChain() (*GravelCertificateChain, error)
Generates an on-demand root certificate.
func (*GravelCertificateChain) GenerateCertificate ¶
func (gcc *GravelCertificateChain) GenerateCertificate() ([]byte, []byte, error)
Generate a certificate from the root CA. Returns the public key, the private key, and an error.
type ICertificateAuthority ¶
type ICertificateAuthority interface { CompleteOrder(order *core.Order) GetNumberOfRootCerts() int GetRootCert(no int) *core.Certificate GetRootKey(no int) *rsa.PrivateKey GetIntermediateCert(no int) *core.Certificate GetIntermediateKey(no int) *rsa.PrivateKey }
Click to show internal directories.
Click to hide internal directories.