Documentation
¶
Overview ¶
Package pki owns the persistent MooX private CA and deployment-time host certificate issuance. It never replaces an existing or partial CA.
Index ¶
- Variables
- type HostIdentity
- type IssuedCertificate
- type Store
- func (s *Store) Close() error
- func (s *Store) EnsureCA() (hostbundle.CAInfo, error)
- func (s *Store) ExportCA(outputDir string) (hostbundle.CertificateInfo, error)
- func (s *Store) GoString() string
- func (s *Store) Info() (hostbundle.CAInfo, error)
- func (s *Store) Issue(host HostIdentity, outputDir string) (IssuedCertificate, error)
- func (*Store) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCA = errors.New("MooX CA is missing, incomplete, invalid, or expired; restore the original CA rather than regenerating it")
Functions ¶
This section is empty.
Types ¶
type HostIdentity ¶
type IssuedCertificate ¶
type IssuedCertificate struct {
hostbundle.CertificateInfo
HostID string `json:"host_id"`
CAFingerprint string `json:"ca_sha256"`
Certificate string `json:"certificate_file"`
Key string `json:"key_file"`
CA string `json:"ca_file"`
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ExportCA ¶
func (s *Store) ExportCA(outputDir string) (hostbundle.CertificateInfo, error)
ExportCA publishes only the public root, after validating the original pair.
func (*Store) Info ¶
func (s *Store) Info() (hostbundle.CAInfo, error)
Info validates an existing CA without creating or repairing trust material. Normal host deployments must use this after the initial offline bootstrap.
func (*Store) Issue ¶
func (s *Store) Issue(host HostIdentity, outputDir string) (IssuedCertificate, error)
Issue always creates a new key and certificate. The entire output directory is published together and must be absent; deployment then installs the bundle.
Click to show internal directories.
Click to hide internal directories.