solokeys / solo1-cli

Solo 1 library and CLI in Python
https://pypi.org/project/solo-python
Apache License 2.0
185 stars 69 forks source link

Refactoring the init warnings #45

Closed bozhodimitrov closed 4 years ago

bozhodimitrov commented 4 years ago

This PR resolves #24 by adding warning on Windows 10 1903 and higher for the requirement of administrative privileges. I think that it is a good idea and avoids user confusion - at least until the fido2 library or solo gets proper workaround.

solo_windows_10_1903_warning

Together with the Windows warning, I did refactoring for the Linux root warning as well.

bozhodimitrov commented 4 years ago

And actually I have a quick question. I did solo key update without --hacker (because it's not supported anymore) on my kickstarter Solo Hacker and it updated the firmware from 2.3.0 to 3.0.0. But now solo key version shows 3.0.0 locked!? Wasn't it supposed to automatically update my Solo Hacker to the unlocked setting? Also my bootloader version is still 2.3.0 (extracted via solo program aux bootloader-version)

And I did the update as Admin, so I kindа wondering if this is intended behavior?

All I wanted was to update my Solo Hacker edition to the latest unlocked firmware and bootloader.

nickray commented 4 years ago

Second one is intended, need to do the DFU dance. First one sounds like a horrible bug 😔

conorpp commented 4 years ago

@int3l Is there a chance you accidentally programmed a secure firmware? If you did this, then it would have locked the flash with the unlocked bootloader. The latest 3.0.0 firmware adds an extra byte of info about the lock setting when reporting the version.

bozhodimitrov commented 4 years ago

@conorpp I don't think so. Is there a way to revert to older unlocked (hacker) version in order to test if the latest version of solo-python is doing the change? I still have the old bootloader 2.3.0. Btw, I don't remember if I've ever entered DFU mode. Is it possible to recognize my factory version of Solo Tap if I provide the serial number?

nickray commented 4 years ago

We do not record key serial numbers, no.

bozhodimitrov commented 4 years ago

I see, well I guess that I fucked up somewhere. I think that I updated only one time via the webupdate or something like that. And now I wanted to test solo-python.

bozhodimitrov commented 4 years ago

Hi @nickray is this still relevant or should I close it?

conorpp commented 4 years ago

It looks good to me, thank you for the PR and sorry for delay :)