bolt

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Depot

type Depot struct {
	*bolt.DB
}

Depot implements a SCEP certifiacte store using boltdb. https://github.com/boltdb/bolt

func NewBoltDepot

func NewBoltDepot(db *bolt.DB) (*Depot, error)

NewBoltDepot creates a depot.Depot backed by BoltDB.

func (*Depot) CA

func (db *Depot) CA(pass []byte) ([]*x509.Certificate, *rsa.PrivateKey, error)

func (*Depot) CreateOrLoadCA

func (db *Depot) CreateOrLoadCA(key *rsa.PrivateKey, years int, org, country string) (*x509.Certificate, error)

func (*Depot) CreateOrLoadKey

func (db *Depot) CreateOrLoadKey(bits int) (*rsa.PrivateKey, error)

func (*Depot) HasCN

func (db *Depot) HasCN(cn string, allowTime int, cert *x509.Certificate, revokeOldCertificate bool) (bool, error)

func (*Depot) Put

func (db *Depot) Put(cn string, crt *x509.Certificate) error

func (*Depot) Serial

func (db *Depot) Serial() (*big.Int, error)

Jump to

Keyboard shortcuts

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