Comment 38 for bug 1973296

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2022-07-13 06:00 EDT-------
And now I am about to test for 22.04.
I updated to 22.04 and installed the proposed ock stuff:
dpkg -l | grep opencryptoki
ii libopencryptoki0:s390x 3.17.0+dfsg+20220202.b40982e-0ubuntu1.1 s390x PKCS#11 implementation (library)
ii opencryptoki 3.17.0+dfsg+20220202.b40982e-0ubuntu1.1 s390x PKCS#11 implementation (daemon)

but already a pkcsconf -t fails
# pkcsconf -t
Error initializing the PKCS11 library: 0x5 (CKR_GENERAL_ERROR)

when traces are active I see:

07/13/2022 11:51:59 752 [usr/lib/common/trace.c:210 api] INFO: **** OCK Trace level 4 activated for OCK version 3.17.0 ****
07/13/2022 11:51:59 752 [usr/lib/api/api_interface.c:2875 api] INFO: C_Initialize
07/13/2022 11:51:59 752 [usr/lib/api/policy.c:1666 api] ERROR: Failed to open /etc/opencryptoki/strength.conf: No such file or directory
07/13/2022 11:51:59 752 [usr/lib/api/api_interface.c:3092 api] ERROR: Policy loading failed! rc=0x5
07/13/2022 11:51:59 752 [usr/lib/api/api_interface.c:1656 api] INFO: C_Finalize
07/13/2022 11:51:59 752 [usr/lib/api/api_interface.c:1658 api] ERROR: API not initialized

looks like here is this policy stuff active but not all the required files have been packaged.

------- Comment From <email address hidden> 2022-07-13 06:09 EDT-------
This failure is gone when I copy the file strength-example.conf from opencryptoki/doc to /etc/strength.conf and chmod 640 strength.conf and chown root.pkcsconf strength.conf