summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2010-02-17 00:28:00 +0000
committerStephen D. Huston <shuston@apache.org>2010-02-17 00:28:00 +0000
commitd726e4395c9f6b883b5fa469828cd8af1460d6de (patch)
tree23112d6bb96e39282b764fc3717131cbc2f17885
parent7b28f2c84eae3186ac17abba64cc0b3d0a1e2828 (diff)
downloadqpid-python-d726e4395c9f6b883b5fa469828cd8af1460d6de.tar.gz
SSL changes for broker listening that weren't checked in with the original Windows broker SSL support (QPID-1403).
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@910785 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp b/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp
index d1dff92595..0db8fb5713 100644
--- a/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp
+++ b/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp
@@ -49,7 +49,8 @@ struct SslServerOptions : qpid::Options
uint16_t port;
bool clientAuth;
- SslServerOptions() : certStore("My"), port(5671), clientAuth(false)
+ SslServerOptions() : qpid::Options("SSL Options"),
+ certStore("My"), port(5671), clientAuth(false)
{
qpid::TcpAddress me;
if (qpid::sys::SystemInfo::getLocalHostname(me))
@@ -67,11 +68,11 @@ struct SslServerOptions : qpid::Options
};
class SslProtocolFactory : public qpid::sys::ProtocolFactory {
+ qpid::sys::Socket listener;
const bool tcpNoDelay;
const uint16_t listeningPort;
std::string brokerHost;
const bool clientAuthSelected;
- qpid::sys::Socket listener;
std::auto_ptr<qpid::sys::AsynchAcceptor> acceptor;
ConnectFailedCallback connectFailedCallback;
CredHandle credHandle;
@@ -129,7 +130,7 @@ SslProtocolFactory::SslProtocolFactory(const SslServerOptions& options,
int backlog,
bool nodelay)
: tcpNoDelay(nodelay),
- listeningPort(options.port),
+ listeningPort(listener.listen(options.port, backlog)),
clientAuthSelected(options.clientAuth) {
SecInvalidateHandle(&credHandle);
@@ -174,7 +175,6 @@ SslProtocolFactory::SslProtocolFactory(const SslServerOptions& options,
NULL);
if (status != SEC_E_OK)
throw QPID_WINDOWS_ERROR(status);
- listener.listen(options.port, backlog);
::CertFreeCertificateContext(certContext);
::CertCloseStore(certStoreHandle, 0);
}