From 2c0525fb73b92223aa1d3708c8ba59e836ae827e Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Fri, 6 Mar 2009 20:52:14 +0000 Subject: [PATCH] Clean up use of policyId and validate setting in SOAP client --- shibsp/binding/SOAPClient.h | 5 +---- shibsp/binding/impl/SOAPClient.cpp | 11 +++-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/shibsp/binding/SOAPClient.h b/shibsp/binding/SOAPClient.h index 573f3f1..eedebc0 100644 --- a/shibsp/binding/SOAPClient.h +++ b/shibsp/binding/SOAPClient.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,9 +72,6 @@ namespace shibsp { /** Application supplied to client. */ const Application& m_app; - /** Properties associated with the Application's security policy. */ - const PropertySet* m_settings; - /** RelyingParty properties, set after transport prep. */ const PropertySet* m_relyingParty; diff --git a/shibsp/binding/impl/SOAPClient.cpp b/shibsp/binding/impl/SOAPClient.cpp index ad3d3cb..cc5c6dc 100644 --- a/shibsp/binding/impl/SOAPClient.cpp +++ b/shibsp/binding/impl/SOAPClient.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,12 +38,8 @@ using namespace xmltooling; using namespace std; SOAPClient::SOAPClient(SecurityPolicy& policy) - : opensaml::SOAPClient(policy), m_app(policy.getApplication()), m_settings(NULL), m_relyingParty(NULL), m_credResolver(NULL) + : opensaml::SOAPClient(policy), m_app(policy.getApplication()), m_relyingParty(NULL), m_credResolver(NULL) { - m_settings = m_app.getServiceProvider().getPolicySettings(m_app.getString("policyId").second); - pair validate = m_settings->getBool("validate"); - policy.setValidating(validate.first && validate.second); - setValidating(validate.first && validate.second); } void SOAPClient::send(const soap11::Envelope& env, const char* from, MetadataCredentialCriteria& to, const char* endpoint) @@ -114,8 +110,7 @@ void SOAPClient::prepareTransport(SOAPTransport& transport) if ((!flag.first || flag.second) && !transport.isConfidential()) throw opensaml::BindingException("Transport confidentiality required, but not available."); - flag = m_settings->getBool("validate"); - setValidating(flag.first && flag.second); + setValidating(getPolicy().getValidating()); flag = m_relyingParty->getBool("requireTransportAuth"); forceTransportAuthentication(!flag.first || flag.second); -- 2.1.4