Comment 7 for bug 2003669

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

------- Comment From <email address hidden> 2023-05-25 02:38 EDT-------
Hi Frank,

it got somewhat better, but still not successful.

With 3.20.0+dfsg-0ubuntu3 we now have those libraries (without installing the -dev package):

# find / -name libopencryptoki.so
/usr/lib/s390x-linux-gnu/pkcs11/libopencryptoki.so
/usr/lib/s390x-linux-gnu/opencryptoki/libopencryptoki.so

That's OK, but those directories are still not in the library search path, so a dlopen with libopencryptoki.so will still not find it:

# p11sak list-key all --slot 1 --pin <pin>
Error: failed to open pkcs11 lib 'libopencryptoki.so'

You are still missing to add the 'opencryptoki-$(target_cpu).conf' file into '/etc/ld.so.conf.d/'.

That file is installed via 'make install' and should also be installed by libopencryptoki0. It contains lines like this:

/usr/lib/s390x-linux-gnu/opencryptoki
/usr/lib/s390x-linux-gnu/opencryptoki/stdll

And will tell the dynamic linker to add those directories to the cache. That way a dlopen will also look in these directories, and thus will file /usr/lib/s390x-linux-gnu/opencryptoki/libopencryptoki.so. See 'man ldconfig' for details about this.

Alternatively, you must also install '/usr/lib/s390x-linux-gnu/libopencryptoki.so' (not the path, no subdirectory under /usr/lib/s390x-linux-gnu/), /usr/lib/s390x-linux-gnu/ seems to be in the default library search path.