FIPS Module Specification: Difference between revisions

Jump to navigation Jump to search
Line 68: Line 68:
#include <stdio.h>
#include <stdio.h>


/*
* An extension of the CK_C_INITIALIZE_ARGS structure for the
* NSS cryptographic module. The 'LibraryParameters' field is
* used to pass instance-specific information to the library
* (like where to find its config files, etc).
*/
typedef struct CK_C_INITIALIZE_ARGS_NSS {
typedef struct CK_C_INITIALIZE_ARGS_NSS {
     CK_CREATEMUTEX CreateMutex;
     CK_CREATEMUTEX CreateMutex;
Line 74: Line 80:
     CK_UNLOCKMUTEX UnlockMutex;
     CK_UNLOCKMUTEX UnlockMutex;
     CK_FLAGS flags;
     CK_FLAGS flags;
    /* The official PKCS #11 spec does not have a 'LibraryParameters' field, but
    * a reserved field. NSS needs a way to pass instance-specific information
    * to the library (like where to find its config files, etc). This
    * information is usually provided by the installer and passed uninterpreted
    * by NSS to the library, though NSS does know the specifics of the softoken
    * version of this parameter. Most compliant PKCS#11 modules expect this
    * parameter to be NULL, and will return CKR_ARGUMENTS_BAD from
    * C_Initialize if Library parameters is supplied. */
     CK_CHAR_PTR *LibraryParameters;
     CK_CHAR_PTR *LibraryParameters;
    /* This field is only present if the LibraryParameters is not NULL. It must
    * be NULL in all cases */
     CK_VOID_PTR pReserved;
     CK_VOID_PTR pReserved;
} CK_C_INITIALIZE_ARGS_NSS;
} CK_C_INITIALIZE_ARGS_NSS;
Line 146: Line 142:
</pre>
</pre>
To reiterate, the mode of operation of the NSS cryptographic module is determined by the second argument passed to the <code>PR_FindFunctionSymbol</code> function.
To reiterate, the mode of operation of the NSS cryptographic module is determined by the second argument passed to the <code>PR_FindFunctionSymbol</code> function.
* Look up the standard PKCS #11 function <code>"C_GetFunctionList"</code> for the non-FIPS Approved mode of operation.
* For the non-FIPS Approved mode of operation, look up the standard PKCS #11 function <code>"C_GetFunctionList"</code>.
* Look up the alternative function <code>"FC_GetFunctionList"</code> for the FIPS Approved mode of operation.
* For the FIPS Approved mode of operation, look up the alternative function <code>"FC_GetFunctionList"</code>.


===Design Specification===
===Design Specification===
canmove, Confirmed users
937

edits

Navigation menu