ocsp

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package ocsp provides methods for checking the OCSP revocation status of a certificate chain, as well as errors related to these checks

Package ocsp provides methods for checking the OCSP revocation status of a certificate chain, as well as errors related to these checks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckStatus

func CheckStatus(opts Options) ([]*result.CertRevocationResult, error)

CheckStatus checks OCSP based on the passed options and returns an array of result.CertRevocationResult objects that contains the results and error. The length of this array will always be equal to the length of the certificate chain.

Types

type GenericError

type GenericError struct {
	Err error
}

GenericError is returned when there is an error during the OCSP revocation check, not necessarily a revocation

func (GenericError) Error

func (e GenericError) Error() string

type NoServerError

type NoServerError struct{}

NoServerError is returned when the OCSPServer is not specified.

func (NoServerError) Error

func (e NoServerError) Error() string

type Options

type Options struct {
	CertChain   []*x509.Certificate
	SigningTime time.Time
	HTTPClient  *http.Client
}

Options specifies values that are needed to check OCSP revocation

type RevokedError

type RevokedError struct{}

RevokedError is returned when the certificate's status for OCSP is ocsp.Revoked

func (RevokedError) Error

func (e RevokedError) Error() string

type TimeoutError

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

TimeoutError is returned when the connection attempt to an OCSP URL exceeds the specified threshold

func (TimeoutError) Error

func (e TimeoutError) Error() string

type UnknownStatusError

type UnknownStatusError struct{}

UnknownStatusError is returned when the certificate's status for OCSP is ocsp.Unknown

func (UnknownStatusError) Error

func (e UnknownStatusError) Error() string

Jump to

Keyboard shortcuts

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