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(legalEntity types.LegalEntity) (*rsa.PrivateKey, error)
GetPublicKey(legalEntity types.LegalEntity) (*rsa.PublicKey, error)
KeyExistsFor(legalEntity types.LegalEntity) bool
SavePrivateKey(legalEntity types.LegalEntity, key *rsa.PrivateKey) error
SaveCertificate(entity types.LegalEntity, certificate []byte) error
GetCertificate(entity types.LegalEntity) (*x509.Certificate, error)
}
Storage interface containing functions for storing and retrieving keys
Click to show internal directories.
Click to hide internal directories.