SetaPDF_Signer_Ocsp_Response Class representing an OCSPResponse structure.
File: /SetaPDF v2/Signer/Ocsp/Response.php
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.
Methods
__construct()
The constructor.
Parameters
- $response : string
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws InvalidArgumentException
_getBasicResponse()
Get the basic response element.
Exceptions
Throws SetaPDF_Signer_Asn1_Exception,SetaPDF_Signer_Exception
_getExtension()
Get an extension from the response by its OID.
Parameters
- $extensionOid : string
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
_getResponseData()
Get the responseData.
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
getCertificates()
Get all certificates embedded in the response.
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
getNonce()
Get the nonce value from the response.
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
getProducedAt()
Get the producedAt information.
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
getResponderId()
Get the responder id from the responder data.
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
getSignatureAlgorithm()
getSignatureValue()
Parameters
- $hex : bool
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
getSignedData()
Exceptions
Throws SetaPDF_Signer_Exception
getSingleResponses()
Get the single responses from the response.
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
getStatus()
Get the status of the response.
Return Values
See self::STATUS_* constants.
Exceptions
Throws SetaPDF_Signer_Exception
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
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
verify()
Verify the signed object.
Parameters
- $signerCertificate : SetaPDF_Signer_X509_Certificate
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception
withoutCertificates()
This method returns a new instance with the certs field removed in the BasicOCSPResponse.
Exceptions
Throws SetaPDF_Signer_Asn1_Exception
Throws SetaPDF_Signer_Exception