Skip to content

[pkcs11-tool] --slot parameter expects ID in decimal form #2938

@metsma

Description

@metsma

Problem Description

pkcs11-tool --slot parameter expects ID in decimal format and --list-slots parameter prints slots in hex format.

Proposed Resolution

Specify that it excpects slot ID in decimal format or modify code to accept hex format.

Steps to reproduce

pkcs11-tool -L
Available slots:
Slot 0 (0x0): SafeNet Token JC
...
Slot 8 (0x10): 
...
pkcs11-tool -O --slot=10
error: PKCS11 function C_OpenSession failed: rv = CKR_SLOT_ID_INVALID (0x3)
Aborting.
pkcs11-tool -O --slot=16
Using slot with index 8 (0x10)
...

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