diff options
| author | Gordon Sim <gsim@apache.org> | 2011-10-12 06:16:44 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2011-10-12 06:16:44 +0000 |
| commit | a0d60bbbbb6cac518bafc7e0f68c731bdc047ee1 (patch) | |
| tree | 4f549bb566572c7e80ae97a164edc056077648d1 /cpp/src/qpid/client/windows | |
| parent | 42af48b0ecaf5d5dd62ef85400f913a85b9b00e4 (diff) | |
| download | qpid-python-a0d60bbbbb6cac518bafc7e0f68c731bdc047ee1.tar.gz | |
QPID-3522: Distinguish between null and empty string for sasl response
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1182212 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/windows')
| -rw-r--r-- | cpp/src/qpid/client/windows/SaslFactory.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/qpid/client/windows/SaslFactory.cpp b/cpp/src/qpid/client/windows/SaslFactory.cpp index d1ae762f1b..53d825771b 100644 --- a/cpp/src/qpid/client/windows/SaslFactory.cpp +++ b/cpp/src/qpid/client/windows/SaslFactory.cpp @@ -71,7 +71,7 @@ class WindowsSasl : public Sasl public: WindowsSasl( const std::string &, const std::string &, const std::string &, const std::string &, int, int ); ~WindowsSasl(); - std::string start(const std::string& mechanisms, const SecuritySettings* externalSettings); + bool start(const std::string& mechanisms, std::string& response, const SecuritySettings* externalSettings); std::string step(const std::string& challenge); std::string getMechanism(); std::string getUserId(); @@ -121,8 +121,8 @@ WindowsSasl::~WindowsSasl() { } -std::string WindowsSasl::start(const std::string& mechanisms, - const SecuritySettings* /*externalSettings*/) +bool WindowsSasl::start(const std::string& mechanisms, std::string& response, + const SecuritySettings* /*externalSettings*/) { QPID_LOG(debug, "WindowsSasl::start(" << mechanisms << ")"); @@ -142,15 +142,15 @@ std::string WindowsSasl::start(const std::string& mechanisms, if (!haveAnon && !havePlain) throw InternalErrorException(QPID_MSG("Sasl error: no common mechanism")); - std::string resp = ""; if (havePlain) { mechanism = PLAIN; - resp = ((char)0) + settings.username + ((char)0) + settings.password; + response = ((char)0) + settings.username + ((char)0) + settings.password; } else { mechanism = ANONYMOUS; + response = ""; } - return resp; + return true; } std::string WindowsSasl::step(const std::string& /*challenge*/) |
