Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib issue on mac os #3

Closed
ghost opened this issue Mar 11, 2019 · 2 comments
Closed

lib issue on mac os #3

ghost opened this issue Mar 11, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 11, 2019

Hello there !

I'm having the following issue on mac os :

eidreader src/dyn_unix.c:34:SYS_dyn_LoadLibrary() dlopen(beidpkcs11.dll, 2): image not found Traceback (most recent call last): File "/usr/local/bin/eidreader", line 3, in <module> main() File "/usr/local/lib/python3.7/site-packages/eidreader/main.py", line 220, in main print(json.dumps(eid2dict())) File "/usr/local/lib/python3.7/site-packages/eidreader/main.py", line 90, in eid2dict pkcs11.load() File "/usr/local/lib/python3.7/site-packages/PyKCS11/__init__.py", line 483, in load raise PyKCS11Error(-1, pkcs11dll_filename) PyKCS11.PyKCS11Error: Load (beidpkcs11.dll)

@ghost ghost changed the title lib issue on macos lib issue on mac os Mar 11, 2019
@lsaffre
Copy link
Member

lsaffre commented Mar 11, 2019

Yes, I believe that it doesn't work on MacOS. You are the first Mac user who tries it. The problem is here:
https://github.com/lino-framework/eidreader/blob/master/eidreader/main.py#L84
IOW you must find out the name of the file which contains the Python KCS11 library and then set an environment variable PYKCS11LIB to that name. And if you post the name here, I can adapt the code so that future Mac users don't stumble into the problem. After reading this I guess that "PYKCS11LIB=opensc-pkcs11.so" should do the trick. Please confirm whether it works.

@ghost
Copy link
Author

ghost commented Mar 12, 2019

Thanks for the fast answer 👍

The Belgian EID middleware installs the lib there :

/usr/local/lib/beid-pkcs11.bundle/Contents/MacOS/

The name of the file is :

libbeidpkcs11.dylib

Edit:

I've added the correct path to PYKCS11LIB and it seems to work just fine now.

@ghost ghost closed this as completed Mar 12, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant