Documentation ¶
Index ¶
Constants ¶
View Source
const ( RespTimeLimit = "10s" // Time limit for OCSP response to be served TimeoutInSeconds = 20 // Time limit for http response before timeout )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helpers ¶
type Helpers struct{}
Helpers is an exported struct of type HelpersInterface
func (Helpers) CreateOCSPReq ¶
func (h Helpers) CreateOCSPReq(ocspURL string, leafCert *x509.Certificate, issuerCert *x509.Certificate, reqMethod string, hash crypto.Hash) (*http.Request, error)
CreateOCSPReq creates an OCSP request using either GET or POST (see IETF RFC 6960) leafCert is the root certificate (first certificate in the chain) issuerCert is the certificate of the issuer of the leafCert reqMethod is either GET or POST hash is the hash to use to encode the request (either SHA1 or SHA256 right now)
func (Helpers) GetCertFromIssuerURL ¶
func (h Helpers) GetCertFromIssuerURL(issuerURL string) (*x509.Certificate, error)
GetCertFromIssuerURL takes an issuerURL and sends a GET request to the URL to retrieve its certificate Assumes that sending a GET request to the provided URL will return its certificate
type HelpersInterface ¶
type HelpersInterface interface { GetCertFromIssuerURL(string) (*x509.Certificate, error) CreateOCSPReq(string, *x509.Certificate, *x509.Certificate, string, crypto.Hash) (*http.Request, error) GetOCSPResp(*http.Request) ([]byte, error) }
HelpersInterface is an interface for the functions that can be used from this file
Click to show internal directories.
Click to hide internal directories.