You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2014/07/14 23:12:14 UTC
svn commit: r1610530 - in /qpid/dispatch/trunk: bin/test.sh
src/connection_manager.c tests/system_tests_two_routers.py
Author: aconway
Date: Mon Jul 14 21:12:14 2014
New Revision: 1610530
URL: http://svn.apache.org/r1610530
Log:
NO-JIRA: Fix SSL bug causing all tests to fail.
Fixed bugs in the SSL configuration code that were causing all tests to fail.
The system_tests_two_routers_ssl test is still failing, there is a remaining problem.
Modified:
qpid/dispatch/trunk/bin/test.sh
qpid/dispatch/trunk/src/connection_manager.c
qpid/dispatch/trunk/tests/system_tests_two_routers.py
Modified: qpid/dispatch/trunk/bin/test.sh
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/bin/test.sh?rev=1610530&r1=1610529&r2=1610530&view=diff
==============================================================================
--- qpid/dispatch/trunk/bin/test.sh (original)
+++ qpid/dispatch/trunk/bin/test.sh Mon Jul 14 21:12:14 2014
@@ -35,6 +35,7 @@ cd $BUILD_DIR
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=Debug $SOURCE_DIR
make -j4
make install
+cd tests
# Run unit tests on the build.
ctest -VV -E system_tests
# Run system tests on the install.
Modified: qpid/dispatch/trunk/src/connection_manager.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/connection_manager.c?rev=1610530&r1=1610529&r2=1610530&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/connection_manager.c (original)
+++ qpid/dispatch/trunk/src/connection_manager.c Mon Jul 14 21:12:14 2014
@@ -64,8 +64,7 @@ static bool has_attrs(qd_entity_t *entit
}
static const char *ssl_attributes[] = {
- "allow-unsecured", "cert-file", "key-file", "password", "cert-db",
- "trusted-certs", "require-peer-auth"
+ "cert-db", "cert-file", "key-file", "password-file", "password"
};
static const int ssl_attributes_count = sizeof(ssl_attributes)/sizeof(ssl_attributes[0]);
@@ -99,11 +98,20 @@ static qd_error_t load_server_config(qd_
config->ssl_enabled = has_attrs(entity, ssl_attributes, ssl_attributes_count);
if (config->ssl_enabled) {
config->ssl_server = 1;
- config->ssl_allow_unsecured_client = qd_entity_opt_bool(entity, "allow-unsecured", false); CHECK();
- config->ssl_certificate_file = qd_entity_opt_string(entity, "cert-file", 0); CHECK();
- config->ssl_private_key_file = qd_entity_opt_string(entity, "key-file", 0); CHECK();
- config->ssl_trusted_certificate_db = qd_entity_opt_string(entity, "cert-db", 0); CHECK();
- config->ssl_trusted_certificates = qd_entity_opt_string(entity, "trusted-certs", 0); CHECK();
+ config->ssl_allow_unsecured_client =
+ qd_entity_opt_bool(entity, "allow-unsecured", false); CHECK();
+ config->ssl_certificate_file =
+ qd_entity_opt_string(entity, "cert-file", 0); CHECK();
+ config->ssl_private_key_file =
+ qd_entity_opt_string(entity, "key-file", 0); CHECK();
+ config->ssl_password =
+ qd_entity_opt_string(entity, "password", 0); CHECK();
+ config->ssl_trusted_certificate_db =
+ qd_entity_opt_string(entity, "cert-db", 0); CHECK();
+ config->ssl_trusted_certificates =
+ qd_entity_opt_string(entity, "trusted-certs", 0); CHECK();
+ config->ssl_require_peer_authentication =
+ qd_entity_opt_bool(entity, "require-peer-auth", true);
}
return QD_ERROR_NONE;
Modified: qpid/dispatch/trunk/tests/system_tests_two_routers.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_tests_two_routers.py?rev=1610530&r1=1610529&r2=1610530&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_tests_two_routers.py (original)
+++ qpid/dispatch/trunk/tests/system_tests_two_routers.py Mon Jul 14 21:12:14 2014
@@ -30,7 +30,7 @@ class RouterTest(TestCase):
"""Start a router and a messenger"""
super(RouterTest, cls).setUpClass()
- def ssl_config(password):
+ def ssl_config(client_server):
if not cls.ssl_option: return []
def ssl_file(name):
return os.path.join(os.path.dirname(__file__), 'config-2', name)
@@ -38,14 +38,14 @@ class RouterTest(TestCase):
('ssl-profile', {
'name': 'ssl-profile-name',
'cert-db': ssl_file('ca-certificate.pem'),
- 'cert-file': ssl_file('server-certificate.pem'),
- 'key-file': ssl_file('server-private-key.pem'),
- 'password': password})]
+ 'cert-file': ssl_file(client_server+'-certificate.pem'),
+ 'key-file': ssl_file(client_server+'-private-key.pem'),
+ 'password': client_server+'-password'})]
- def router(name, password, connection):
+ def router(name, client_server, connection):
if cls.ssl_option:
connection[1]['ssl-profile'] = 'ssl-profile-name'
- config = Qdrouterd.Config(ssl_config(password) + [
+ config = Qdrouterd.Config(ssl_config(client_server) + [
('log', {'module':'DEFAULT', 'level':'trace', 'output':name+".log"}),
('container', {'worker-threads': 4, 'container-name': 'Qpid.Dispatch.Router.%s'%name}),
('router', {'mode': 'interior', 'router-id': 'QDR.%s'%name}),
@@ -59,9 +59,9 @@ class RouterTest(TestCase):
cls.routers.append(cls.tester.qdrouterd(name, config, wait=True))
cls.routers = []
- router('A', 'server-password',
+ router('A', 'server',
('listener', {'role': 'inter-router', 'port': cls.tester.get_port()}))
- router('B', 'client-password',
+ router('B', 'client',
('connector', {'role': 'inter-router', 'port': cls.routers[0].ports[1]}))
def query_through(address, router):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org