Add card label #130

Open
Styne13 wants to merge 1 commits from Styne13/feature/hsm_label into master

Summary

  • implement get_card_label function in sc_hsm.c
  • update relevant callback functions parse_token_info and parse_ef_dir

Details / Impact

  • initilization with sc-hsm-tool and label option worked:
    sc-hsm-tool --initialize --so-pin 3537363231383830 --pin 648219 --label "Test123ThisIsAVeryLongHSMLabel"
  • showing label details of the connected hsm with pkcs15-tool -D worked
  • ToDo: Check why callback to parse_token_info will cause a crash of the pico

Testing

  • tested on raspberry pi pico (RP2-B2)

Licensing confirmation (required)

By checking the box below, you confirm ALL of the following:

  • You are the author of this contribution, or you have the right to contribute it.
  • You have read CONTRIBUTING.md.
  • You agree that this contribution may be merged, used, modified, and redistributed:
    • under the AGPLv3 Community Edition, and
    • under any proprietary / commercial / Enterprise editions of this project,
      now or in the future.
  • You understand that submitting this PR does not create any support obligation,
    SLA, or guarantee of merge.

I confirm the above licensing terms:

  • Yes, I agree

Anything else?

I am not aware if removing of the parse_token_info callback for file 0x2f03 will have any cons for other functions.

## Summary - implement get_card_label function in sc_hsm.c - update relevant callback functions _parse_token_info_ and _parse_ef_dir_ ## Details / Impact - initilization with sc-hsm-tool and label option worked: `sc-hsm-tool --initialize --so-pin 3537363231383830 --pin 648219 --label "Test123ThisIsAVeryLongHSMLabel"` - showing label details of the connected hsm with _pkcs15-tool -D_ worked - ToDo: Check why callback to parse_token_info will cause a crash of the pico ## Testing - tested on raspberry pi pico (RP2-B2) ## Licensing confirmation (required) By checking the box below, you confirm ALL of the following: - You are the author of this contribution, or you have the right to contribute it. - You have read `CONTRIBUTING.md`. - You agree that this contribution may be merged, used, modified, and redistributed: - under the AGPLv3 Community Edition, **and** - under any proprietary / commercial / Enterprise editions of this project, now or in the future. - You understand that submitting this PR does not create any support obligation, SLA, or guarantee of merge. **I confirm the above licensing terms:** - [X] Yes, I agree ## Anything else? I am not aware if removing of the parse_token_info callback for file 0x2f03 will have any cons for other functions.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin Styne13/feature/hsm_label:Styne13/feature/hsm_label
git checkout Styne13/feature/hsm_label
Sign in to join this conversation.