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 // CertChainPurpose is the purpose of the certificate chain. Supported // values are CodeSigning and Timestamping. // When not provided, the default value is CodeSigning. CertChainPurpose purpose.Purpose 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