Using the tool with PKCS#11 modules not signed by "Developer ID Application: Riigi Infosüsteemi Amet (ET847QJV9F)" results in error:
$ pkcs11-tool --module /Library/CardPipes/librpkcs11.dylib -I
sc_dlopen failed: dlopen(/Library/CardPipes/librpkcs11.dylib, 1): no suitable image found. Did find:
/Library/CardPipes/librpkcs11.dylib: code signature in (/Library/CardPipes/librpkcs11.dylib) not valid for use in process using Library Validation: mapping process and mapped file (non-platform) have different Team IDs
error: Failed to load pkcs11 module
Aborting.
And the default pkcs11-tool is the one installed by this installer.
$ which pkcs11-tool
/usr/local/bin/pkcs11-tool
$ ls -l /usr/local/bin/pkcs11-tool
lrwxr-xr-x 1 root admin 31 18 Sep 09:38 /usr/local/bin/pkcs11-tool -> /Library/OpenSC/bin/pkcs11-tool
There is simple workaround: use a different pkcs11-tool build or re-sign the tool or module (if you are a developer) but the proper solution is to distribute 3rd party tools in a way that doesn't cripple them. The fix is signing tools that load 3rd party modules (like pkcs11-tool loading PKCS#11 modules) with:
I can't change the installation, as it would break ID-card support.
Using the tool with PKCS#11 modules not signed by "Developer ID Application: Riigi Infosüsteemi Amet (ET847QJV9F)" results in error:
And the default pkcs11-tool is the one installed by this installer.
There is simple workaround: use a different pkcs11-tool build or re-sign the tool or module (if you are a developer) but the proper solution is to distribute 3rd party tools in a way that doesn't cripple them. The fix is signing tools that load 3rd party modules (like pkcs11-tool loading PKCS#11 modules) with:
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation