From: Scott Cantor Date: Tue, 3 Jul 2012 20:41:13 +0000 (+0000) Subject: Register extended OAEP algorithm conditionally X-Git-Tag: 1.5.0~7 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=b0d95fa85f8783ba69fc3d88b94bd7541211142b Register extended OAEP algorithm conditionally --- diff --git a/config_win32.h b/config_win32.h index 29f3446..2159b4c 100644 --- a/config_win32.h +++ b/config_win32.h @@ -152,6 +152,9 @@ # 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. */ diff --git a/configure.ac b/configure.ac index 7d6c6b7..9a56609 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ]], + [[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 ]], diff --git a/xmltooling/XMLToolingConfig.cpp b/xmltooling/XMLToolingConfig.cpp index de5b91e..6e2f821 100644 --- a/xmltooling/XMLToolingConfig.cpp +++ b/xmltooling/XMLToolingConfig.cpp @@ -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); diff --git a/xmltooling/config_pub.h.in b/xmltooling/config_pub.h.in index 144a1f8..de3c0b1 100644 --- a/xmltooling/config_pub.h.in +++ b/xmltooling/config_pub.h.in @@ -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 diff --git a/xmltooling/config_pub_win32.h b/xmltooling/config_pub_win32.h index f58f6b7..b413fc1 100644 --- a/xmltooling/config_pub_win32.h +++ b/xmltooling/config_pub_win32.h @@ -56,3 +56,20 @@ /* Define to 1 if you have the `xsecsize_t' type. */ #define HAVE_XSECSIZE_T 1 + +#ifndef XMLTOOLING_NO_XMLSEC +# include +# 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 +