summaryrefslogtreecommitdiff
path: root/keystoneclient/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-10-16 03:37:05 +0000
committerGerrit Code Review <review@openstack.org>2014-10-16 03:37:05 +0000
commit88cc4b6b91c3481040cb30c5e26fc911e4a52c88 (patch)
tree6a7415e667cbe5fb42eea1fe9d50e13370e932c9 /keystoneclient/tests
parent444259a9ae8da5506e5e601efa1e40927d2b6733 (diff)
parent7d289eb79eef13e73f01a5a48df5ce1b576a8dc2 (diff)
downloadpython-keystoneclient-88cc4b6b91c3481040cb30c5e26fc911e4a52c88.tar.gz
Merge "Explicit complaint about old OpenSSL when testing"
Diffstat (limited to 'keystoneclient/tests')
-rw-r--r--keystoneclient/tests/test_cms.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/keystoneclient/tests/test_cms.py b/keystoneclient/tests/test_cms.py
index 8cef987..9af3bd4 100644
--- a/keystoneclient/tests/test_cms.py
+++ b/keystoneclient/tests/test_cms.py
@@ -30,6 +30,18 @@ class CMSTest(utils.TestCase, testresources.ResourcedTestCase):
resources = [('examples', client_fixtures.EXAMPLES_RESOURCE)]
+ def __init__(self, *args, **kwargs):
+ super(CMSTest, self).__init__(*args, **kwargs)
+ process = subprocess.Popen(['openssl', 'version'],
+ stdout=subprocess.PIPE)
+ out, err = process.communicate()
+ # Example output: 'OpenSSL 0.9.8za 5 Jun 2014'
+ openssl_version = out.split()[1]
+
+ if err or openssl_version.startswith(b'0'):
+ raise Exception('Your version of OpenSSL is not supported. '
+ 'You will need to update it to 1.0 or later.')
+
def test_cms_verify(self):
self.assertRaises(exceptions.CertificateConfigError,
cms.cms_verify,