X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Finternal.h;h=38663722e3650e6e2108bdaa1db062a9e20499fa;hb=4a4b8fd387a7c03b4ea3d052104c8ca70ceb4a35;hp=b222ef4079cf7d57a69dcf0982b78e04fd653161;hpb=dad9f0679e2a714ce7beddbff03acd801e52c831;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/internal.h b/xmltooling/internal.h index b222ef4..3866372 100644 --- a/xmltooling/internal.h +++ b/xmltooling/internal.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2005 Internet2 + * Copyright 2001-2010 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,14 +75,11 @@ namespace xmltooling { /// @cond OFF - class XMLToolingInternalConfig : public xmltooling::XMLToolingConfig + class XMLTOOL_DLLLOCAL XMLToolingInternalConfig : public XMLToolingConfig { public: - XMLToolingInternalConfig() : m_lock(NULL), m_parserPool(NULL), m_validatingPool(NULL) { -#ifndef XMLTOOLING_NO_XMLSEC - m_xsecProvider=NULL; -#endif - } + XMLToolingInternalConfig(); + ~XMLToolingInternalConfig(); static XMLToolingInternalConfig& getInternalConfig(); @@ -95,8 +92,8 @@ namespace xmltooling { void unlock(); // configuration - bool load_library(const char* path, void* context=NULL); - bool log_config(const char* config=NULL); + bool load_library(const char* path, void* context=nullptr); + bool log_config(const char* config=nullptr); // parser access ParserPool& getParser() const { @@ -109,13 +106,23 @@ namespace xmltooling { #ifndef XMLTOOLING_NO_XMLSEC XSECCryptoX509CRL* X509CRL() const; + std::pair mapXMLAlgorithmToKeyAlgorithm(const XMLCh* xmlAlgorithm) const; + void registerXMLAlgorithm( + const XMLCh* xmlAlgorithm, const char* keyAlgorithm, unsigned int size=0, XMLSecurityAlgorithmType type=ALGTYPE_UNK + ); + bool isXMLAlgorithmSupported(const XMLCh* xmlAlgorithm, XMLSecurityAlgorithmType type=ALGTYPE_UNK); + void registerXMLAlgorithms(); XSECProvider* m_xsecProvider; + private: + typedef std::map > > algmap_t; + algmap_t m_algorithmMap; #endif private: + int m_initCount; + Mutex* m_lock; std::vector m_libhandles; - void* m_lock; ParserPool* m_parserPool; ParserPool* m_validatingPool; };