------- Comment From <email address hidden> 2023-05-08 08:12 EDT-------
I am about to verify this feature, but noticed the following:
When no 'libopencryptoki-dev' is installed p11sak does not find the libopencryptoki.so:
# p11sak gen ibm-dilithium r3_87 --label kyber --slot 4
Error: failed to open pkcs11 lib 'libopencryptoki.so'
However, 'libopencryptoki.so' is available in '/usr/lib/s390x-linux-gnu/pkcs11/'
By setting environment variable PKCSLIB to '/usr/lib/s390x-linux-gnu/pkcs11/libopencryptoki.so', it works.
Also, after installing the 'libopencryptoki-dev' package, p11sak finds it right away (without setting PKCSLIB), and 'libopencryptoki.so' is available in :
I don't think that this is as it should be. One should be able to use p11sak without having to install the dev package. Seems to something is wrong with library search path. p11sak does a dlopen() on 'libopencryptoki.so'. PKCS#11 applications will probably also do so and will thus also fail, unless they specify the full path of libopencryptoki.so of set the library search path correctly.
'make install' updates /etc/ld.so.conf.d and adds a 'opencryptoki-$(target_cpu).conf' file that contains the pkcs11 and opencryptoki directories. Maybe this is missing during package install?
------- Comment From <email address hidden> 2023-05-08 08:12 EDT-------
I am about to verify this feature, but noticed the following:
When no 'libopencryptok i-dev' is installed p11sak does not find the libopencryptoki.so:
# p11sak gen ibm-dilithium r3_87 --label kyber --slot 4 i.so'
Error: failed to open pkcs11 lib 'libopencryptok
However, 'libopencryptok i.so' is available in '/usr/lib/ s390x-linux- gnu/pkcs11/ '
By setting environment variable PKCSLIB to '/usr/lib/ s390x-linux- gnu/pkcs11/ libopencryptoki .so', it works.
Also, after installing the 'libopencryptok i-dev' package, p11sak finds it right away (without setting PKCSLIB), and 'libopencryptok i.so' is available in :
/usr/lib/ s390x-linux- gnu/pkcs11/ libopencryptoki .so s390x-linux- gnu/libopencryp toki.so s390x-linux- gnu/opencryptok i/libopencrypto ki.so
/usr/lib/
/usr/lib/
I don't think that this is as it should be. One should be able to use p11sak without having to install the dev package. Seems to something is wrong with library search path. p11sak does a dlopen() on 'libopencryptok i.so'. PKCS#11 applications will probably also do so and will thus also fail, unless they specify the full path of libopencryptoki.so of set the library search path correctly.
'make install' updates /etc/ld.so.conf.d and adds a 'opencryptoki- $(target_ cpu).conf' file that contains the pkcs11 and opencryptoki directories. Maybe this is missing during package install?
@Frank: can you please comment ?