bolt

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 10 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
	// contains filtered or unexported fields
}

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, challnge string) 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