storage

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

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

func NewFileSystemBackend(fspath string) (*fileSystemBackend, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL