latchset / pkcs11-provider

A pkcs#11 provider for OpenSSL 3.0+
Other
65 stars 39 forks source link

Clean build on fedora 39 : first two basic tests failing #344

Closed space88man closed 8 months ago

space88man commented 8 months ago

Describe the bug Clean build from 8055658 and the first two basic test scripts are failing. Looks like some tests are expected to fail but the script doesn't seem to handle it

FAIL: basic-softokn.t
FAIL: basic-softhsm.t
PASS: pubkey-softokn.t
PASS: pubkey-softhsm.t
PASS: certs-softokn.t
PASS: certs-softhsm.t
PASS: ecc-softokn.t
PASS: ecc-softhsm.t
PASS: edwards-softhsm.t
PASS: ecdh-softokn.t
PASS: democa-softokn.t
PASS: democa-softhsm.t
PASS: digest-softokn.t
PASS: digest-softhsm.t
PASS: fork-softokn.t
PASS: fork-softhsm.t
PASS: oaepsha2-softokn.t
PASS: hkdf-softokn.t
PASS: rsapss-softokn.t
PASS: genkey-softokn.t
PASS: genkey-softhsm.t
PASS: session-softokn.t
PASS: session-softhsm.t
PASS: rand-softokn.t
PASS: rand-softhsm.t
PASS: readkeys-softokn.t
PASS: readkeys-softhsm.t
## Meant to fail? But testsuite does not handle the expected FAIL?
## Raw Sign check error
 openssl 
pkeyutl -sign -inkey "${BASEURI}"
              -pkeyopt pad-mode:none
              -in ${TMPPDIR}/64Brandom.bin
              -out ${TMPPDIR}/raw-sig.bin
Public Key operation error
009E8656B27F0000:error:0200007A:rsa routines:p11prov_sig_operate:data too small for key size:signature.c:894:

To Reproduce Steps to reproduce the behavior:

  1. autoreconf -fi; ./configure; make; make check
Executing ./tbasic (softhsm)

## Raw Sign check error
 openssl 
pkeyutl -sign -inkey "${BASEURI}"
              -pkeyopt pad-mode:none
              -in ${TMPPDIR}/64Brandom.bin
              -out ${TMPPDIR}/raw-sig.bin
Public Key operation error
009E8656B27F0000:error:0200007A:rsa routines:p11prov_sig_operate:data too small for key size:signature.c:894:

Executing ./tbasic (nss-softokn)

## Raw Sign check error
 openssl 
pkeyutl -sign -inkey "${BASEURI}"
              -pkeyopt pad-mode:none
              -in ${TMPPDIR}/64Brandom.bin
              -out ${TMPPDIR}/raw-sig.bin
Public Key operation error
009EC039B67F0000:error:0200007A:rsa routines:p11prov_sig_operate:data too small for key size:signature.c:894:
$ grep FAIL *.log
basic-softhsm.log:FAIL basic-softhsm.t (exit status: 127)
basic-softokn.log:FAIL basic-softokn.t (exit status: 127)

Expected behavior All tests PASS

Operating environment (please complete the following information):

Token and application used (please complete the following information):

Additional context

$ grep PASS *.log
certs-softhsm.log:PASS certs-softhsm.t (exit status: 0)
certs-softokn.log:PASS certs-softokn.t (exit status: 0)
democa-softhsm.log:PASS democa-softhsm.t (exit status: 0)
democa-softokn.log:PASS democa-softokn.t (exit status: 0)
digest-softhsm.log:PASS digest-softhsm.t (exit status: 0)
digest-softokn.log:PASS digest-softokn.t (exit status: 0)
ecc-softhsm.log:PASS ecc-softhsm.t (exit status: 0)
ecc-softokn.log:PASS ecc-softokn.t (exit status: 0)
ecdh-softokn.log:PASS ecdh-softokn.t (exit status: 0)
edwards-softhsm.log:PASS edwards-softhsm.t (exit status: 0)
fork-softhsm.log:PASS fork-softhsm.t (exit status: 0)
fork-softokn.log:PASS fork-softokn.t (exit status: 0)
genkey-softhsm.log:PASS genkey-softhsm.t (exit status: 0)
genkey-softokn.log:PASS genkey-softokn.t (exit status: 0)
hkdf-softokn.log:PASS hkdf-softokn.t (exit status: 0)
oaepsha2-softokn.log:PASS oaepsha2-softokn.t (exit status: 0)
pubkey-softhsm.log:PASS pubkey-softhsm.t (exit status: 0)
pubkey-softokn.log:PASS pubkey-softokn.t (exit status: 0)
rand-softhsm.log:PASS rand-softhsm.t (exit status: 0)
rand-softokn.log:PASS rand-softokn.t (exit status: 0)
readkeys-softhsm.log:PASS readkeys-softhsm.t (exit status: 0)
readkeys-softokn.log:PASS readkeys-softokn.t (exit status: 0)
rsapss-softokn.log:PASS rsapss-softokn.t (exit status: 0)
session-softhsm.log:ALL A-OK!PASS session-softhsm.t (exit status: 0)
session-softokn.log:ALL A-OK!PASS session-softokn.t (exit status: 0)
$ grep error *.log
basic-softhsm.log:## Raw Sign check error
basic-softhsm.log:Public Key operation error
basic-softhsm.log:009E8656B27F0000:error:0200007A:rsa routines:p11prov_sig_operate:data too small for key size:signature.c:894:
basic-softokn.log:## Raw Sign check error
basic-softokn.log:Public Key operation error
basic-softokn.log:009EC039B67F0000:error:0200007A:rsa routines:p11prov_sig_operate:data too small for key size:signature.c:894:
democa-softhsm.log:000E95C1B67F0000:error:40800054:pkcs11:p11prov_GetOperationState:reason(84):interface.gen.c:279:Error returned by C_GetOperationState
democa-softhsm.log:005E457B767F0000:error:40800054:pkcs11:p11prov_GetOperationState:reason(84):interface.gen.c:279:Error returned by C_GetOperationState
democa-softhsm.log:004EE6435C7F0000:error:40800054:pkcs11:p11prov_GetOperationState:reason(84):interface.gen.c:279:Error returned by C_GetOperationState
democa-softhsm.log:00AEAE62067F0000:error:40800054:pkcs11:p11prov_GetOperationState:reason(84):interface.gen.c:279:Error returned by C_GetOperationState
democa-softhsm.log:009E8EA8ED7F0000:error:40800054:pkcs11:p11prov_GetOperationState:reason(84):interface.gen.c:279:Error returned by C_GetOperationState
democa-softokn.log:00BE807D427F0000:error:40800091:pkcs11:p11prov_GetOperationState:There is no active operation of appropriate type in the specified session:interface.gen.c:279:Error returned by C_GetOperationState
democa-softokn.log:008E0E6D637F0000:error:40800091:pkcs11:p11prov_GetOperationState:There is no active operation of appropriate type in the specified session:interface.gen.c:279:Error returned by C_GetOperationState
democa-softokn.log:006E63D3B17F0000:error:40800091:pkcs11:p11prov_GetOperationState:There is no active operation of appropriate type in the specified session:interface.gen.c:279:Error returned by C_GetOperationState
democa-softokn.log:006EB4574F7F0000:error:40800091:pkcs11:p11prov_GetOperationState:There is no active operation of appropriate type in the specified session:interface.gen.c:279:Error returned by C_GetOperationState

rand-softhsm.log:00DE2DE1D87F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:341:Global default library context, Algorithm (PKCS11-RAND : 0), Properties (<null>)
rand-softhsm.log:00DE2DE1D87F0000:error:12000090:random number generator:rand_new_drbg:unable to fetch drbg:crypto/rand/rand_lib.c:571:
rand-softokn.log:00FE3F16067F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:341:Global default library context, Algorithm (PKCS11-RAND : 0), Properties (<null>)
rand-softokn.log:00FE3F16067F0000:error:12000090:random number generator:rand_new_drbg:unable to fetch drbg:crypto/rand/rand_lib.c:571:
space88man commented 8 months ago

Closing - system was missing expect package.