Skip to content

Support vendor defined error codesΒ #299

@hug-dev

Description

@hug-dev

Vendor defined error codes are still not handled nicely. As a vendor, you probably do something like this:

#define CKR_MY_ERROR_A (CKR_VENDOR_DEFINED+1)
#define CKR_MY_ERROR_B (CKR_VENDOR_DEFINED+2)
#define CKR_MY_ERROR_C (CKR_VENDOR_DEFINED+3)

In cryptoki 0.10.0, these will be mapped to RvError::GeneralError. Therefore, as a cryptoki user I cannot distinguish between the vendor-defined errors.

From Section 3.6 of the standard v3.1:

Return values CKR_VENDOR_DEFINED and above are permanently reserved for token vendors.

So it should be safe to map these to something like RvError::VendorDefined(code).

Originally posted by @thgoebel in #54

A similar approach than #246 should probably be acceptable there!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions