#ifndef XMLTOOLING_NO_XMLSEC
# include <curl/curl.h>
# include <openssl/err.h>
+# include <xsec/framework/XSECAlgorithmMapper.hpp>
# include <xsec/framework/XSECException.hpp>
# include <xsec/framework/XSECProvider.hpp>
# include <xsec/transformers/TXFMBase.hpp>
}
#ifndef XMLTOOLING_NO_XMLSEC
+
void xmltooling::log_openssl()
{
const char* file;
return new OpenSSLCryptoX509CRL();
}
+bool XMLToolingInternalConfig::isXMLAlgorithmSupported(const XMLCh* xmlAlgorithm)
+{
+ try {
+ if (XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(xmlAlgorithm))
+ return true;
+ }
+ catch (XSECException&) {
+ }
+ return false;
+}
+
void XMLToolingInternalConfig::registerXMLAlgorithms()
{
registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_MD5, "RSA", 0);
registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIAES256_CBC, "AES", 256);
registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIKW_AES256, "AES", 256);
}
+
#endif
#ifdef WIN32
* @param size a key size (or 0 if the size is irrelevant)
*/
virtual void registerXMLAlgorithm(const XMLCh* xmlAlgorithm, const char* keyAlgorithm, unsigned int size=0)=0;
+
+ /**
+ * Checks for implementation support of a particular XML security algorithm.
+ *
+ * @return true iff the algorithm is supported by the underlying libraries
+ */
+ virtual bool isXMLAlgorithmSupported(const XMLCh* xmlAlgorithm)=0;
#endif
/**