Re: coolkey on FreeBSD - Firefox segfaults when trying to add libcoolkeypk11.so as a security module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kevin Reinholz wrote:
Ladies and Gentlemen,



When I try to add libcoolkeypk11.so as a Security Module in Firefox, the dinosaur segfaults without an error message. (Exit code 139).

An ldd of libcoolkeypk11.so reveals:

/usr/opt/lib/pkcs11/libcoolkeypk11.so:
        libckyapplet.so.1 => /usr/opt/lib/libckyapplet.so.1 (0x281a6000)
        libz.so.4 => /lib/libz.so.4 (0x281b1000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x28300000)
        libm.so.5 => /lib/libm.so.5 (0x281c3000)
        libc.so.7 => /lib/libc.so.7 (0x28089000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x281d8000)
  
There has been a fair amount of work to expunge libstdc++ from coolkey, it's surprising that it's showing up now. (though I don't know if that's your issue).

Another place to look is see if the pcsc-lite shared library is being properly loaded. I haven't tried coolkey on a generic freeBSD system, though it has been built for the MacOS variant of freebsd.
An ldd of libckyapplet.so.1 reveals:

/usr/opt/lib/libckyapplet.so.1:
        libz.so.4 => /lib/libz.so.4 (0x28190000)
        libc.so.7 => /lib/libc.so.7 (0x28089000)
  

Should either of these coolkey shared objects be explicitly linked to libpcsclite.so.1?
  
Coolkey dloads this library.
coolkey's src/install/Makefile reveals that it correctly recognizes SCARD_LIB_NAME = libpcsclite.so.1 which it is looking for in PCSC_LIBS = -L/usr/local/lib.

Has anyone successfully tested coolkey on a *BSD system? Building it on FreeBSD is easy enough. Loading it as a security module in Firefox is not.
  
I would pull and build NSS to get the pk11util tool. pk11util allows you to open and test pkcs #11 modules without the full weight of a browser (firefox), or even a pki toolkit (nss).
cvs checkout -r NSS_3_11_BRANCH mozilla/security/nss mozilla/security/dbm mozilla/security/coreconf mozilla/dbm
cvs checkout mozilla/nsprpub
cd mozilla/security/nss
make nss_build_all
cd cmd/pk11util
make

I find most of the issues in bringing a new pkcs#11 module up (or porting it to a new platform) show up at initialization time, so pk11util can help you debug those (you can at least get a stack traceback if you run it in a debugger.

bob

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Coolkey-devel mailing list
Coolkey-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/coolkey-devel

[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Women]

  Powered by Linux