Next: , Previous: , Up: Internals   [Contents][Index]

7.2 Developing Scute

Scute is single-threaded. There is a global lock that is taken in all entry points of Scute, except for C_Initialize, C_Finalize, C_GetFunctionList, and stubs.

Here are a couple of hints on how to develop PKCS #11 modules for Mozilla:

libopensc2 ships with a pkcs11-spy library that can be loaded as a wrapper around the PKCS #11 library you want to use to log all functions invoked by Mozilla. Here is how to use it:

Set the PKCS11SPY_OUTPUT environment variable to a filename. pkcs11-spy appends its log messages at the end of this file. Set the PKCS11SPY environment variable to the filename of the PKCS #11 module you actually want to use. Start Mozilla within this environment.

There is a different, probably more powerful way to debug Mozilla PKCS #11 libraries. However, to be able to use it, you need to configure and compile the Mozilla NSS sources with --enable-debug. Instructions can be found at:

Here are a couple of links to more information about implementing a PKCS #11 module for Mozilla:

Implementing PKCS #11 for the Netscape Security Library (Caution: The content may be out of date)

Common PKCS #11 Implementation Problems

PKCS #11 Conformance Testing

The Mozilla NSS web page