Use GCM in test when possible.
authorscantor <scantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Sun, 24 Jun 2012 20:17:19 +0000 (20:17 +0000)
committerscantor <scantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Sun, 24 Jun 2012 20:17:19 +0000 (20:17 +0000)
git-svn-id: https://svn.shibboleth.net/cpp-opensaml/branches/REL_2@734 fb386ef7-a10c-0410-8ebf-fd3f8e989ab0

samltest/encryption/EncryptedAssertionTest.h

index 33d701b..43eb34c 100644 (file)
@@ -29,6 +29,7 @@
 #include <saml/saml2/metadata/MetadataCredentialContext.h>
 #include <saml/saml2/metadata/MetadataCredentialCriteria.h>
 #include <xmltooling/security/Credential.h>
+#include <xsec/dsig/DSIGConstants.hpp>
 
 using namespace opensaml::saml2md;
 using namespace opensaml::saml2;
@@ -125,8 +126,12 @@ public:
         vector< pair<const MetadataProvider*,MetadataCredentialCriteria*> > recipients(
             1, pair<const MetadataProvider*,MetadataCredentialCriteria*>(m_metadata, &mcc)
             );
+#ifdef XSEC_OPENSSL_HAVE_GCM
+        encrypted->encrypt(*assertion.get(), recipients, false, DSIGConstants::s_unicodeStrURIAES256_GCM);
+#else
         encrypted->encrypt(*assertion.get(), recipients);
-        
+#endif
+
         // Roundtrip it.
         string buf;
         XMLHelper::serialize(encrypted->marshall(), buf);