softhsm2: FTBFS against OpenSSL 3.0 (test suite)

Bug #1961189 reported by Simon Chopin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
softhsm2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The softhsm2 package fails to build against OpenSSL 3.0, erroring out in its test suite.

It seems it is related to the use of algorithms and configurations that have been removed in the default configuration of OpenSSL, as noted in this PR https://github.com/opendnssec/SoftHSMv2/pull/633

I think the approach in said PR is reasonable, and I intend to ship the patches in Ubuntu.

Revision history for this message
Simon Chopin (schopin) wrote :

After testing the patchset, it does improve the situation a bit as the test suite gets further along, but there are a *lot* of failures.

Steve Langasek (vorlon)
tags: added: update-excuse
Revision history for this message
Steve Langasek (vorlon) wrote :

Relevant output of test-results.xml, ftr:

  <FailedTests>
    <FailedTest id="9">
      <Name>DESTests::testCBC</Name>
      <FailureType>Assertion</FailureType>
      <Location>
        <File>DESTests.cpp</File>
        <Line>262</Line>
      </Location>
      <Message>assertion failed
- Expression: des-&gt;encryptInit(&amp;desKey56, SymMode::CBC, IV)
</Message>
    </FailedTest>
    <FailedTest id="10">
      <Name>DESTests::testECB</Name>
      <FailureType>Assertion</FailureType>
      <Location>
        <File>DESTests.cpp</File>
        <Line>537</Line>
      </Location>
      <Message>assertion failed
- Expression: des-&gt;encryptInit(&amp;desKey56, SymMode::ECB, IV)
</Message>
    </FailedTest>
    <FailedTest id="11">
      <Name>DESTests::testOFB</Name>
      <FailureType>Assertion</FailureType>
      <Location>
        <File>DESTests.cpp</File>
        <Line>812</Line>
      </Location>
      <Message>assertion failed
- Expression: des-&gt;encryptInit(&amp;desKey56, SymMode::OFB, IV)
</Message>
    </FailedTest>
    <FailedTest id="12">
      <Name>DESTests::testCFB</Name>
      <FailureType>Assertion</FailureType>
      <Location>
        <File>DESTests.cpp</File>
        <Line>1086</Line>
      </Location>
      <Message>assertion failed
- Expression: des-&gt;encryptInit(&amp;desKey56, SymMode::CFB, IV)
</Message>
    </FailedTest>
  </FailedTests>

Revision history for this message
Simon Chopin (schopin) wrote :

The aforementioned tests are indeed fixed by the patchset, however there are still failures in the "p11test" part of the testsuite. Adding the patchset plus a quick'n dirty patch (attached) to enable the legacy provider leaves us with the following errors:

FAIL: p11test
=============

..............................F.F....F...F........F....................F.......................F..F...F...F.F..F....F.F...F..F..F.F...F.F.F.FF..F..F.F...F..F....F.........F.F............F.F....F.....F..........F.F..F.F.F.F.....F....F...........F.......

!!!FAILURES!!!
Test Results:
Run: 77 Failures: 11 Errors: 0

1) test: InfoTests::testGetSlotInfoAlt (F) line: 124 TestsNoPINInitBase.cpp
setUp() failed
- equality assertion failed
- Expected: 0
- Actual : 48

2) test: ObjectTests::testCreateObject (F) line: 124 TestsNoPINInitBase.cpp
setUp() failed
- equality assertion failed
- Expected: 0
- Actual : 5

3) test: ObjectTests::testDestroyObject (F) line: 124 TestsNoPINInitBase.cpp
setUp() failed
- equality assertion failed
- Expected: 0
- Actual : 5

4) test: ObjectTests::testFindObjects (F) line: 1479 ObjectTests.cpp
assertion failed
- Expression: 2 == ulObjectCount

5) test: ObjectTests::testGenerateKeys (F) line: 1511 ObjectTests.cpp
assertion failed
- Expression: rv==CKR_OK

6) test: ObjectTests::testDefaultDataAttributes (F) line: 124 TestsNoPINInitBase.cpp
setUp() failed
- equality assertion failed
- Expected: 0
- Actual : 48

7) test: ObjectTests::testDefaultX509CertAttributes (F) line: 1660 ObjectTests.cpp
assertion failed
- Expression: rv == CKR_OK

8) test: SignVerifyTests::testEcSignVerify (F) line: 247 SignVerifyTests.cpp
assertion failed
- Expression: rv==CKR_OK

9) test: SignVerifyTests::testEdSignVerify with parameter: Ed448 (F) line: 579 SignVerifyTests.cpp
assertion failed
- Expression: rv==CKR_OK

10) test: SymmetricAlgorithmTests::testDesEncryptDecrypt (F) line: 124 TestsNoPINInitBase.cpp
setUp() failed
- equality assertion failed
- Expected: 0
- Actual : 48

11) test: TokenTests::testInitToken (F) line: 68 TokenTests.cpp
assertion failed
- Expression: rv == CKR_OK

Changed in softhsm2 (Ubuntu):
status: New → Fix Committed
Changed in softhsm2 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers