00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef XSECCRYPTOEXCEPTION_INCLUDE
00028 #define XSECCRYPTOEXCEPTION_INCLUDE
00029
00030 #include <xsec/utils/XSECSafeBuffer.hpp>
00031
00032 #include <stdlib.h>
00033
00046 extern const char * XSECCryptoExceptionStrings[];
00047
00064 class DSIG_EXPORT XSECCryptoException {
00065
00066 public:
00067
00078 enum XSECCryptoExceptionType {
00079
00080 None = 0,
00081 GeneralError = 1,
00082 MDError = 2,
00083 Base64Error = 3,
00084 MemoryError = 4,
00085 X509Error = 5,
00086 DSAError = 6,
00087 RSAError = 7,
00088 SymmetricError = 8,
00089 UnsupportedError = 9,
00090 UnsupportedAlgorithm = 10,
00091 UnknownError = 11
00092
00093 };
00094
00095
00096 public:
00097
00100
00113 XSECCryptoException(XSECCryptoExceptionType eNum, const char * inMsg = NULL);
00114
00124 XSECCryptoException(XSECCryptoExceptionType eNum, safeBuffer &inMsg);
00125
00132 XSECCryptoException(const XSECCryptoException &toCopy);
00133 ~XSECCryptoException();
00134
00136
00139
00148 const char * getMsg(void);
00149
00157
00158 XSECCryptoExceptionType getType(void);
00159
00160 private:
00161
00162 char * msg;
00163 XSECCryptoExceptionType type;
00164 XSECCryptoException();
00165
00166 };
00167
00168
00169 #endif