Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show slot id after initialization #225

Closed
anitgandhi opened this issue Aug 16, 2016 · 6 comments
Closed

Show slot id after initialization #225

anitgandhi opened this issue Aug 16, 2016 · 6 comments
Milestone

Comments

@anitgandhi
Copy link

anitgandhi commented Aug 16, 2016

Whenever I run softhsm2-util --init-token on a given free slot, it changes the slot id to something very large. See screenshot for example.

Steps taken:

  1. Fresh clone of this repo and I run through the install instructions - no problems here
  2. Run softhsm2-util --show-slots to see the available slots. Slot 0 will present as empty, as expected.
  3. Run softhsm2-util --init-token --slot 0 --label "test" --pin 1234 --so-pin 1234.
  4. Run softhsm2-util --show-slots again and the token I just created is under Slot 1004965189 (for example, could be any large number usually).

This happens on Mac and Ubuntu from my testing.

I'm not sure if this is by design or if I'm missing something.

@anitgandhi
Copy link
Author

Interestingly this doesn't happen on the master branch...

@bellgrim
Copy link
Contributor

bellgrim commented Aug 16, 2016

This is by design. See #199.

From the NEWS file:

Issue #199: The token serial number will be used when setting the slot number. The serial number is set after the token has been initialized. (Patch from Lars Silvén)

@matthauck
Copy link
Contributor

Would it be possible for softhsm2-util to display the new slot ID in the output? It would be nice to be able to know the new ID immediately at initialization time.

@bellgrim
Copy link
Contributor

The slot ID is only updated after the library is reinitialized.

softhsm2-util could show the new slot ID if it reinitialize the library and search for a token matching the given label.

@bellgrim bellgrim changed the title Slot initialization changes slot id Show slot id after initialization Aug 17, 2016
@bellgrim bellgrim added this to the 2.3.0 milestone Jan 17, 2017
bellgrim added a commit to bellgrim/SoftHSMv2 that referenced this issue Feb 28, 2017
bellgrim added a commit that referenced this issue Mar 31, 2017
Issue #225: Show slot id after initialization
@bellgrim
Copy link
Contributor

Fixed in #296

@beatriztavares
Copy link

Still happening on Ubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants