projects
/
shibboleth
/
cpp-opensaml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add policy rules for SAML 1 SSO and SAML 2 Bearer confirmation, with unit tests.
[shibboleth/cpp-opensaml.git]
/
samltest
/
saml1
/
profile
/
SAML1PolicyTest.h
diff --git
a/samltest/saml1/profile/SAML1PolicyTest.h
b/samltest/saml1/profile/SAML1PolicyTest.h
index
49554e5
..
3ea4593
100644
(file)
--- a/
samltest/saml1/profile/SAML1PolicyTest.h
+++ b/
samltest/saml1/profile/SAML1PolicyTest.h
@@
-24,18
+24,18
@@
using namespace opensaml;
class SAML1PolicyTest : public CxxTest::TestSuite {
SecurityPolicy* m_policy;
class SAML1PolicyTest : public CxxTest::TestSuite {
SecurityPolicy* m_policy;
-
SecurityPolicyRule* m_rule
;
+
vector<SecurityPolicyRule*> m_rules
;
public:
void setUp() {
m_policy = NULL;
public:
void setUp() {
m_policy = NULL;
- m_rule
= NULL
;
- m_rule
= SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(CONDITIONS_POLICY_RULE, NULL
);
+ m_rule
s.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(CONDITIONS_POLICY_RULE, NULL))
;
+ m_rule
s.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(SAML1BROWSERSSO_POLICY_RULE, NULL)
);
m_policy = new SecurityPolicy();
m_policy = new SecurityPolicy();
- m_policy->getRules().
push_back(m_rule
);
+ m_policy->getRules().
assign(m_rules.begin(), m_rules.end()
);
}
void tearDown() {
}
void tearDown() {
-
delete m_rule
;
+
for_each(m_rules.begin(), m_rules.end(), xmltooling::cleanup<SecurityPolicyRule>())
;
delete m_policy;
}
delete m_policy;
}