Skip to content

Improve PKCS11 failure mode #730

@ema

Description

@ema

Hi,

configuring the PKCS11 provider incorrectly seems to invariably result in the following sort of error messages:

parsec[391160]: [ERROR parsec_service::providers::pkcs11] Error initializing PKCS 11 context;
parsec[391160]: [ERROR cryptoki::context] Failed to finalize: PKCS11 error: This value can be returned by any function other than C_Initialize and C_GetFunctionList.  It indicates that the function cannot be executed because the Cryptoki library has not yet been initialized by a call to C_Initialize.
parsec[391160]: [ERROR parsec_service::utils::service_builder] Provider with ID PKCS #11 provider cannot be created;

The above is printed regardless of what is actually going wrong in reality. For instance, I have tried starting parsec with the wrong slot_number, or with no slot at all. The error message should be more descriptive if possible.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions