Infineon / BlockchainSecurity2Go-Python-Library

Python library for the Blockchain Security 2Go starter kit
https://infineon.com/blockchain
MIT License
16 stars 8 forks source link

Traceback: generate_and_verify_signature_example #22

Closed oberstet closed 4 years ago

oberstet commented 4 years ago

I'm running into a traceback with one of the provided examples:

(cpy374_1) oberstet@intel-nuci7:~/scm/3rdparty/BlockchainSecurity2Go-Python-Library/examples/generate-and-verify-signature$ python generate_and_verify_signature_example.py 
XXXXXXXXXX 17 [0, 2, 9, 12, 41, 0, 2, 0, 65, 0, 41, 118, 49, 46, 48, 144, 0]
Found the specified reader and a Blockchain Security 2Go card!
Hashed message: 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069
Which key would you like to use? (Numbers 1 - 255 only!)
1
ERROR: module 'blocksec2go' has no attribute 'is_key_valid'
[1]+  Getötet                python generate_and_verify_signature_example.py
(cpy374_1) oberstet@intel-nuci7:~/scm/3rdparty/BlockchainSecurity2Go-Python-Library/examples/generate-and-verify-signature$ pip show blocksec2go
Name: blocksec2go
Version: 1.1
Summary: Allow for communication with Infineon's Blockchain Security 2Go starter kit
Home-page: https://github.com/Infineon/BlockchainSecurity2Go-Python-Library
Author: Infineon Technologies AG
Author-email: blockchain@infineon.com
License: MIT
Location: /home/oberstet/cpy374_1/lib/python3.7/site-packages
Requires: pyscard, cryptography
Required-by: 
(cpy374_1) oberstet@intel-nuci7:~/scm/3rdparty/BlockchainSecurity2Go-Python-Library/examples/generate-and-verify-signature$ python -V
Python 3.7.4
(cpy374_1) oberstet@intel-nuci7:~/scm/3rdparty/BlockchainSecurity2Go-Python-Library/examples/generate-and-verify-signature$ 

Copying the code for the functions get_key_info and is_key_valid over from ./blocksec2go/commands.py to ./examples/generate-and-verify-signature/generate_and_verify_signature_example.py makes it work happily ..

WaltherPachler commented 4 years ago

please try again, thx for the issue - was the wrong version number -> its now 1.2 should work now

oberstet commented 4 years ago

yes, indeed: it works now out of the box! thanks for the fix