-
Notifications
You must be signed in to change notification settings - Fork 712
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
C_Initialize() calls itself in a loop when pkcs-spy is used with SoftHSM from Homebrew (on macOS) #2875
Comments
What version are you using? |
I can't reproduce this on Linux with master |
I never saw this issue on Linux either so I assume it will be something osx (or osx build) specific. |
I was using the git version as of 2 days ago. I tried again with OpenSC lib (and also another PKCS#11 lib) instead of SoftHSM and it works fine.
Maybe the problem is specific to SofHSM on macOS? |
Could it be if there is something loading softhsm from OpenSSL initialization, for example as a engine/provider? We had some fixes to prevent doing the same from the pkcs11-provider in OpenSC (#2712). Its possible that SoftHSM might need something similar. |
If I rebuild SoftHSM I do not have the problem any more :-( I now have a working configuration. You can ignore this bug. No need to invest time on it. |
On macOS, I built softhsm from its git repository and could not reproduce this either. |
Please open a new ticket, if you have new debug information, thank you. |
Problem Description
I try to use pkcs11-spy on macOS Ventura 13.6 (22G120).
My problem is that
C_Initialize()
from pkcs-spy calls itself recursively until the stack is full and the application crashes.Instead
C_Initialize()
from pkcs-spy should callC_Initialize()
from the PKCS#11 lib I configured in PKCS11SPY.I tried with the current git version of OpenSC.
Proposed Resolution
I have no solution.
I am pretty sure I already got this problem a few years back. But I do not remember how I solved it.
It looks like a symbol resolution issue between
C_Initialize()
from pkcs-spy andC_Initialize()
from the PKCS#11 library I want to spy.I guess the issue is specific to macOS.
Steps to reproduce
Logs
It is not a problem with OpenSC itself.
The text was updated successfully, but these errors were encountered: