Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTimestampRequest ¶
NewTimestampRequest returns a new timestamp request based on the specified options.
Types ¶
type CRLClient ¶
type CRLClient struct { // HTTPClient is the HTTP client used to make CRL requests. // By default, an HTTP client with a 5 second timeout per request is used. HTTPClient *_ba.Client }
CRLClient represents a CRL (Certificate revocation list) client. It is used to request revocation data from CRL servers.
func (*CRLClient) MakeRequest ¶
MakeRequest makes a CRL request to the specified server and returns the response. If a server URL is not provided, it is extracted from the certificate.
type CertClient ¶
type CertClient struct { // HTTPClient is the HTTP client used to make certificate requests. // By default, an HTTP client with a 5 second timeout per request is used. HTTPClient *_ba.Client }
CertClient represents a X.509 certificate client. Its primary purpose is to download certificates.
func NewCertClient ¶
func NewCertClient() *CertClient
NewCertClient returns a new certificate client.
func (*CertClient) Get ¶
func (_ce *CertClient) Get(url string) (*_ee.Certificate, error)
Get retrieves the certificate at the specified URL.
func (*CertClient) GetIssuer ¶
func (_gd *CertClient) GetIssuer(cert *_ee.Certificate) (*_ee.Certificate, error)
GetIssuer retrieves the issuer of the provided certificate.
func (*CertClient) IsCA ¶
func (_eg *CertClient) IsCA(cert *_ee.Certificate) bool
IsCA returns true if the provided certificate appears to be a CA certificate.
type OCSPClient ¶
type OCSPClient struct { // HTTPClient is the HTTP client used to make OCSP requests. // By default, an HTTP client with a 5 second timeout per request is used. HTTPClient *_ba.Client // Hash is the hash function used when constructing the OCSP // requests. If zero, SHA-1 will be used. Hash _f.Hash }
OCSPClient represents a OCSP (Online Certificate Status Protocol) client. It is used to request revocation data from OCSP servers.
func (*OCSPClient) MakeRequest ¶
func (_eec *OCSPClient) MakeRequest(serverURL string, cert, issuer *_ee.Certificate) (*_cg.Response, []byte, error)
MakeRequest makes a OCSP request to the specified server and returns the parsed and raw responses. If a server URL is not provided, it is extracted from the certificate.
type TimestampClient ¶
type TimestampClient struct { // HTTPClient is the HTTP client used to make timestamp requests. // By default, an HTTP client with a 5 second timeout per request is used. HTTPClient *_ba.Client // Callbacks. BeforeHTTPRequest func(_ae *_ba.Request) error }
TimestampClient represents a RFC 3161 timestamp client. It is used to obtain signed tokens from timestamp authority servers.
func NewTimestampClient ¶
func NewTimestampClient() *TimestampClient
NewTimestampClient returns a new timestamp client.
func (*TimestampClient) GetEncodedToken ¶
GetEncodedToken executes the timestamp request and returns the DER encoded timestamp token bytes.