Skip to content

Conversation

@Jakuje
Copy link
Member

@Jakuje Jakuje commented Apr 24, 2023

The NSS can not handle tokens with colons in token info labels because it is using colon as a separator for token info label and object label.

Fixes: #2725

More information available in the following NSS bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=1817553

Checklist
  • Documentation is added or updated
  • New files have a LGPL 2.1 license statement
  • PKCS#11 module is tested
  • Windows minidriver is tested
  • macOS tokend is tested

@Jakuje Jakuje marked this pull request as ready for review April 24, 2023 12:12
@Jakuje Jakuje force-pushed the nss-colons branch 2 times, most recently from bb1d9f7 to 66afffc Compare April 25, 2023 10:54
* TOKEN_INFO label so replace them here */
for (int i = 0; i < 32; i++) {
if (slot->token_info.label[i] == ':') {
slot->token_info.label[i] = '_';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think underscores are very unpleasant in user messages. Could we maybe agree on replacing that just with a space (my preferred option) or with .?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I used the _ as suggested by @mouse07410 but you are right that using other character might be more user-friendly. I am afraid that whitespace might be confusing so I am for the . (updated now).

The NSS can not handle tokens with colons in token info labels because
it is using colon as a separator for token info label and object label.

Fixes: OpenSC#2725

More information available in the following NSS bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=1817553
@frankmorgner frankmorgner merged commit 34d1b06 into OpenSC:master Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NSS does not like colons in token label

2 participants