/*\r
- * Copyright 2001-2005 Internet2\r
+ * Copyright 2001-2007 Internet2\r
* \r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
void testSAML2Artifact() {\r
try {\r
QName idprole(samlconstants::SAML20MD_NS, IDPSSODescriptor::LOCAL_NAME);\r
- SecurityPolicy policy(m_rules2, m_metadata, &idprole, m_trust);\r
+ SecurityPolicy policy(m_rules2, m_metadata, &idprole, m_trust, false);\r
\r
// Read message to use from file.\r
string path = data_path + "saml2/binding/SAML2Response.xml";\r
);\r
janitor.release();\r
\r
+ CredentialCriteria cc;\r
+ cc.setUsage(CredentialCriteria::SIGNING_CREDENTIAL);\r
+ Locker clocker(m_creds);\r
+ const Credential* cred = m_creds->resolve(&cc);\r
+ TSM_ASSERT("Retrieved credential was null", cred!=NULL);\r
+\r
// Freshen timestamp.\r
toSend->setIssueInstant(time(NULL));\r
\r
SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_ARTIFACT, NULL)\r
);\r
encoder->setArtifactGenerator(this);\r
- encoder->encode(*this,toSend.get(),"https://sp.example.org/SAML/SSO","https://sp.example.org/","state",m_creds);\r
+ encoder->encode(*this,toSend.get(),"https://sp.example.org/SAML/SSO","https://sp.example.org/","state",cred);\r
toSend.release();\r
\r
// Decode message.\r