X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=blobdiff_plain;f=samltest%2Fsaml1%2Fbinding%2FSAML1POSTTest.h;h=81c1d7e2b7b97fb912fd796cf5699796b40da19e;hp=eb8278c21cbb8daa347681a1801a2afe7603bc81;hb=5d4b679f292a46494e822e9634f0ffa06f8f421c;hpb=bd9231e66414ec239402ab809ae46fa3be97ca3b diff --git a/samltest/saml1/binding/SAML1POSTTest.h b/samltest/saml1/binding/SAML1POSTTest.h index eb8278c..81c1d7e 100644 --- a/samltest/saml1/binding/SAML1POSTTest.h +++ b/samltest/saml1/binding/SAML1POSTTest.h @@ -46,11 +46,11 @@ public: ); janitor.release(); - CredentialCriteria cc; - cc.setUsage(CredentialCriteria::SIGNING_CREDENTIAL); - Locker clocker(m_creds); - const Credential* cred = m_creds->resolve(&cc); - TSM_ASSERT("Retrieved credential was null", cred!=NULL); + CredentialCriteria cc; + cc.setUsage(CredentialCriteria::SIGNING_CREDENTIAL); + Locker clocker(m_creds); + const Credential* cred = m_creds->resolve(&cc); + TSM_ASSERT("Retrieved credential was null", cred!=NULL); // Freshen timestamp and ID. toSend->setIssueInstant(time(NULL)); @@ -70,7 +70,11 @@ public: samlconstants::SAML1_PROFILE_BROWSER_POST, encoder_config->getDocumentElement() ) ); - encoder->encode(*this,toSend.get(),"https://sp.example.org/SAML/SSO","https://sp.example.org/","state",cred); + + Locker locker(m_metadata); + encoder->encode( + *this,toSend.get(),"https://sp.example.org/SAML/SSO",m_metadata->getEntityDescriptor("https://sp.example.org/"),"state",cred + ); toSend.release(); // Decode message. @@ -78,7 +82,6 @@ public: auto_ptr decoder( SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_POST, NULL) ); - Locker locker(m_metadata); auto_ptr response(dynamic_cast(decoder->decode(relayState,*this,policy))); // Test the results.