Skip to content

Reading Token information #4

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

Closed
Ovomaltine85 opened this issue Jul 2, 2017 · 5 comments
Closed

Reading Token information #4

Ovomaltine85 opened this issue Jul 2, 2017 · 5 comments

Comments

@Ovomaltine85
Copy link

Hi!
I want to retrieve information about a certain token like serial number, manufacturer etc.
If I select a token with get_token(token_label='somelabel') I only can read token's label with token.label, but all other token data like token manufacturer, model or serial number is empty.

Hasn't it just been implemented or do I forget something?

@danni
Copy link
Collaborator

danni commented Jul 3, 2017

This has been implemented, but probably you've hit a bug (there's some weird UTF-8 decoding bugs I found with this info on various devices). What HSM are you using?

@Ovomaltine85
Copy link
Author

I'm using SoftHSM2

@danni
Copy link
Collaborator

danni commented Jul 3, 2017

Oh! They're on token.slot.

e.g.

>>> token.slot.manufacturer_id
'OpenSC Project'

@danni danni added the question label Jul 3, 2017
@Ovomaltine85
Copy link
Author

Ovomaltine85 commented Jul 4, 2017

Thank you, that works! But I'm still missing how to get the serial number of the token. Is there also the chance to retrieve this information?

btw: it's not important that much...

@danni
Copy link
Collaborator

danni commented Jul 5, 2017

This is token.serial, but it looks like there's a bug.

@danni danni added the bug label Jul 5, 2017
@danni danni closed this as completed in 0603b5e Jul 5, 2017
keldonin added a commit to keldonin/python-pkcs11 that referenced this issue Feb 19, 2019
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

2 participants