Documentation
¶
Overview ¶
The backend package contains the various options for storing the actual private keys. Currently only a file backend is supported
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("entry not found")
ErrNotFound indicates that the specified crypto storage entry couldn't be found.
Functions ¶
func NewFileSystemBackend ¶
Create a new filesystem backend, all directories will be created for the given path Using a filesystem backend in production is not recommended!
Types ¶
type FileOpenError ¶
type FileOpenError struct {
// contains filtered or unexported fields
}
func (*FileOpenError) Error ¶
func (f *FileOpenError) Error() string
Error returns the string representation
func (*FileOpenError) Unwrap ¶
func (f *FileOpenError) Unwrap() error
UnWrap is needed for FileOpenError to be UnWrapped
type Storage ¶
type Storage interface {
GetPrivateKey(key types.KeyIdentifier) (*rsa.PrivateKey, error)
GetPublicKey(key types.KeyIdentifier) (*rsa.PublicKey, error)
PrivateKeyExists(key types.KeyIdentifier) bool
SavePrivateKey(keyIdentifier types.KeyIdentifier, key *rsa.PrivateKey) error
SaveCertificate(key types.KeyIdentifier, certificate []byte) error
GetCertificate(key types.KeyIdentifier) (*x509.Certificate, error)
CertificateExists(key types.KeyIdentifier) bool
}
Storage interface containing functions for storing and retrieving keys
Click to show internal directories.
Click to hide internal directories.