Closed imaGuru closed 1 year ago
Ok, after some digging in the debugger it looks like for some reason ctx_finish
is called after retrieving the keys from the card and before signing with the key. If I gimp the ctx_finish
function and just return before releasing any memory the signing process finishes successfully.
This would probably mean that the problem is not in the libp11 but in osslsigncode or libcrypto. Will report back when I know more and probably move this issue to osslsigncode
It is indeed problem with osslsigncode which destroys the engine immediately after retrieving tokens which causes a segmentation fault later when trying to sign.
Not sure if this is the right place, but the segmentation fault seems to be in libp11 When running:
Results in:
gdb bt
Segmentation fault occurs inside
p11_slot.c
functionpkcs11_get_session
in line 155:rv = CRYPTOKI_call(ctx, C_GetSessionInfo(*sessionp, &session_info));
when trying to sign an exe file with osslsigncode and proCertum card 3.6.1. Problem occurs in master, libp11-0.4.12 and libp11-0.4.11. Any suggestions on how to start debuging this problem?libp11 version: master, 0.4.12, 0.4.11 Reader: ACS ACR39U ICC Reader 00 00 Card: proCertum card 3.6.1 PKCS11 Module: sc30pkcs11-3.0.6.68-MS.so