|
Line
Link Here
|
| 0 |
-- a/xmltooling/XMLToolingConfig.cpp |
0 |
++ b/xmltooling/XMLToolingConfig.cpp |
|
Lines 75-80
Link Here
|
| 75 |
# include <xsec/framework/XSECException.hpp> |
75 |
# include <xsec/framework/XSECException.hpp> |
| 76 |
# include <xsec/framework/XSECProvider.hpp> |
76 |
# include <xsec/framework/XSECProvider.hpp> |
| 77 |
# include <xsec/transformers/TXFMBase.hpp> |
77 |
# include <xsec/transformers/TXFMBase.hpp> |
|
|
78 |
# include <xsec/framework/XSECURIResolver.hpp> |
| 78 |
#endif |
79 |
#endif |
| 79 |
|
80 |
|
| 80 |
using namespace soap11; |
81 |
using namespace soap11; |
|
Lines 116-122
namespace {
Link Here
|
| 116 |
#endif |
117 |
#endif |
| 117 |
static ptr_vector<Mutex> g_openssl_locks; |
118 |
static ptr_vector<Mutex> g_openssl_locks; |
| 118 |
|
119 |
|
| 119 |
extern "C" void openssl_locking_callback(int mode,int n,const char *file,int line) |
120 |
extern "C" void openssl_locking_callback(int mode, int n, const char *, int) |
| 120 |
{ |
121 |
{ |
| 121 |
if (mode & CRYPTO_LOCK) |
122 |
if (mode & CRYPTO_LOCK) |
| 122 |
g_openssl_locks[n].lock(); |
123 |
g_openssl_locks[n].lock(); |
|
Lines 144-150
namespace {
Link Here
|
| 144 |
void setInput(TXFMBase *newInput) { |
145 |
void setInput(TXFMBase *newInput) { |
| 145 |
input = newInput; |
146 |
input = newInput; |
| 146 |
if (newInput->getOutputType() != TXFMBase::BYTE_STREAM) |
147 |
if (newInput->getOutputType() != TXFMBase::BYTE_STREAM) |
| 147 |
throw XSECException(XSECException::TransformInputOutputFail, "OutputLog transform requires BYTE_STREAM input"); |
148 |
throw XSECException(XSECException ::TransformInputOutputFail, "OutputLog transform requires BYTE_STREAM input"); |
| 148 |
keepComments = input->getCommentsStatus(); |
149 |
keepComments = input->getCommentsStatus(); |
| 149 |
m_log.debug("\n----- BEGIN SIGNATURE DEBUG -----\n"); |
150 |
m_log.debug("\n----- BEGIN SIGNATURE DEBUG -----\n"); |
| 150 |
} |
151 |
} |
|
Lines 175-180
namespace {
Link Here
|
| 175 |
return nullptr; |
176 |
return nullptr; |
| 176 |
} |
177 |
} |
| 177 |
|
178 |
|
|
|
179 |
class BlockingXSECURIResolver : public XSECURIResolver { |
| 180 |
public: |
| 181 |
BlockingXSECURIResolver() : m_log(Category::getInstance(XMLTOOLING_LOGCAT ".XMLSecurity")) {} |
| 182 |
~BlockingXSECURIResolver() {} |
| 183 |
|
| 184 |
BinInputStream* resolveURI(const XMLCh* uri) { |
| 185 |
auto_ptr_char temp(uri); |
| 186 |
m_log.warn("blocked remote resource retrieval by xml-security-c library: %s", |
| 187 |
temp.get() ? temp.get() : "(none)"); |
| 188 |
return nullptr; |
| 189 |
} |
| 190 |
|
| 191 |
void setBaseURI(const XMLCh* uri) {} |
| 192 |
|
| 193 |
XSECURIResolver* clone() { |
| 194 |
return new BlockingXSECURIResolver(); |
| 195 |
} |
| 196 |
|
| 197 |
private: |
| 198 |
Category& m_log; |
| 199 |
}; |
| 178 |
#endif |
200 |
#endif |
| 179 |
|
201 |
|
| 180 |
#ifdef WIN32 |
202 |
#ifdef WIN32 |
|
Lines 400-405
bool XMLToolingInternalConfig::init(bool deprecationSupport)
Link Here
|
| 400 |
XSECPlatformUtils::Initialise(); |
422 |
XSECPlatformUtils::Initialise(); |
| 401 |
XSECPlatformUtils::SetReferenceLoggingSink(TXFMOutputLogFactory); |
423 |
XSECPlatformUtils::SetReferenceLoggingSink(TXFMOutputLogFactory); |
| 402 |
m_xsecProvider.reset(new XSECProvider()); |
424 |
m_xsecProvider.reset(new XSECProvider()); |
|
|
425 |
m_xsecProvider->setDefaultURIResolver(new BlockingXSECURIResolver()); |
| 403 |
log.debug("XML-Security %s initialization complete", XSEC_FULLVERSIONDOT); |
426 |
log.debug("XML-Security %s initialization complete", XSEC_FULLVERSIONDOT); |
| 404 |
#endif |
427 |
#endif |