Documentation ¶
Index ¶
- Variables
- type DB
- func (db *DB) Close() error
- func (db *DB) Get(ctx context.Context, chain []*x509.Certificate) (_ *extensions.Revocation, err error)
- func (db *DB) List(ctx context.Context) (revs []*extensions.Revocation, err error)
- func (db *DB) Put(ctx context.Context, chain []*x509.Certificate, revExt pkix.Extension) (err error)
- func (db *DB) TestGetStore() storage.KeyValueStore
Constants ¶
This section is empty.
Variables ¶
var ( // Error is a revocation error. Error = errs.Class("revocation") )
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB stores the most recently seen revocation for each nodeID (i.e. nodeID [CA certificate's public key hash] is the key, values is the most recently seen revocation).
func OpenDBFromCfg ¶
OpenDBFromCfg is a convenience method to create a revocation DB directly from a config. If the revocation extension option is not set, it returns a nil db with no error.
func (*DB) Get ¶
func (db *DB) Get(ctx context.Context, chain []*x509.Certificate) (_ *extensions.Revocation, err error)
Get attempts to retrieve the most recent revocation for the given cert chain (the key used in the underlying database is the nodeID of the certificate chain).
func (*DB) List ¶
func (db *DB) List(ctx context.Context) (revs []*extensions.Revocation, err error)
List lists all revocations in the store.
func (*DB) Put ¶
func (db *DB) Put(ctx context.Context, chain []*x509.Certificate, revExt pkix.Extension) (err error)
Put stores the most recent revocation for the given cert chain IF the timestamp is newer than the current value (the key used in the underlying database is the nodeID of the certificate chain).
func (*DB) TestGetStore ¶
func (db *DB) TestGetStore() storage.KeyValueStore
TestGetStore returns the internal store for testing.