Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidCertificate = errors.New("invalid certificate provided") ErrNoOCSPServerDefined = errors.New("no OCSP Server defined") ErrCouldNotCreateOCSPRequest = errors.New("could not create OCSP request") ErrCouldNotPostOCSPRequest = errors.New("could not post OCSP request") ErrCouldNotReadOCSPResponse = errors.New("could not read OCSP response") ErrCouldNotCloseBody = errors.New("could not close response body") ErrCouldNotParseResponse = errors.New("response is not a valid ocsp response") )
Functions ¶
This section is empty.
Types ¶
type Stapling ¶
type Stapling struct {
// contains filtered or unexported fields
}
func NewStapling ¶
func NewStapling(ctx context.Context, certificate tls.Certificate) *Stapling
NewStapling creates a new Stapling struct. The context is provided for early cancellation. The certificate is stored inside the Stapling struct. Certificate with the OCSP staple included can be retrieved by using the stapling.Certificate() method.
func (*Stapling) Certificate ¶
func (s *Stapling) Certificate() (*tls.Certificate, error)
Certificate returns a copy of the internal certificate as a pointer. At the moment error is always nil, but included to satisfy the GetCertificate function from tls.Config return value
func (*Stapling) RunOCSPRenewal ¶
RunOCSPRenewal will run for-ever until ctx is cancelled. This function renews the OCSP staple in the internal certificate Every time the OCSP issuer server indicates the staple should be refreshed.
Click to show internal directories.
Click to hide internal directories.