libdigidocpp
digidoc::OCSPException Class Reference

#include <OCSPException.h>

Inheritance diagram for digidoc::OCSPException:
Inheritance graph
Collaboration diagram for digidoc::OCSPException:
Collaboration graph

Public Member Functions

 OCSPException (const std::string &file, int line, const std::string &msg, int responseStatusCode)
 OCSPException (const std::string &file, int line, const std::string &msg, const Exception &cause, int responseStatusCode)
int getResponseStatusCode ()
std::string getResponseStatusMessage ()
- Public Member Functions inherited from digidoc::Exception
 Exception (const std::string &file, int line, const std::string &msg)
 Exception (const std::string &file, int line, const std::string &msg, const Exception &cause)
ExceptionCode code () const
int ddoc () const
std::string getMsg () const
bool hasCause () const
Causes getCauses () const
void addCause (const Exception &cause)
void setCode (ExceptionCode Code)
void setDDoc (int err)

Static Public Member Functions

static std::string toResponseStatusMessage (int responseStatusCode)

Private Attributes

int responseStatusCode

Additional Inherited Members

- Public Types inherited from digidoc::Exception
enum  ExceptionCode {
  CertificateIssuerMissing = 10, CertificateRevoked = 5, CertificateUnknown = 6, NoException = 0,
  OCSPResponderMissing = 8, OCSPCertMissing = 9, OCSPTimeSlot = 7, OCSPRequestUnauthorized = 11,
  PINCanceled = 2, PINFailed = 4, PINIncorrect = 1, PINLocked = 3
}
typedef std::vector< ExceptionCauses
- Protected Attributes inherited from digidoc::Exception
std::string file
std::string msg
int line
int m_ddoc
Causes causes
ExceptionCode m_code

Detailed Description

OCSP exception implementation. Thrown if OCSP response is not valid or OCSP response status code is not Successful (0x00). OCSP status code can be accessed with method getResponseStatusMessage(). For example if the status code is 0x03 (TryLater) the OCSP request can be be made again (e.g. the OCSP server could be busy at the time).

Author
Janari Põld

Definition at line 35 of file OCSPException.h.

Constructor & Destructor Documentation

digidoc::OCSPException::OCSPException ( const std::string &  file,
int  line,
const std::string &  msg,
int  responseStatusCode 
)
Parameters
filefilename, where the exception was thrown.
lineline of the file, where the exception was thrown.
msgerror message.
responseStatusCodeOCSP response status code.
See Also
Exception::Exception(const std::string& file, int line, const std::string& msg)

Definition at line 32 of file OCSPException.cpp.

digidoc::OCSPException::OCSPException ( const std::string &  file,
int  line,
const std::string &  msg,
const Exception cause,
int  responseStatusCode 
)
Parameters
filefilename, where the exception was thrown.
lineline of the file, where the exception was thrown.
msgerror message.
causecause of the exception.
responseStatusCodeOCSP response status code.
See Also
Exception::Exception(const std::string& file, int line, const std::string& msg, const Exception& cause)
Exception::hasCause()
Exception::getCause()

Definition at line 48 of file OCSPException.cpp.

Member Function Documentation

int digidoc::OCSPException::getResponseStatusCode ( )
Returns
returns OCSP response status code.

Definition at line 57 of file OCSPException.cpp.

std::string digidoc::OCSPException::getResponseStatusMessage ( )
Returns
returns OCSP response status message.

Definition at line 65 of file OCSPException.cpp.

std::string digidoc::OCSPException::toResponseStatusMessage ( int  responseStatusCode)
static

Converts OCSP response status code to corresponding status message.

Parameters
responseStatusCodeOCSP response status code.
Returns
OCSP status message.

Definition at line 76 of file OCSPException.cpp.

Referenced by digidoc::OCSP::validateResponse().

Here is the caller graph for this function:

Member Data Documentation

int digidoc::OCSPException::responseStatusCode
private

Definition at line 46 of file OCSPException.h.


The documentation for this class was generated from the following files: