G’day, Today I installed RHEL5, which includes Coolkey-1.0.1,
pcsc-lite-1.3.1, and ccid-1.0.1 in the base system. I compiled and built the attached program,
which calls C_Initialize(), C_Finalize(), and optionally calls syslog() before
C_Initialize(). This is the output I get: $ uname -a Linux dodo.vintela.com
2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 athlon i386 GNU/Linux $ rpm -q coolkey coolkey-1.0.1-16.el5 $ rpm -q pcsc-lite pcsc-lite-1.3.1-7 $ rpm -q ccid ccid-1.0.1-6.el5 $ gcc -c –I/usr/local/include/pkcs11
test_pkcs11_syslog.c $ gcc -o test-pksc11-syslog
test_pkcs11_syslog.o -ldl $ ./test-pksc11-syslog
/usr/lib/pkcs11/libcoolkeypk11.so ## calling C_Initialize()
... ok ## calling C_Finalize() ...
ok $ ./test-pksc11-syslog
--syslog /usr/lib/pkcs11/libcoolkeypk11.so ## calling syslog ... ok ## calling C_Initialize()
... ^C Note
that the C_Initialize() call hangs. But if I link with lpthread, it will work:
$ ./test-pksc11-syslog
/usr/lib/pkcs11/libcoolkeypk11.so ## calling C_Initialize()
... ok ## calling C_Finalize() ...
ok $ ./test-pksc11-syslog --syslog
/usr/lib/pkcs11/libcoolkeypk11.so ## calling syslog ... ok ## calling C_Initialize()
... ok ## calling C_Finalize() ...
ok Theoretically, a reader and/or card should
not be necessary for C_Initialize() and C_Finalize() calls, but I attached
various readers anyway and observed the same results. I also installed Coolkey-1.1.0, and the
latest Coolkey from CVS, with the same results. I also installed pcsc-lite-1.4.3, but I
still get the test program to hang when syslog() is called. Can anyone else reproduce this problem? I
see this consistently on RHEL platforms, but googling shows no one else with
this issue. It seems like a trivial test case that I wonder why no one else has
mentioned it. Maybe I’m doing something wrong? The only way I can get around this issue
is to modify my applications by linking “-lpthread” (which is not a
viable solution or a requirement I can impose on customers) or modify Coolkey’s
configure.in by checking for the pthread library and making the necessary RPMs for
distribution. But I’m hoping that I have just
overlooked something trivial so that this is not necessary. -- Geoff From:
coolkey-devel-bounces@xxxxxxxxxx [mailto:coolkey-devel-bounces@xxxxxxxxxx] On Behalf Of Geoff Elgey G'day, |
Attachment:
test_pkcs11_syslog.c
Description: test_pkcs11_syslog.c
_______________________________________________ Coolkey-devel mailing list Coolkey-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/coolkey-devel