crl

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package crl is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitSet

type BitSet struct {
	// contains filtered or unexported fields
}

BitSet implements a fixed-length atomic bitset backed by a slice of booleans

func NewBitSet

func NewBitSet(size int) *BitSet

NewBitSet create a fixed-length bitSe

func (*BitSet) IsSet

func (set *BitSet) IsSet(index int64) bool

IsSet checks whether the bit at index `index` was set

func (*BitSet) Len

func (set *BitSet) Len() int

Len returns the size of the bitSet

func (*BitSet) Set

func (set *BitSet) Set(index int64)

Set sets the bit at index `index`

type MockValidator

type MockValidator struct {
	// contains filtered or unexported fields
}

MockValidator is a mock of Validator interface.

func NewMockValidator

func NewMockValidator(ctrl *gomock.Controller) *MockValidator

NewMockValidator creates a new mock instance.

func (*MockValidator) Configure

func (m *MockValidator) Configure(config *tls.Config, maxValidityDays int)

Configure mocks base method.

func (*MockValidator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockValidator) IsRevoked

func (m *MockValidator) IsRevoked(issuer string, serialNumber *big.Int) bool

IsRevoked mocks base method.

func (*MockValidator) IsSynced

func (m *MockValidator) IsSynced(maxOffsetDays int) bool

IsSynced mocks base method.

func (*MockValidator) Sync

func (m *MockValidator) Sync() error

Sync mocks base method.

func (*MockValidator) SyncLoop

func (m *MockValidator) SyncLoop(ctx context.Context)

SyncLoop mocks base method.

type MockValidatorMockRecorder

type MockValidatorMockRecorder struct {
	// contains filtered or unexported fields
}

MockValidatorMockRecorder is the mock recorder for MockValidator.

func (*MockValidatorMockRecorder) Configure

func (mr *MockValidatorMockRecorder) Configure(config, maxValidityDays interface{}) *gomock.Call

Configure indicates an expected call of Configure.

func (*MockValidatorMockRecorder) IsRevoked

func (mr *MockValidatorMockRecorder) IsRevoked(issuer, serialNumber interface{}) *gomock.Call

IsRevoked indicates an expected call of IsRevoked.

func (*MockValidatorMockRecorder) IsSynced

func (mr *MockValidatorMockRecorder) IsSynced(maxOffsetDays interface{}) *gomock.Call

IsSynced indicates an expected call of IsSynced.

func (*MockValidatorMockRecorder) Sync

Sync indicates an expected call of Sync.

func (*MockValidatorMockRecorder) SyncLoop

func (mr *MockValidatorMockRecorder) SyncLoop(ctx interface{}) *gomock.Call

SyncLoop indicates an expected call of SyncLoop.

type SyncError

type SyncError struct {
	// contains filtered or unexported fields
}

SyncError is returned by the CRL database when synchronization fails

func (*SyncError) Error

func (err *SyncError) Error() string

func (*SyncError) Errors

func (err *SyncError) Errors() []error

Errors returns all errors that happened when synchronizing all CRLs

type Validator

type Validator interface {
	Sync() error
	SyncLoop(ctx context.Context)
	IsSynced(maxOffsetDays int) bool
	Configure(config *tls.Config, maxValidityDays int)
	IsRevoked(issuer string, serialNumber *big.Int) bool
}

Validator synchronizes CRLs and validates revoked certificates

func NewValidator

func NewValidator(certificates []*x509.Certificate) Validator

NewValidator returns a new instance of the CRL database

func NewValidatorWithHTTPClient

func NewValidatorWithHTTPClient(certificates []*x509.Certificate, httpClient *http.Client) Validator

NewValidatorWithHTTPClient returns a new instance with a pre-configured HTTP client

Jump to

Keyboard shortcuts

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