Register extended OAEP algorithm conditionally
authorScott Cantor <cantor.2@osu.edu>
Tue, 3 Jul 2012 20:41:13 +0000 (20:41 +0000)
committerScott Cantor <cantor.2@osu.edu>
Tue, 3 Jul 2012 20:41:13 +0000 (20:41 +0000)
config_win32.h
configure.ac
xmltooling/XMLToolingConfig.cpp
xmltooling/config_pub.h.in
xmltooling/config_pub_win32.h

index 29f3446..2159b4c 100644 (file)
 #  define XMLTOOLING_XMLSEC_ECC 1
 #  define XMLTOOLING_XMLSEC_DEBUGLOGGING 1
 # endif
+# if (_XSEC_VERSION_FULL >= 10700)
+#  define XMLTOOLING_XMLSEC_OAEP11 1
+# endif
 #endif
 
 /* Define to empty if `const' does not conform to ANSI C. */
index 7d6c6b7..9a56609 100644 (file)
@@ -348,6 +348,13 @@ int i = 0;
         [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_C14N11],[1],[Define to 1 if XML-Security-C includes C14N 1.1 support.])],
         [AC_MSG_RESULT([no])])
 
+    AC_MSG_CHECKING([whether XML-Security-C includes MGF-pluggable RSA-OAEP support])
+    AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGConstants.hpp>]],
+            [[encryptionMethod em = ENCRYPT_RSA_OAEP;]])],
+        [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_OAEP11],[1],[Define to 1 if XML-Security-C includes MGF-pluggable RSA-OAEP support.])],
+        [AC_MSG_RESULT([no])])
+
     AC_MSG_CHECKING([whether XML-Security-C includes debug logging support])
     AC_COMPILE_IFELSE(
         [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
index de5b91e..6e2f821 100644 (file)
@@ -798,6 +798,9 @@ void XMLToolingInternalConfig::registerXMLAlgorithms()
 
     registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_1_5, "RSA", 0, ALGTYPE_KEYENCRYPT);
     registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1, "RSA", 0, ALGTYPE_KEYENCRYPT);
+#ifdef XMLTOOLING_XSEC_OAEP11
+    registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_OAEP, "RSA", 0, ALGTYPE_KEYENCRYPT);
+#endif
 
     registerXMLAlgorithm(DSIGConstants::s_unicodeStrURI3DES_CBC, "DESede", 192, ALGTYPE_ENCRYPT);
     registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIKW_3DES, "DESede", 192, ALGTYPE_KEYENCRYPT);
index 144a1f8..de3c0b1 100644 (file)
@@ -32,3 +32,6 @@
 
 /* Define to 1 if you have the `xsecsize_t' type. */
 #undef HAVE_XSECSIZE_T
+
+/* Define to 1 if XML-Security-C includes MGF-pluggable RSA-OAEP support. */
+#undef XMLTOOLING_XMLSEC_OAEP11
index f58f6b7..b413fc1 100644 (file)
 
 /* Define to 1 if you have the `xsecsize_t' type. */
 #define HAVE_XSECSIZE_T 1
+
+#ifndef XMLTOOLING_NO_XMLSEC
+# include <xsec/framework/XSECDefs.hpp>
+# if (_XSEC_VERSION_FULL >= 10500)
+#  define XMLTOOLING_XMLSEC_C14N11 1
+# endif
+# if (_XSEC_VERSION_FULL >= 10600)
+#  define XMLTOOLING_XMLSEC_MULTIPLECRL 1
+#  define XMLTOOLING_XMLSEC_SIGALGORITHM 1
+#  define XMLTOOLING_XMLSEC_ECC 1
+#  define XMLTOOLING_XMLSEC_DEBUGLOGGING 1
+# endif
+# if (_XSEC_VERSION_FULL >= 10700)
+#  define XMLTOOLING_XMLSEC_OAEP11 1
+# endif
+#endif
+