unit test fails on fedora 21

Bug #1433779 reported by Dave McCowan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
High
Dave McCowan

Bug Description

OpenSSL in Fedora 21 apparently has deprecated MD5 as a valid certificate digest. (Good idea.)
Need to change unit tests to use sha256 instead so tests will work on Fedora 21.

======================================================================
FAIL: barbican.tests.common.test_validators.WhenTestingSimpleCMCOrderValidator.test_should_pass_good_data
tags: worker-3
----------------------------------------------------------------------
Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/home/mike/workspace/openstack/barbican/barbican/tests/common/test_validators.py", line 1084, in test_should_pass_good_data
    self.validator.validate(self.order_req)
  File "/home/mike/workspace/openstack/barbican/barbican/common/validators.py", line 333, in validate
    self._validate_certificate_meta(certificate_meta, schema_name)
  File "/home/mike/workspace/openstack/barbican/barbican/common/validators.py", line 406, in _validate_certificate_meta
    jump_table[request_type](certificate_meta)
  File "/home/mike/workspace/openstack/barbican/barbican/common/validators.py", line 412, in _validate_simple_cmc_request
    self._validate_pkcs10_data(request_data)
  File "/home/mike/workspace/openstack/barbican/barbican/common/validators.py", line 461, in _validate_pkcs10_data
    raise exception.InvalidPKCS10Data(reason=reason)
barbican.common.exception.InvalidPKCS10Data: Invalid PKCS10 Data: %(reason)
Ran 722 tests in 20.374s (+1.675s)
FAILED (id=107, failures=1, skips=12)
error: testr failed (1)

Changed in barbican:
status: New → In Progress
assignee: nobody → Dave McCowan (dave-mccowan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

Fix proposed to branch: master
Review: https://review.openstack.org/165678

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/165678
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=0bb0cb87e22ed05849daaa17e7e7cc2c80e06ac8
Submitter: Jenkins
Branch: master

commit 0bb0cb87e22ed05849daaa17e7e7cc2c80e06ac8
Author: Dave McCowan <email address hidden>
Date: Wed Mar 18 23:03:52 2015 -0400

    Change certificate unit tests to use strong algorithms

    Use sha256 instead of md5 and rsa2048 instead of rsa1024. This
    is because some versions of OpenSSL don't allow weak algorithms,
    like md5, to be use for key verification.

    Change-Id: Ifb33e0948fc28c0ab250307ebd3c39dee0657320
    Closes-bug: 1433779

Changed in barbican:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in barbican:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in barbican:
milestone: kilo-3 → 2015.1.0
Changed in barbican:
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.