Code Monkey home page Code Monkey logo

Comments (4)

bjosv avatar bjosv commented on July 27, 2024

FYI: I see similar failures in p11test on current branch develop, for both openssl-1.1.1w and libbotan 2.19 (Ubuntu 22.04).

from softhsmv2.

badfd avatar badfd commented on July 27, 2024

The make check command gives me 4 unit test errors [same failures w/botan as with OpenSSL]:

$ cat src/lib/crypto/test/test-suite.log
o o o
1) test: DESTests::testCBC (F) line: 262 DESTests.cpp
assertion failed
- Expression: des->encryptInit(&desKey56, SymMode::CBC, IV) 

2) test: DESTests::testECB (F) line: 537 DESTests.cpp
assertion failed
- Expression: des->encryptInit(&desKey56, SymMode::ECB, IV) 

3) test: DESTests::testOFB (F) line: 812 DESTests.cpp
assertion failed
- Expression: des->encryptInit(&desKey56, SymMode::OFB, IV) 

4) test: DESTests::testCFB (F) line: 1086 DESTests.cpp
assertion failed
- Expression: des->encryptInit(&desKey56, SymMode::CFB, IV) 

FAIL cryptotest (exit status: 1)

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.4 LTS
Release:	22.04
Codename:	jammy

$ dpkg -l botan libcppunit-dev g++ openssl automake autoconf libtool pkg-config
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                 Version              Architecture Description
+++-====================-====================-============-=====================================================
ii  autoconf             2.71-2               all          automatic configure script builder
ii  automake             1:1.16.5-1.3         all          Tool for generating GNU Standards-compliant Makefiles
ii  botan                2.19.1+dfsg-2ubuntu1 amd64        multiplatform crypto library (2.x version)
ii  g++                  4:11.2.0-1ubuntu1    amd64        GNU C++ compiler
ii  libcppunit-dev:amd64 1.15.1-4             amd64        Unit Testing Library for C++ - development library
ii  libtool              2.4.6-15build2       all          Generic library support script
ii  openssl              3.0.2-0ubuntu1.15    amd64        Secure Sockets Layer toolkit - cryptographic utility
ii  pkg-config           0.29.2-1ubuntu3      amd64        manage compile and link flags for libraries

from softhsmv2.

xavieryin avatar xavieryin commented on July 27, 2024

The make check command gives me 4 unit test errors [same failures w/botan as with OpenSSL]:

$ cat src/lib/crypto/test/test-suite.log
o o o
1) test: DESTests::testCBC (F) line: 262 DESTests.cpp
assertion failed
- Expression: des->encryptInit(&desKey56, SymMode::CBC, IV) 

2) test: DESTests::testECB (F) line: 537 DESTests.cpp
assertion failed
- Expression: des->encryptInit(&desKey56, SymMode::ECB, IV) 

3) test: DESTests::testOFB (F) line: 812 DESTests.cpp
assertion failed
- Expression: des->encryptInit(&desKey56, SymMode::OFB, IV) 

4) test: DESTests::testCFB (F) line: 1086 DESTests.cpp
assertion failed
- Expression: des->encryptInit(&desKey56, SymMode::CFB, IV) 

FAIL cryptotest (exit status: 1)

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.4 LTS
Release:	22.04
Codename:	jammy

$ dpkg -l botan libcppunit-dev g++ openssl automake autoconf libtool pkg-config
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                 Version              Architecture Description
+++-====================-====================-============-=====================================================
ii  autoconf             2.71-2               all          automatic configure script builder
ii  automake             1:1.16.5-1.3         all          Tool for generating GNU Standards-compliant Makefiles
ii  botan                2.19.1+dfsg-2ubuntu1 amd64        multiplatform crypto library (2.x version)
ii  g++                  4:11.2.0-1ubuntu1    amd64        GNU C++ compiler
ii  libcppunit-dev:amd64 1.15.1-4             amd64        Unit Testing Library for C++ - development library
ii  libtool              2.4.6-15build2       all          Generic library support script
ii  openssl              3.0.2-0ubuntu1.15    amd64        Secure Sockets Layer toolkit - cryptographic utility
ii  pkg-config           0.29.2-1ubuntu3      amd64        manage compile and link flags for libraries

DES is relatively out-dated and may not be provided (by default) in modern crypto libraries. And this causes related unitest failures.
If you run SoftHSMv2 w/ OSSL backend, you can modify OSSL config file to make legacy algorithms available (to SoftHSMv2).
Typical OSSL config file path: /etc/ssl/openssl.cnf

[provider_sect]
default = default_sect
legacy = legacy_sect

[default_sect]
activate = 1

[legacy_sect]
activate = 1

With the above change cryptotest DESTests should pass

root@70cfde9dd1aa:/work/SoftHSMv2/src/lib/crypto/test# ./cryptotest 
...
DESTests::testBlockSize : OK
DESTests::testCBC : OK
DESTests::testECB : OK
DESTests::testOFB : OK
DESTests::testCFB : OK
...
OK (66 tests)

from softhsmv2.

MajdDiyar avatar MajdDiyar commented on July 27, 2024

I also have same issue
!!!FAILURES!!!
Test Results:
Run: 66 Failures: 4 Errors: 0

  1. test: DESTests::testCBC (F) line: 262 DESTests.cpp
    assertion failed
  • Expression: des->encryptInit(&desKey56, SymMode::CBC, IV)
  1. test: DESTests::testECB (F) line: 537 DESTests.cpp
    assertion failed
  • Expression: des->encryptInit(&desKey56, SymMode::ECB, IV)
  1. test: DESTests::testOFB (F) line: 812 DESTests.cpp
    assertion failed
  • Expression: des->encryptInit(&desKey56, SymMode::OFB, IV)
  1. test: DESTests::testCFB (F) line: 1086 DESTests.cpp
    assertion failed
  • Expression: des->encryptInit(&desKey56, SymMode::CFB, IV)

FAIL cryptotest (exit status: 1)

from softhsmv2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.