[cpp-opensaml COMMIT] /branches/REL_2/samltest/encryption/EncryptedAssertionTest.h

noreply at shibboleth.net noreply at shibboleth.net
Sun Jun 24 21:17:19 BST 2012


Author: scantor
Date: Sun Jun 24 16:17:19 2012
New Revision: 734

URL: http://svn.shibboleth.net/view/cpp-opensaml?rev=734&view=rev
Log:
Use GCM in test when possible.

Modified:
    branches/REL_2/samltest/encryption/EncryptedAssertionTest.h

Modified: branches/REL_2/samltest/encryption/EncryptedAssertionTest.h
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/samltest/encryption/EncryptedAssertionTest.h?rev=734&r1=733&r2=734&view=diff
==============================================================================
--- branches/REL_2/samltest/encryption/EncryptedAssertionTest.h (original)
+++ branches/REL_2/samltest/encryption/EncryptedAssertionTest.h Sun Jun 24 16:17:19 2012
@@ -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 @@
         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);



More information about the commits mailing list