Reducing header overuse, non-inlining selected methods (CPPOST-35).
[shibboleth/cpp-opensaml.git] / saml / saml2 / core / impl / Assertions.cpp
index d87a9db..c362e4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2007 Internet2
+ *  Copyright 2001-2009 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "saml2/metadata/MetadataCredentialCriteria.h"
 
 #include <xmltooling/logging.h>
+#include <xmltooling/XMLToolingConfig.h>
 #include <xmltooling/encryption/Encrypter.h>
 #include <xmltooling/encryption/Decrypter.h>
+#include <xmltooling/security/Credential.h>
+#include <xmltooling/signature/KeyInfo.h>
+
+#include <xsec/utils/XSECPlatformUtils.hpp>
 
 using namespace opensaml::saml2md;
 using namespace opensaml::saml2;
@@ -50,7 +55,7 @@ void EncryptedElementType::encrypt(
 {
     // With one recipient, we let the library generate the encryption key for us.
     // Get the key encryption key to use.
-    criteria.setUsage(CredentialCriteria::ENCRYPTION_CREDENTIAL);
+    criteria.setUsage(Credential::ENCRYPTION_CREDENTIAL);
     const Credential* KEK = metadataProvider.resolve(&criteria);
     if (!KEK)
         throw EncryptionException("No key encryption credential found.");
@@ -105,7 +110,7 @@ void EncryptedElementType::encrypt(
     // Now we encrypt the key for each recipient.
     for (vector< pair<const MetadataProvider*, MetadataCredentialCriteria*> >::const_iterator r = recipients.begin(); r!=recipients.end(); ++r) {
         // Get key encryption key to use.
-        r->second->setUsage(CredentialCriteria::ENCRYPTION_CREDENTIAL);
+        r->second->setUsage(Credential::ENCRYPTION_CREDENTIAL);
         const Credential* KEK = r->first->resolve(r->second);
         if (!KEK) {
             auto_ptr_char name(dynamic_cast<const EntityDescriptor*>(r->second->getRole().getParent())->getEntityID());