Closed M11158002 closed 10 months ago
Open your python
DOMAIN = "PicoKeys.com"
USERNAME = "Pico-Fido"
import keyring
key = keyring.get_password(DOMAIN, USERNAME)
Does `key` return `NoneType` or raises an exception?
- 2nd:
import keyring from cryptography.hazmat.primitives.serialization import Encoding, PrivateFormat, NoEncryption, load_pem_private_key from cryptography.hazmat.primitives.asymmetric import ec pkey = ec.generate_private_key(ec.SECP256R1()) keyring.set_password("test", "test", pkey.private_bytes(Encoding.PEM, PrivateFormat.PKCS8, NoEncryption()).decode()) key = keyring.get_password(DOMAIN, USERNAME)
Does `key` return `NoneType` or raises an exception?
None of these two 1st:No 2nd:No
Sorry, the 2nd is wrong. Please use this:
import keyring
DOMAIN = "PicoKeys.com"
USERNAME = "Pico-Fido"
from cryptography.hazmat.primitives.serialization import Encoding, PrivateFormat, NoEncryption, load_pem_private_key
from cryptography.hazmat.primitives.asymmetric import ec
pkey = ec.generate_private_key(ec.SECP256R1())
keyring.set_password(DOMAIN, USERNAME, pkey.private_bytes(Encoding.PEM, PrivateFormat.PKCS8, NoEncryption()).decode())
key = keyring.get_password(DOMAIN, USERNAME)
Both of these can be executed normally
But in the 3rd code, is key
of NoneType
or exists?
key return str
-----BEGIN PRIVATE KEY-----
******************************************************
******************************************************
**********************************************
-----END PRIVATE KEY-----
Now that you've generated the key, does backup
work?
Refer to the backup process mentioned in #22 and the execution of "python3 pico-fido-tool.py --pin 123456 secure enable" pico-fido-tool.py will not end. After debugging, I saw that it stopped at line 94 "enable_device_aut _call"
Refer to the backup process mentioned in #22 and the execution of "python3 pico-fido-tool.py --pin 123456 secure enable" pico-fido-tool.py will not end. After debugging, I saw that it stopped at line 94 "enable_device_aut _call"
Sorry, it can run normally after compiling the development version of the firmware. Thanks.
An error occurred while enabling the secure feature using pico-fido-tool.py