The test test_integration/test_caless.py::TestIPACommands fails in FIPS mode in a step trying to create a PKCS12 file from a key+pem file.
test_integration/test_caless.py::TestIPACommands
In FIPS mode, call openssl pkcs12 -export -out server.p12 -inkey server.key -in server.pem -passin pass:Secret.123 -passout pass:Secret.123 -name ca1/server
openssl pkcs12 -export -out server.p12 -inkey server.key -in server.pem -passin pass:Secret.123 -passout pass:Secret.123 -name ca1/server
Error creating PKCS12 MAC; no PKCS12KDF support? Use -nomac if MAC not required and PKCS12KDF support not available. 00AEB869387F0000:error:05800074:x509 certificate routines:X509_check_private_key:key values mismatch:crypto/x509/x509_cmp.c:405: 00AEB869387F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:341:Global default library context, Algorithm (PKCS12KDF : 179), Properties (<null>) 00AEB869387F0000:error:1180006B:PKCS12 routines:pkcs12_gen_mac:key gen error:crypto/pkcs12/p12_mutl.c:147: 00AEB869387F0000:error:1180006D:PKCS12 routines:PKCS12_set_mac:mac generation error:crypto/pkcs12/p12_mutl.c:220:
The test should successfully create the PKCS12 file.
The PKCS12 MAC requires PKCS12KDF which is not an approved FIPS algorithm and cannot be supported by the FIPS provider. The test should not require mac verification in FIPS mode: append the option -nomac to the command openssl pkcs12 used to create the pkcs12 file.
-nomac
fedora 39 openssl-1:3.1.1-4.fc39.x86_64
Metadata Update from @frenaud: - Issue tagged with: test-failure, tests
Same issue in: - test_integration/test_caless.py::TestReplicaCALessToCAFull::test_install_caless_server_replica - test_integration/test_caless.py::TestPKINIT::test_server_replica_install_pkinit::setup - test_integration/test_caless.py::TestReplicaInstall::test_no_certs::setup - test_integration/test_random_serial_numbers.py::TestServerCALessToExternalCA_RSN::test_install_caless_server - test_integration/test_caless.py::TestServerCALessToExternalCA::test_install_caless_server
See the reason why openssl pkcs12 doen't work in ticket https://pagure.io/freeipa/issue/9581
Metadata Update from @frenaud: - Issue tagged with: fips