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

Pkcs11-spy version 3 loading version 2 fails #2204

Closed
dengert opened this issue Jan 15, 2021 · 2 comments · Fixed by #2206
Closed

Pkcs11-spy version 3 loading version 2 fails #2204

dengert opened this issue Jan 15, 2021 · 2 comments · Fixed by #2206

Comments

@dengert
Copy link
Member

dengert commented Jan 15, 2021

Problem Description

Proposed Resolution

Steps to reproduce

Logs

@dengert
Copy link
Member Author

dengert commented Jan 15, 2021

While trying to run spy built from master, to load p11-kit to test #2199, spy tries to call the C_GetInterface in the p11-kit, but p11-kit is version 2, and does not have C_GetInterface.

Spy output show a call C_GetInterface, which appears to be an internal call?

Temporary fix:
pkcs11-spy-po-bug.diff.txt

I leave the problem up to those working on pkcs11 v3.

@Jakuje
Copy link
Member

Jakuje commented Jan 18, 2021

Thank you for the report. The detection of V3 API with presence or absence of functions in dynamic objects makes it more complicated for proxies such as pkcs11-spy or p11-kit as we can not hide a symbol in runtime.

As I thought about this, the most sensible way would be to always provide the interface functions, but if the underlying module does not support the V3 functions, emulate this by returning the function list with only V2 interfaces.

See the proposed patch in #2206

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

Successfully merging a pull request may close this issue.

2 participants