Closed mistial-dev closed 2 years ago
The relevant code...
#ifndef _WIN32
#define P11LIBNAME "/usr/local/lib/libsc-hsm-pkcs11.so"
#endif
char *p11libname = P11LIBNAME;
dlhandle = dlopen(p11libname, RTLD_NOW);
The dlopen function appears to work fine on mac, as a symbolic link causes the app to pass its unit tests.
mistial@Mistials-MacBook-Pro bin % sudo ln -s /Library/sc-hsm-pkcs11/lib/sc-hsm-pkcs11.dylib /usr/local/lib/libsc-hsm-pkcs11.so
Password:
mistial@Mistials-MacBook-Pro bin % ./sc-hsm-pkcs11-test
PKCS11 unit test running.
Calling C_GetFunctionList Calling C_Initialize - CKR_OK : Passed
Calling C_GetInfo - CKR_OK : Passed
Calling C_GetSlotList - CKR_OK : Passed
Calling C_Finalize - CKR_OK : Passed
Unit test finished.
4 tests performed.
0 tests failed.
You can specify the location of the shared object, dll or dylib using the --module command line argument.
Using the TLS 1.3 release, installed using the standard package. The PKCS11 unit test appears to expect to use the linux .so file, rather than the mac dylib.