projects
/
shibboleth
/
cpp-opensaml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb10b0b
)
Fixes to SOAP clients
author
Scott Cantor
<cantor.2@osu.edu>
Mon, 12 Feb 2007 05:32:18 +0000
(
05:32
+0000)
committer
Scott Cantor
<cantor.2@osu.edu>
Mon, 12 Feb 2007 05:32:18 +0000
(
05:32
+0000)
saml/binding/SOAPClient.h
patch
|
blob
|
history
saml/binding/impl/SOAPClient.cpp
patch
|
blob
|
history
saml/saml.vcproj
patch
|
blob
|
history
saml/saml1/binding/SAML1SOAPClient.h
patch
|
blob
|
history
saml/saml2/binding/SAML2SOAPClient.h
patch
|
blob
|
history
samltest/samltest.vcproj
patch
|
blob
|
history
diff --git
a/saml/binding/SOAPClient.h
b/saml/binding/SOAPClient.h
index
1c40cdc
..
2c94bd3
100644
(file)
--- a/
saml/binding/SOAPClient.h
+++ b/
saml/binding/SOAPClient.h
@@
-31,17
+31,21
@@
namespace opensaml {
/**
* Specialized SOAPClient for SAML SOAP bindings.
*/
/**
* Specialized SOAPClient for SAML SOAP bindings.
*/
- class SAML_API SOAPClient : soap11::SOAPClient
+ class SAML_API SOAPClient :
public
soap11::SOAPClient
{
public:
/**
* Creates a SOAP client instance with a particular SecurityPolicy.
*
{
public:
/**
* Creates a SOAP client instance with a particular SecurityPolicy.
*
- * @param policy reference to SecurityPolicy to apply
+ * @param policy reference to SecurityPolicy to apply
+ * @param validating controls schema validation
*/
*/
- SOAPClient(SecurityPolicy& policy) : m_policy(policy), m_force(true) {}
+ SOAPClient(SecurityPolicy& policy, bool validating=false)
+ : soap11::SOAPClient(validating), m_policy(policy), m_force(true), m_correlate(NULL) {}
- virtual ~SOAPClient() {}
+ virtual ~SOAPClient() {
+ XMLString::release(&m_correlate);
+ }
/**
* Controls whether to force transport/peer authentication via an X509TrustEngine.
/**
* Controls whether to force transport/peer authentication via an X509TrustEngine.
@@
-70,6
+74,8
@@
namespace opensaml {
* @return response envelope after SecurityPolicy has been applied
*/
soap11::Envelope* receive();
* @return response envelope after SecurityPolicy has been applied
*/
soap11::Envelope* receive();
+
+ void reset();
protected:
/**
protected:
/**
@@
-86,6
+92,9
@@
namespace opensaml {
/** Flag controlling whether transport/peer authn is mandatory. */
bool m_force;
/** Flag controlling whether transport/peer authn is mandatory. */
bool m_force;
+ /** Message correlation ID. */
+ XMLCh* m_correlate;
+
private:
const saml2md::RoleDescriptor* m_peer;
};
private:
const saml2md::RoleDescriptor* m_peer;
};
diff --git
a/saml/binding/impl/SOAPClient.cpp
b/saml/binding/impl/SOAPClient.cpp
index
0653036
..
2a6261e
100644
(file)
--- a/
saml/binding/impl/SOAPClient.cpp
+++ b/
saml/binding/impl/SOAPClient.cpp
@@
-40,8
+40,7
@@
using namespace std;
void SOAPClient::send(const soap11::Envelope* env, const KeyInfoSource& peer, const char* endpoint)
{
// Clear policy.
void SOAPClient::send(const soap11::Envelope* env, const KeyInfoSource& peer, const char* endpoint)
{
// Clear policy.
- m_policy.setIssuer(NULL);
- m_policy.setIssuerMetadata(NULL);
+ m_policy.reset();
m_peer = dynamic_cast<const RoleDescriptor*>(&peer);
m_peer = dynamic_cast<const RoleDescriptor*>(&peer);
@@
-85,3
+84,11
@@
soap11::Envelope* SOAPClient::receive()
}
return env.release();
}
}
return env.release();
}
+
+void SOAPClient::reset()
+{
+ soap11::SOAPClient::reset();
+ m_policy.reset();
+ XMLString::release(&m_correlate);
+ m_correlate=NULL;
+}
diff --git
a/saml/saml.vcproj
b/saml/saml.vcproj
index
5e8a06f
..
b1c0647
100644
(file)
--- a/
saml/saml.vcproj
+++ b/
saml/saml.vcproj
@@
-45,7
+45,6
@@
MinimalRebuild="true"
\r
BasicRuntimeChecks="3"
\r
RuntimeLibrary="3"
\r
MinimalRebuild="true"
\r
BasicRuntimeChecks="3"
\r
RuntimeLibrary="3"
\r
- UsePrecompiledHeader="0"
\r
BrowseInformation="1"
\r
WarningLevel="3"
\r
Detect64BitPortabilityProblems="true"
\r
BrowseInformation="1"
\r
WarningLevel="3"
\r
Detect64BitPortabilityProblems="true"
\r
@@
-123,7
+122,6
@@
AdditionalIncludeDirectories=""$(SolutionDir)";"$(ProjectDir)";"..\..\cpp-xmltooling""
\r
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
\r
RuntimeLibrary="2"
\r
AdditionalIncludeDirectories=""$(SolutionDir)";"$(ProjectDir)";"..\..\cpp-xmltooling""
\r
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
\r
RuntimeLibrary="2"
\r
- UsePrecompiledHeader="0"
\r
WarningLevel="3"
\r
Detect64BitPortabilityProblems="true"
\r
DebugInformationFormat="3"
\r
WarningLevel="3"
\r
Detect64BitPortabilityProblems="true"
\r
DebugInformationFormat="3"
\r
diff --git
a/saml/saml1/binding/SAML1SOAPClient.h
b/saml/saml1/binding/SAML1SOAPClient.h
index
9476220
..
783c7c2
100644
(file)
--- a/
saml/saml1/binding/SAML1SOAPClient.h
+++ b/
saml/saml1/binding/SAML1SOAPClient.h
@@
-35,19
+35,18
@@
namespace opensaml {
/**
* Specialized SOAPClient for SAML 1.x SOAP binding.
*/
/**
* Specialized SOAPClient for SAML 1.x SOAP binding.
*/
- class SAML_API SAML1SOAPClient : opensaml::SOAPClient
+ class SAML_API SAML1SOAPClient :
public
opensaml::SOAPClient
{
public:
/**
* Creates a SOAP client instance with a particular SecurityPolicy.
*
{
public:
/**
* Creates a SOAP client instance with a particular SecurityPolicy.
*
- * @param policy reference to SecurityPolicy to apply
+ * @param policy reference to SecurityPolicy to apply
+ * @param validating controls schema validation
*/
*/
- SAML1SOAPClient(SecurityPolicy& policy
) : opensaml::SOAPClient(policy), m_correlate(NULL
) {}
+ SAML1SOAPClient(SecurityPolicy& policy
, bool validating=false) : opensaml::SOAPClient(policy, validating
) {}
- virtual ~SAML1SOAPClient() {
- XMLString::release(&m_correlate);
- }
+ virtual ~SAML1SOAPClient() {}
/**
* Specialized method for sending SAML 1.x requests. The SOAP layer will be
/**
* Specialized method for sending SAML 1.x requests. The SOAP layer will be
@@
-79,9
+78,6
@@
namespace opensaml {
* @return true iff the error should be treated as a fatal error
*/
virtual bool handleError(const Status& status);
* @return true iff the error should be treated as a fatal error
*/
virtual bool handleError(const Status& status);
-
- private:
- XMLCh* m_correlate;
};
};
};
};
diff --git
a/saml/saml2/binding/SAML2SOAPClient.h
b/saml/saml2/binding/SAML2SOAPClient.h
index
ff5e5a1
..
23b65a8
100644
(file)
--- a/
saml/saml2/binding/SAML2SOAPClient.h
+++ b/
saml/saml2/binding/SAML2SOAPClient.h
@@
-41,13
+41,12
@@
namespace opensaml {
/**
* Creates a SOAP client instance with a particular SecurityPolicy.
*
/**
* Creates a SOAP client instance with a particular SecurityPolicy.
*
- * @param policy reference to SecurityPolicy to apply
+ * @param policy reference to SecurityPolicy to apply
+ * @param validating controls schema validation
*/
*/
- SAML2SOAPClient(SecurityPolicy& policy
) : opensaml::SOAPClient(policy), m_correlate(NULL
) {}
+ SAML2SOAPClient(SecurityPolicy& policy
, bool validating=false) : opensaml::SOAPClient(policy, validating
) {}
- virtual ~SAML2SOAPClient() {
- XMLString::release(&m_correlate);
- }
+ virtual ~SAML2SOAPClient() {}
/**
* Specialized method for sending SAML 2.0 requests. The SOAP layer will be
/**
* Specialized method for sending SAML 2.0 requests. The SOAP layer will be
@@
-79,9
+78,6
@@
namespace opensaml {
* @return true iff the error should be treated as a fatal error
*/
virtual bool handleError(const Status& status);
* @return true iff the error should be treated as a fatal error
*/
virtual bool handleError(const Status& status);
-
- private:
- XMLCh* m_correlate;
};
};
};
};
diff --git
a/samltest/samltest.vcproj
b/samltest/samltest.vcproj
index
f044fd7
..
4f580e7
100644
(file)
--- a/
samltest/samltest.vcproj
+++ b/
samltest/samltest.vcproj
@@
-45,7
+45,6
@@
MinimalRebuild="true"
\r
BasicRuntimeChecks="3"
\r
RuntimeLibrary="3"
\r
MinimalRebuild="true"
\r
BasicRuntimeChecks="3"
\r
RuntimeLibrary="3"
\r
- UsePrecompiledHeader="0"
\r
BrowseInformation="1"
\r
WarningLevel="3"
\r
Detect64BitPortabilityProblems="true"
\r
BrowseInformation="1"
\r
WarningLevel="3"
\r
Detect64BitPortabilityProblems="true"
\r
@@
-121,7
+120,6
@@
AdditionalIncludeDirectories=""$(SolutionDir)";"$(ProjectDir)";"..\..\cpp-xmltooling""
\r
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1"
\r
RuntimeLibrary="2"
\r
AdditionalIncludeDirectories=""$(SolutionDir)";"$(ProjectDir)";"..\..\cpp-xmltooling""
\r
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1"
\r
RuntimeLibrary="2"
\r
- UsePrecompiledHeader="0"
\r
WarningLevel="3"
\r
Detect64BitPortabilityProblems="true"
\r
DebugInformationFormat="3"
\r
WarningLevel="3"
\r
Detect64BitPortabilityProblems="true"
\r
DebugInformationFormat="3"
\r