Major revamp of credential and trust handling code, PKIX engine still needs work.
[shibboleth/cpp-opensaml.git] / saml / encryption / EncryptedKeyResolver.cpp
index 6a8f81b..8831717 100644 (file)
  
 #include "internal.h"
 #include "encryption/EncryptedKeyResolver.h"
+#include "saml2/core/Assertions.h"
 
 using namespace xmlencryption;
 using namespace std;
 
-EncryptedKey* opensaml::EncryptedKeyResolver::resolveKey(EncryptedData& encryptedData) const
+const EncryptedKey* opensaml::EncryptedKeyResolver::resolveKey(const EncryptedData& encryptedData, const XMLCh* recipient) const
 {
     const vector<EncryptedKey*>& keys=m_ref.getEncryptedKeys();
     for (vector<EncryptedKey*>::const_iterator i=keys.begin(); i!=keys.end(); i++) {
-        if (XMLString::equals(m_recipient,(*i)->getRecipient()))
+        if (XMLString::equals(recipient,(*i)->getRecipient()))
             return (*i);
     }
     return NULL;