SetaPDF_Signer_Ocsp_Client Class representing an OCSP client.

File: /SetaPDF v2/Signer/Ocsp/Client.php

Class hierarchy

Summary

Properties

$_curlOptions

protected array SetaPDF_Signer_Ocsp_Client::$_curlOptions = array()

Additional curl options

$_httpResolver

$_lastResponse

The last response of the OCSP responder

$_logger

protected LoggerInterface SetaPDF_Signer_Ocsp_Client::$_logger

The logger instance.


Methods

__construct()

public SetaPDF_Signer_Ocsp_Client::__construct (
[ null|string $url = null ]
)

The constructor.

Parameters
$url : null|string

The URL of the OCSP responder.

getCurlOption()

public SetaPDF_Signer_Ocsp_Client::getCurlOption (
int $option
): string|null

Returns a defined cURL option or null if not set.

Parameters
$option : int

The CURLOPT_XXX option to set

getCurlOptions()

Get the cURL transfer options.

getHttpResolver()

public SetaPDF_Signer_Ocsp_Client::getHttpResolver (
void
): HttpResolver

Get the HttpResolver instance

Note that cURL options of this instance will be overwritten in the send() method and need to be defined by e.g. the setCurlOptions() method of this Client instance.

Also, the logger instance is set/synced/overwritten in send().

getLastResponse()

Returns the last response of the OCSP responder.

getLogger()

public SetaPDF_Signer_Ocsp_Client::getLogger (
void
): LoggerInterface

Get the logger instance.

If no logger instance was passed before a new instance of SetaPDF_Signer_ValidationRelatedInfo_Logger is returned.

getUrl()

public SetaPDF_Signer_Ocsp_Client::getUrl (
void
): string|null

Returns the URL of the OCSP responder.

send()

public SetaPDF_Signer_Ocsp_Client::send (
Request $request
): Response

Send the OCSP request to the responder.

Parameters
$request : Request
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception,SetaPDF_Signer_Exception

setCurlOption()

public SetaPDF_Signer_Ocsp_Client::setCurlOption (
int|array $option [, string|null $value = null ]
): void

Sets one or more cURL options with the assigned value.

Parameters
$option : int|array

The CURLOPT_XXX option to set

$value : string|null

The value to be set on option

See

setCurlOptions()

public SetaPDF_Signer_Ocsp_Client::setCurlOptions (
array $curlOptions
): void

Set options for the cURL transfer.

Parameters
$curlOptions : array

The curl options.

See

setLogger()

public SetaPDF_Signer_Ocsp_Client::setLogger (
LoggerInterface $logger
): void

Set a logger instance.

Parameters
$logger : LoggerInterface
 

setUrl()

public SetaPDF_Signer_Ocsp_Client::setUrl (
string $url
): void

Sets the URL of the OCSP responder.

Parameters
$url : string

The url to the OCSP responder