G'day,

I'm attempting to use the PKCS#11 library in muscle framework, with the opensc PKCS#11 crypto engine. But I'm getting an unresolved error when I load libpkcs11.so:

$ dltest /usr/local/lib/libpkcs11.so
[dltest] ERROR: /usr/local/lib/libpkcs11.so: undefined symbol: msc_error

The symbol msc_error is defined in /usr/local/lib/libmusclecard.so,
but I don't see any reference to libmusclecard.so when I look at /usr/local/lib/libpkcs11.so:


$ ldd /usr/local/lib/libpkcs11.so
        linux-gate.so.1 =>  (0xffffe000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4002a000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x4003a000)
        libpcsclite.so.1 => /usr/local/lib/libpcsclite.so.1 (0x4012a000)
        libc.so.6 => /lib/tls/libc.so.6 (0x40138000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
        libdl.so.2 => /lib/libdl.so.2 (0x4024d000)

And I don't see any reference to libmusclecard in the build output of the PKCS#11 library:

$ make > out 2>&1
$ grep libpkcs11.so out
gcc -shared p11_crypt.lo p11_digest.lo p11_dual.lo p11_ext.lo p11_general.lo p11_key.lo p11_object.lo p11_parallel.lo p11_random.lo p11_session.lo p11_sign.lo p11_token.lo p11_verify.lo p11x_async.lo p11x_error.lo p11x_log.lo p11x_msc.lo p11x_object.lo p11x_prefs.lo p11x_session.lo p11x_slot.lo p11x_state.lo p11x_thread.lo p11x_unixdll.lo p11x_util.lo p11x_win32dll.lo -lpthread -lcrypto -lpthread /usr/local/lib/libpcsclite.so -lcrypto -Wl,-soname -Wl,libpkcs11.so.0 -o .libs/libpkcs11.so.0.0.1
(cd .libs && rm -f libpkcs11.so.0 && ln -s libpkcs11.so.0.0.1 libpkcs11.so.0)
(cd .libs && rm -f libpkcs11.so && ln -s libpkcs11.so.0.0.1 libpkcs11.so)
$ grep libmusclecard out
$


Note: I built libmusclecard and muscleframework using default configuration options.

I added "-lmusclecard" to the PKCS11/src/Makefile.in, and rebuilt, and the generated libpkcs11.so file now loads correctly:

$ dltest /usr/local/lib/libpkcs11.so
SUCCESS: Loaded /usr/local/lib/libpkcs11.so

So: is adding "-lmusclecard" required, or have I screwed up the configuration and/or installation of muscle components?

As an aside, even though libpkcs11.so can now be loaded, it still fails to be loaded by opensc's pkcs11-tool:

$ pkcs11-tool --module /usr/local/lib/libpkcs11.so --show-info -vvvvv
error: Failed to load pkcs11 module
Aborting.

So I guess I'm still doing something wrong...

-- Geoff
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to