Documentation ¶
Index ¶
- Variables
- func GetIssuer(cert *x509.Certificate) (*x509.Certificate, error)
- func GetIssuerFile(f string) (*x509.Certificate, error)
- func PrettyResponse(resp *ocsp.Response) string
- func RegisterFlags()
- func Req(cert *x509.Certificate, config Config) (*ocsp.Response, error)
- func ReqDER(der []byte, config Config) (*ocsp.Response, error)
- func ReqFile(fileName string, config Config) (*ocsp.Response, error)
- func ReqSerial(serialNumber *big.Int, config Config) (*ocsp.Response, error)
- type Config
- type StatusCodeError
Constants ¶
This section is empty.
Variables ¶
var DefaultConfig = Config{ // contains filtered or unexported fields }
DefaultConfig is a Config populated with a set of curated default values intended for library test usage of this package.
Functions ¶
func GetIssuer ¶
func GetIssuer(cert *x509.Certificate) (*x509.Certificate, error)
func GetIssuerFile ¶
func GetIssuerFile(f string) (*x509.Certificate, error)
func PrettyResponse ¶
func RegisterFlags ¶
func RegisterFlags()
RegisterFlags registers command-line flags that affect OCSP checking.
func Req ¶
Req makes an OCSP request using the given config for the given in-memory certificate, and returns the response.
func ReqDER ¶
ReqDER makes an OCSP request using the given config for the given DER-encoded certificate, and returns the response.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config contains fields which control various behaviors of the checker's behavior.
func ConfigFromFlags ¶
ConfigFromFlags returns a Config whose values are populated from any command line flags passed by the user, or default values if not passed. However, it replaces io.Discard with os.Stdout so that CLI usages of this package will produce output on stdout by default.
func (Config) WithExpectReason ¶
WithExpectReason returns a new Config with the given expectReason, and all other fields the same as the receiver.
func (Config) WithExpectStatus ¶
WithExpectStatus returns a new Config with the given expectStatus, and all other fields the same as the receiver.
type StatusCodeError ¶
func (StatusCodeError) Error ¶
func (e StatusCodeError) Error() string