Initialize with Label #129

Open
opened 2026-02-13 23:30:13 +08:00 by Styne13 · 1 comment

First of all I would like to thank you for the great work on pico-hsm!

At the moment the label of the sc seems to be fixed to „Pico-HSM“ (s. 25889094e5/src/hsm/sc_hsm.c (L299))

If I try to initialize with:
$ sc-hsm-tool --initialize --so-pin 3537363231383830 --pin 648219 —label“myHSM“
I get some weird behaviour and the card won‘t react to commands like „list objects“ anymore.

Would it be possible to add a label functionality?

I‘m not yet familiar with pkcs11 or pkcs15 api, but if you give a hint with implementation flow, I might assist with a PR.

Thanks and best regards!

Marcel

First of all I would like to thank you for the great work on pico-hsm! At the moment the label of the sc seems to be fixed to „Pico-HSM“ (s. https://github.com/polhenarejos/pico-hsm/blob/25889094e554f9f19184b94ef881c7d002e5da47/src/hsm/sc_hsm.c#L299) If I try to initialize with: `$ sc-hsm-tool --initialize --so-pin 3537363231383830 --pin 648219 —label“myHSM“` I get some weird behaviour and the card won‘t react to commands like „list objects“ anymore. Would it be possible to add a label functionality? I‘m not yet familiar with pkcs11 or pkcs15 api, but if you give a hint with implementation flow, I might assist with a PR. Thanks and best regards! Marcel

Ok, think I've figured it out and created a PR for it:
#130

The question in my mind is why the callback to parse_token_info will crash the device.
Would appreciate that both callbacks are still functional.
Maybe someone else with a deeper understanding of the code can assist her.

Ok, think I've figured it out and created a PR for it: #130 The question in my mind is why the callback to parse_token_info will crash the device. Would appreciate that both callbacks are still functional. Maybe someone else with a deeper understanding of the code can assist her.
Sign in to join this conversation.