X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=samltest%2Fsaml1%2Fbinding%2FSAML1ArtifactTest.h;h=5f2dfca1bedf6b222b2e77474e815e2a13b23b94;hb=9d61992f725e8b73421e9262a711f4cbdd782b18;hp=d7ddf2c159a08da67f027bf30f22c79135d6ee04;hpb=5d4b679f292a46494e822e9634f0ffa06f8f421c;p=shibboleth%2Fcpp-opensaml.git diff --git a/samltest/saml1/binding/SAML1ArtifactTest.h b/samltest/saml1/binding/SAML1ArtifactTest.h index d7ddf2c..5f2dfca 100644 --- a/samltest/saml1/binding/SAML1ArtifactTest.h +++ b/samltest/saml1/binding/SAML1ArtifactTest.h @@ -39,7 +39,8 @@ public: void testSAML1Artifact() { try { QName idprole(samlconstants::SAML20MD_NS, IDPSSODescriptor::LOCAL_NAME); - SecurityPolicy policy(m_rules1, m_metadata, &idprole, m_trust, false); + SecurityPolicy policy(m_metadata, &idprole, m_trust, false); + policy.getRules().assign(m_rules1.begin(), m_rules1.end()); // Read message to use from file. string path = data_path + "saml1/binding/SAML1Assertion.xml"; @@ -59,19 +60,22 @@ public: // Encode message. auto_ptr encoder( - SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, NULL) + SAMLConfig::getConfig().MessageEncoderManager.newPlugin( + samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, pair(NULL,NULL) + ) ); - encoder->setArtifactGenerator(this); Locker locker(m_metadata); encoder->encode( - *this,toSend.get(),"https://sp.example.org/SAML/SSO",m_metadata->getEntityDescriptor("https://sp.example.org/"),"state",cred + *this,toSend.get(),"https://sp.example.org/SAML/SSO",m_metadata->getEntityDescriptor("https://sp.example.org/"),"state",this,cred ); toSend.release(); // Decode message. string relayState; auto_ptr decoder( - SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, NULL) + SAMLConfig::getConfig().MessageDecoderManager.newPlugin( + samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, pair(NULL,NULL) + ) ); decoder->setArtifactResolver(this); auto_ptr response(dynamic_cast(decoder->decode(relayState,*this,policy))); @@ -128,7 +132,7 @@ public: TSM_ASSERT("Retrieved credential was null", cred!=NULL); response->marshall((DOMDocument*)NULL,&sigs,cred); SchemaValidators.validate(response.get()); - policy.evaluate(*(response.get()), this); + policy.evaluate(*(response.get()), this, samlconstants::SAML11_PROTOCOL_ENUM); return response.release(); }