Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-20 Thread Anna Pavlova
Hi Douglas, Something completely different to try is to test use your libPkcs11.so module with FireFox or Thunderbird: it runs fine under Firefox - it shows the slots and the slotInfo. Thunderbird I don't have so I didn't try it. Can you do a ldd pkcs11-tool and ldd libPkcs11.so yes, for some

Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-20 Thread Douglas E. Engert
On 12/20/2012 8:04 AM, Anna Pavlova wrote: Hi Douglas, Something completely different to try is to test use your libPkcs11.so module with FireFox or Thunderbird: it runs fine under Firefox - it shows the slots and the slotInfo. Thunderbird I don't have so I didn't try it. Can you do

Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-19 Thread Anna Pavlova
Hello Douglas, It sounds like opensc is compiled with the -g but not your module. you're right I didn't use the -g option while compiling my module, I added the -g option into my project and now when I compile my module I do (simplified): gcc -fpermissive -Wall -g -c -O2 -I../foo/includes

Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-19 Thread Douglas E. Engert
On 12/19/2012 3:59 AM, Anna Pavlova wrote: Hello Douglas, Something completely different to try is to test use your libPkcs11.so module with FireFox or Thunderbird: FireFox: Tools- Options- Advanced - Security Devices - Load Then give it a name, and the /path/to/libPkcs11.so. The if it

Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-18 Thread Anna Pavlova
Hello Douglas and Anthony, sorry for late reply and cool, thanks you for helping me with gdb :-). Thanks to you help I was able to run with my loaded library in debug mode. Anyway, the crash (in the debug mode) looks as follows: Program received signal SIGSEGV, Segmentation fault. 0xd810b787 in

Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-18 Thread Douglas E. Engert
On 12/18/2012 8:01 AM, Anna Pavlova wrote: Hello Douglas and Anthony, sorry for late reply and cool, thanks you for helping me with gdb :-). Thanks to you help I was able to run with my loaded library in debug mode. Anyway, the crash (in the debug mode) looks as follows: Program received

Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-17 Thread Douglas E. Engert
On 12/17/2012 7:01 AM, Anna Pavlova wrote: Hello, I am new to OpenSC but I was looking for a 3rd party tool with which I could test my self-developed pkcs11 library and I came across the OpenSC pkcs11-tool. I installed OpenSC under Ubuntu11.10, following

Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-17 Thread Anna Pavlova
Hello Douglas, Sounds like p11 == NULL, or p11-C_Initialize is NULL or not valid. I did: printf(p11 = 0x%0x, p11-C_Initialize = 0x%0x\n, p11, p11-C_Initialize); in pkcs11-tool.c, just after C_LoadModule and before p11-C_Initialize(NULL) and got: p11 = 0xb7214060, p11-C_Initialize =

Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-17 Thread Anthony Foiani
Anna, greetings -- On Mon, Dec 17, 2012 at 10:37 AM, Anna Pavlova funny.sweet.naug...@gmail.com wrote: Unfortunately I'm not very good in gdb :-( anna@anna:~/OpenSC/src/tools$ export LD_LIBRARY_PATH=`ls ../*/.libs -d | tr '\012' :` anna@anna:~/OpenSC/src/tools$ cd .libs/

Re: [opensc-devel] Segmentation fault in pkcs11-tool

2012-12-17 Thread Douglas E. Engert
On 12/17/2012 11:37 AM, Anna Pavlova wrote: Hello Douglas, Sounds like p11 == NULL, or p11-C_Initialize is NULL or not valid. I did: printf(p11 = 0x%0x, p11-C_Initialize = 0x%0x\n, p11, p11-C_Initialize); in pkcs11-tool.c, just after C_LoadModule and before p11-C_Initialize(NULL)