setasign\SetaPDF2\Signer\Ocsp
Response Class representing an OCSPResponse structure.
File: /SetaPDF v2/Signer/Ocsp/Response.php
Old class name (alias):
\SetaPDF_Signer_Ocsp_Response
OCSPResponse ::= SEQUENCE { responseStatus OCSPResponseStatus, responseBytes [0] EXPLICIT ResponseBytes OPTIONAL } OCSPResponseStatus ::= ENUMERATED { successful (0), --Response has valid confirmations malformedRequest (1), --Illegal confirmation request internalError (2), --Internal error in issuer tryLater (3), --Try again later --(4) is not used sigRequired (5), --Must sign the request unauthorized (6) --Request unauthorized }
Class hierarchy
Summary
Constants
STATUS_INTERNAL_ERROR
Status constant.
STATUS_MALFORMED_REQUEST
Status constant.
STATUS_SIG_REQUIRED
Status constant.
STATUS_SUCCESSFUL
Status constant.
STATUS_TRY_LATER
Status constant.
STATUS_UNAUTHORIZED
Status constant.
Static Properties
$usePhpseclibForRsaPss
Flag defining whether usage of phpseclib or default OpenSSL methods for RSA_PSS validation.
$verifyCallback
A callable that can be used to implement individual verification logic.
Properties
$_basicResponse
The basic response element if available.
$_response
The response message.
$_singleResponses
An array of the single responses.
Methods
__construct()
The constructor.
Parameters
- $response : string
Exceptions
Throws \setasign\SetaPDF2\Signer\Asn1\Exception
Throws \InvalidArgumentException
_getBasicResponse()
Get the basic response element.
Exceptions
Throws \setasign\SetaPDF2\Signer\Asn1\Exception,\setasign\SetaPDF2\Signer\Exception
_getExtension()
Get an extension from the response by its OID.
Parameters
- $extensionOid : string
Exceptions
_getResponseData()
getCertificates()
Get all certificates embedded in the response.
Exceptions
getNonce()
getProducedAt()
getResponderId()
Get the responder id from the responder data.
Exceptions
getSignatureAlgorithm()
Exceptions
getSignatureValue()
getSingleResponses()
Get the single responses from the response.
Exceptions
isGood()
Checks if this response object is "good".
Evaluates to true if the status of the whole response is self::STATUS_SUCCESSFUL and the certificate status of all single responses are SingleResponse::CERT_STATUS_GOOD.
Exceptions
verify()
Verify the signed object.
Parameters
- $signerCertificate : \SetaPDF_Signer_X509_Certificate
Exceptions
withoutCertificates()
This method returns a new instance with the certs field removed in the BasicOCSPResponse.