/usr/include/xsec/framework/XSECException.hpp is in libxml-security-c-dev 1.6.1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* XSEC
*
* XSECException:= How we throw exceptions in XSEC
*
* Author(s): Berin Lautenbach
*
* $Id: XSECException.hpp 1125514 2011-05-20 19:08:33Z scantor $
*
*/
#ifndef XSECEXCEPTION_INCLUDE
#define XSECEXCEPTION_INCLUDE
#include <xsec/framework/XSECDefs.hpp>
/**
* @addtogroup pubsig
* @{
*/
/**
* @brief Exception Class.
*
* <p>This class is used for all Exceptions raised by the XSEC library.
* It holds a "type" number that can be used to find the generic type
* of the exception, as well as a XMLCh string that holds a description of
* the error</p>
*
*/
class DSIG_EXPORT XSECException {
public:
/**
* \brief Type of Exception thrown.
*
* This enumerated type is used to inform the recipient of the
* exception what generic error caused it to be raised.
*/
enum XSECExceptionType {
None = 0,
MemoryAllocationFail = 1,
NoHashFoundInDigestValue = 2,
UnknownDSIGAttribute = 3,
ExpectedDSIGChildNotFound = 4,
UnknownTransform = 5,
TransformInputOutputFail = 6,
IDNotFoundInDOMDoc = 7,
UnsupportedXpointerExpr = 8,
XPathError = 9,
XSLError = 10,
Unsupported = 11,
LoadEmptySignature = 12,
LoadNonSignature = 13,
UnknownCanonicalization = 14,
UnknownSignatureAlgorithm = 15,
LoadEmptyX509 = 16,
LoadNonX509 = 17,
OpenSSLError = 18,
SigVfyError = 19,
LoadEmptySignedInfo = 20,
LoadNonSignedInfo = 21,
ExpectedReferenceURI = 22,
NotLoaded = 23,
CryptoProviderError = 24,
KeyInfoError = 25,
SigningError = 26,
LoadEmptyInfoName = 27,
LoadNonInfoName = 28,
UnknownKeyValue = 29,
SignatureCreationError = 30,
ErrorOpeningURI = 31,
ProviderError = 32,
InternalError = 33,
EnvelopeError = 34,
UnsupportedFunction = 35,
TransformError = 36,
SafeBufferError = 37,
HTTPURIInputStreamError = 38,
LoadEmptyXPathFilter = 39,
XPathFilterError = 40,
DNameDecodeError = 41,
// Encryption errors
EncryptedTypeError = 42,
ExpectedXENCChildNotFound = 43,
CipherDataError = 44,
CipherValueError = 45,
CipherError = 46,
AlgorithmMapperError = 47,
EncryptionMethodError = 48,
CipherReferenceError = 49,
ObjectError = 50,
// XKMS Error
XKMSError = 51,
ExpectedXKMSChildNotFound = 52,
MessageAbstractTypeError = 53,
RequestAbstractTypeError = 54,
ResultTypeError = 55,
StatusError = 56,
UnknownError = 58 // Must be last!
};
/** @name Constructors and Destructors */
//@{
/**
* \brief General Constructor
*
* Generic constructor used within the library. Where inMsg == NULL,
* the general string for this exception type will be used.
*
* @param eNum Exception type
* @param inMsg Msg to be used or NULL for general system message
*/
XSECException(XSECExceptionType eNum, const XMLCh * inMsg = NULL);
/**
* \brief Local code page constructor
*
* Shortcut constructor to allow local code page strings to be used
* for the message. Strings are converted to UTF-16.
*
* @param eNum Exception type
* @param inMsg Msg to be used or NULL for general system message
*/
XSECException(XSECExceptionType eNum, const char * inMsg);
// XSECException(XSECExceptionType eNum, safeBuffer &inMsg);
/**
* \brief Copy Constructor
*/
XSECException(const XSECException &toCopy);
/**
* \brief Destructor
*/
~XSECException();
//@}
/** @name Information functions */
//@{
/**
* \brief Get message
*
* Return a pointer to the XMLCh buffer holding the error message
*
* @returns A pointer to the buffer within the exception that holds the
* error message */
const XMLCh * getMsg(void);
/**
* \brief Get error type
*
* Returns an XSECExceptionType coding of the generic error that raised
* this exception
*
* @returns The excetpion type
*/
XSECExceptionType getType(void);
private:
XMLCh * msg; // Message to the caller
XSECExceptionType type; // Type of exception
/* Unimplemented Constructor */
XSECException();
};
/** @}*/
#endif /* XSECEXCEPTION_INCLUDE */
|