Documentation ¶
Index ¶
- Constants
- type DirKeyStorage
- func (s *DirKeyStorage) DeleteByCn(cn string) error
- func (s *DirKeyStorage) DeleteBySerial(serial *big.Int) error
- func (s *DirKeyStorage) GetAll() ([]*pair.X509Pair, error)
- func (s *DirKeyStorage) GetByCN(cn string) ([]*pair.X509Pair, error)
- func (s *DirKeyStorage) GetBySerial(serial *big.Int) (*pair.X509Pair, error)
- func (s *DirKeyStorage) GetLastByCn(cn string) (*pair.X509Pair, error)
- func (s *DirKeyStorage) Put(pair *pair.X509Pair) error
- type FileCRLHolder
- type FileSerialProvider
Constants ¶
View Source
const ( LockPeriod = time.Millisecond * 100 LockTimeout = time.Second * 10 CertFileExtension = ".crt" // certificate file extension )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirKeyStorage ¶
type DirKeyStorage struct {
// contains filtered or unexported fields
}
DirKeyStorage is a Storage interface implementation with storing pairs on fs
func NewDirKeyStorage ¶
func NewDirKeyStorage(keydir string) *DirKeyStorage
func (*DirKeyStorage) DeleteByCn ¶
func (s *DirKeyStorage) DeleteByCn(cn string) error
DeleteByCn delete all pair with cn
func (*DirKeyStorage) DeleteBySerial ¶
func (s *DirKeyStorage) DeleteBySerial(serial *big.Int) error
Delete only one pair with serial
func (*DirKeyStorage) GetAll ¶
func (s *DirKeyStorage) GetAll() ([]*pair.X509Pair, error)
GetAll return all pairs
func (*DirKeyStorage) GetByCN ¶
func (s *DirKeyStorage) GetByCN(cn string) ([]*pair.X509Pair, error)
GetByCN return all pairs with cn
func (*DirKeyStorage) GetBySerial ¶
GetBySerial return only one pair with serial
func (*DirKeyStorage) GetLastByCn ¶
func (s *DirKeyStorage) GetLastByCn(cn string) (*pair.X509Pair, error)
GetLastByCn return only last pair with cn
type FileCRLHolder ¶
type FileCRLHolder struct {
// contains filtered or unexported fields
}
Common CRLHolder implementation. It's saving file on fs
func NewFileCRLHolder ¶
func NewFileCRLHolder(path string) *FileCRLHolder
func (*FileCRLHolder) Get ¶
func (h *FileCRLHolder) Get() (*pkix.CertificateList, error)
Get crl content from storage
func (*FileCRLHolder) Put ¶
func (h *FileCRLHolder) Put(content []byte) error
Save new crl content to storage
type FileSerialProvider ¶
type FileSerialProvider struct {
// contains filtered or unexported fields
}
FileSerialProvider implement SerialProvider interface with storing serial in file on fs
func NewFileSerialProvider ¶
func NewFileSerialProvider(path string) *FileSerialProvider
Click to show internal directories.
Click to hide internal directories.