Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CACSRInput ¶ added in v0.37.0
type CACSRInput struct {
CommonName string
Country string
Locality string
Organization string
OrganizationUnit string
Expiry string
}
CACSRInput struct.
type Certificate ¶ added in v0.37.0
Certificate stores the combination of Cert and Key along with the CSR if available.
func NewCertificateFromFile ¶ added in v0.37.0
func NewCertificateFromFile(certFilePath, keyFilePath, csrFilePath string) (*Certificate, error)
NewCertificateFromFile creates a new Certificate by loading cert, key and csr (if exists) from respecting files.
func (*Certificate) Write ¶ added in v0.37.0
func (c *Certificate) Write(certPath, keyPath, csrPath string) error
Write writes the cert, key and csr to disk.
type LocalDirCertStorage ¶ added in v0.37.0
type LocalDirCertStorage struct {
// contains filtered or unexported fields
}
LocalDirCertStorage is a certificate storage, that stores certificates in a local directory.
func NewLocalDirCertStorage ¶ added in v0.37.0
func NewLocalDirCertStorage(paths CaPaths) *LocalDirCertStorage
NewLocalDirCertStorage inits a new LocalDirCertStorage.
func (*LocalDirCertStorage) LoadCaCert ¶ added in v0.37.0
func (c *LocalDirCertStorage) LoadCaCert() (*Certificate, error)
LoadCaCert loads the CA certificate from disk.
func (*LocalDirCertStorage) LoadNodeCert ¶ added in v0.37.0
func (c *LocalDirCertStorage) LoadNodeCert(nodeName string) (*Certificate, error)
LoadNodeCert loads the node certificate from disk. Used to load CA certificate as well, as CA certificate can be seen as node named "ca".
func (*LocalDirCertStorage) StoreCaCert ¶ added in v0.37.0
func (c *LocalDirCertStorage) StoreCaCert(cert *Certificate) error
StoreCaCert stores the given CA certificate in a file in the baseFolder.
func (*LocalDirCertStorage) StoreNodeCert ¶ added in v0.37.0
func (c *LocalDirCertStorage) StoreNodeCert(nodeName string, cert *Certificate) error
StoreNodeCert stores the given certificate in a file in the baseFolder.