Closed Bug 1837987 Opened 2 years ago Closed 2 years ago

Initialize without custom LibraryParameters field in C_INITIALIZE_ARGS

Categories

(NSS :: Libraries, enhancement)

3.89
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fkrenzel, Unassigned)

Details

Attachments

(1 file)

Steps to reproduce:

pkcs11-tool -L --module libsoftokn3.so

Actual results:

Main C_Initialize(NULL) rv:CKR_ARGUMENTS_BAD
error: PKCS11 function C_Initialize failed: rv = CKR_ARGUMENTS_BAD (0x7)
Aborting.

Expected results:

If the arguments were provided by other means (e. g. enviromental variable, configuration file, default value) the initialization could be successfull.

Abstract:
NSS should be able to handle standard PKCS#11 CK_C_INITIALIZE_ARGS structure
without the LibraryParameters field. The library parameters should be provided
by other means.

Implementation:
With this commit the library parameters can be provided by the following means:

  1. C_INITIALIZED_ARGS - lib params are included in LibraryParameters field
  2. NSS_LIB_PARAMS - env. var. containing the lib. params.
  3. NSS_LIB_PARAMS_FILE - env. var. pointion to a file with lib. params.
  4. /etc/nss/params.config - default lib. param. file location
  5. LIB_PARAM_DEFAULT - string ensureing the pressence at all times
    "configdir='' certPrefix='' keyPrefix='' secmod='' flags=noCertDB,noModDB"

The priority is given by the listed order

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → WORKSFORME

Yup. I'll verify that fkrenzel knows how to use the try server (I should have done a try push before pushing the patch myself).

Flags: needinfo?(rrelyea)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: