diff options
| author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-01-28 23:01:12 +0000 |
|---|---|---|
| committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-01-28 23:01:12 +0000 |
| commit | 2d5dc11e2f401852980cf3c5627926312b038767 (patch) | |
| tree | daaaf6e461864d3c0a3fd88c9721fa4c6623725f /cpp/src/qpid | |
| parent | 9ba42cc7b5b593a94d879894d0d13276d56490aa (diff) | |
| download | qpid-python-2d5dc11e2f401852980cf3c5627926312b038767.tar.gz | |
QPID-2374: Null authenticator now checks for SSL if --encryption-required specified
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@904293 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/broker/SaslAuthenticator.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/SaslAuthenticator.cpp b/cpp/src/qpid/broker/SaslAuthenticator.cpp index 0e509c8d93..4769789bff 100644 --- a/cpp/src/qpid/broker/SaslAuthenticator.cpp +++ b/cpp/src/qpid/broker/SaslAuthenticator.cpp @@ -148,8 +148,13 @@ void NullAuthenticator::getMechanisms(Array& mechanisms) void NullAuthenticator::start(const string& mechanism, const string& response) { if (encrypt) { - QPID_LOG(error, "Rejected un-encrypted connection."); - throw ConnectionForcedException("Connection must be encrypted."); + // encryption required - check to see if we are running over an + // encrypted SSL connection. + sasl_ssf_t external_ssf = (sasl_ssf_t) connection.getSSF(); + if (external_ssf < 1) { // < 1 == unencrypted + QPID_LOG(error, "Rejected un-encrypted connection."); + throw ConnectionForcedException("Connection must be encrypted."); + } } if (mechanism == "PLAIN") { // Old behavior if (response.size() > 0) { |
