Open asergios opened 5 years ago
Hi, what HSM are you using?
Hi,
I am using the Portuguese Citizen Card. I can't find much information about it in English. https://en.wikipedia.org/wiki/Citizen_Card_(Portugal)
The package overall works good with the card, that's the only error I had so far.
It seems like it happens when I try to get the Public Key from my Citizen Card
obj = next(self.session.get_objects({Attribute.CLASS: ObjectClass.PUBLIC_KEY}))
If there is something I can do to help you solve this problem tell me.
The Private Keys work perfectly, the problem seems to be really on the Public Keys
It looks like it's failing to read attributes from the device. It's possible those attributes don't exist/return empty.
If you're willing to make a PR, you should be able to add exception handling to _unpack_attributes
to handle the error.
When I try to print every object available in my Smart Card with:
for i in session.get_objects(): print(i)
I always get this error on the second object
Note that this also happens when I try to use get_key() for some keys.