Skip to content

Commit 7860341

Browse files
committed
Merge remote-tracking branch 'solokeys/main' into main
# Conflicts: # CHANGELOG.md # README.md # pyproject.toml # solo/VERSION # solo/client.py
2 parents 982c369 + d3fb9d8 commit 7860341

21 files changed

Lines changed: 854 additions & 641 deletions

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# to use this, install [direnv](https://direnv.net/)
22
source venv/bin/activate
3+
unset PS1

CHANGELOG.md

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [0.0.30] - 2021-04-29
10+
- Replace old python-fido2 internal method used with fix from @enrikb
11+
12+
## [0.0.29] - 2021-04-28
13+
- Fix some typos in last release @enrikb
14+
15+
## [0.0.28] - 2021-04-25
16+
- Upgraded to new 0.9.1 fido2 library
17+
- Removed use of serial_number if it's not present in upstream fido2 library
18+
- Removed use of UDP communication
19+
- bumped isort version to >=5.0.0 and changed Makefile accordingly, see [Upgrading isort to 5.0.0](https://pycqa.github.io/isort/docs/upgrade_guides/5.0.0/)
20+
21+
## [0.0.27] - 2021-01-20
22+
- pin fido2 dep to 0.8 series @uli-heller
23+
- improve programming robustness @enrikb
24+
- prompt for PIN in `solo key verify`, if needed @enrikb
25+
26+
## [0.0.26] - 2020-07-17
27+
- fix bungled reference to `STABLE_VERSION` file
28+
29+
## [0.0.25] - 2020-07-17
30+
- credential management commands @rgerganov
31+
- static password vendor command @rgerganov
32+
- sign-file vendor command @rgerganov
33+
- typo @lolaum
34+
- use `main` as main branch
35+
36+
## [0.0.24] - 2020-02-27
37+
## Added
38+
- Add command to disable bootloader-access / updates on Solo devices
39+
- Improve admin/root/udev warning for Linux and Windows
40+
- Add ping command
41+
42+
## [0.0.23] - 2019-01-20
43+
## Changed
44+
- Fix Timeout
45+
46+
## [0.0.22] - 2019-01-20
47+
### Changed
48+
- Fix fallout of move to fido2 0.8
49+
50+
## [0.0.21] - 2019-12-01
51+
### Changed
52+
- Update to use python-fido2 v0.8
53+
54+
## [0.0.20] - 2019-12-01
55+
### Added
56+
- Add fingerprints for checking more Solo model certificates (Tap, Somu, Solo)
57+
58+
### Changed
59+
- Attestation key marker in mergehex operation
60+
61+
## [0.0.19] - 2019-11-09
62+
### Added
63+
- `solo key set-pin` and `change-pin` commands.
64+
65+
## [0.0.18] - 2019-10-29
66+
### Added
67+
### Changed
68+
- When signing, signatures were incorrectly annotated with `2.3.0` version. updated to `2.5.3`.
69+
70+
## [0.0.17] - 2019-10-28
71+
### Added
72+
### Changed
73+
- remove `--hacker` and `--secure` options when auto-updating.
74+
- pull `firmware-*.json` instead of choosing between hacker and secure
75+
76+
## [0.0.16] - 2019-10-28
77+
### Added
78+
- option to specify attestation certificate with attestation key
79+
- mergehex operation adds in attestation certificate
80+
- mergehex operation adds in lock status with `--lock` flag
81+
82+
### Changed
83+
- attestation key requires associate attestation cert
84+
- sign operation adds 2 signatures for 2 different versions of solo bootloader
85+
- solo version attempts to uses HID version command to additionally see lock status of key.
86+
87+
## [0.0.15] - 2019-08-30
88+
### Added
89+
- `solo.hmac_secret.make_credential` method
90+
- separate `solo key make-credential` CLI target
91+
92+
### Changed
93+
- remove credential generation from `solo.hmac_secret.simple_secret`
94+
- demand `credential_id` in `solo key challenge-response`
95+
96+
## [0.0.14] - 2019-08-30
97+
### Added
98+
- challenge-response via `hmac-secret`
99+
100+
## [0.0.13] - 2019-08-19
101+
### Changed
102+
- implement passing PIN to `solo key verify`
103+
104+
## [0.0.12] - 2019-08-08
105+
### Changed
106+
- update fido2 to 0.7.0
107+
108+
## [0.0.11] - 2019-05-27
109+
### Changed
110+
- adjust to and pin fido2 0.6.0 dependency (@conorpp)
111+
- only warn if run as sudo
112+
113+
## [0.0.10] - 2019-03-18
114+
### Added
115+
- solo client improvements
116+
- experimental interface to feed kernel entropy from key:
117+
`sudo ALLOW_ROOT= /path/to/solo key rng feedkernel`
118+
119+
## [0.0.9] - 2019-03-18
120+
### Added
121+
- enforce `solo` command does not run as root
122+
123+
## [0.0.8] - 2019-03-18
124+
### Added
125+
- `solo key probe` interface
126+
### Changed
127+
- fixes to set options bytes to leave DFU mode
128+
129+
## [0.0.7] - 2019-03-08
130+
### Changed
131+
- Exit properly on boot to bootloader failure
132+
- `--alpha` flag for `update`
133+
134+
## [0.0.6] - 2019-02-27
135+
### Changed
136+
- Fix bootloader-version command (@Thor77)
137+
- Reboot to bootloader in `program` if necessary
138+
### Added
139+
- yes flag for `update`
140+
141+
## [0.0.6a3] - 2019-02-20
142+
### Changed
143+
- Typo
144+
145+
## [0.0.6a2] - 2019-02-20
146+
### Added
147+
- Monkey-patch to communicate via UDP with software key
148+
- Flag `--udp` to use it for certain `solo key` commands
149+
150+
## [0.0.6a1] - 2019-02-19
151+
### Added
152+
- Serial number support
153+
154+
## [0.0.5] - 2019-02-18
155+
### Changed
156+
- Initial feedback from https://github.com/solokeys/solo/issues/113
157+
158+
## [0.0.4] - 2019-02-18
159+
### Changed
160+
- Enforce passing exactly one of `--hacker|--secure` in `solo key update`
161+
162+
## [0.0.3] - 2019-02-18
163+
### Changed
164+
- Bugfix in `solo.dfu`
165+
- Minor improvements
166+
167+
## [0.0.2] - 2019-02-18
168+
### Changed
169+
- Fix broken `solo program dfu` command
170+
- Remove `solotool` script installation
171+
- Add Python version classifiers
172+
173+
## [0.0.1] - 2019-02-17
174+
### Added
175+
- Implement `solo key update [--hacker]`
176+
177+
## [0.0.1a8] - 2019-02-17
178+
### Added
179+
- Forgot to add some files in last release
180+
- Add client/dfu find\_all methods
181+
- Add `solo ls` command
182+
183+
## [0.0.1a7] - 2019-02-16
184+
### Added
185+
- More implementation of `solo program aux` (mode changes)
186+
- Implement `solo program bootloader`.
187+
- More comments
188+
189+
## [0.0.1a6] - 2019-02-16
190+
### Changed
191+
- Implements part of `solo program dfu` and `solo program aux`
192+
- Adds Conor's change allowing to pass in raw devices to DFU+SoloClient
193+
194+
## [0.0.1a5] - 2019-02-16
195+
### Changed
196+
- Unwrap genkey from CLI to operations
197+
198+
## [0.0.1a4] - 2019-02-16
199+
### Added
200+
- Everything moved out of solotool, except programming chunk
201+
202+
## [0.0.1a3] - 2019-02-16
203+
### Added
204+
- Start redo of CLI using click
205+
206+
## [0.0.1a2] - 2019-02-15
207+
### Changed
208+
- Bugfixes related to refactor
209+
210+
## [0.0.1a1] - 2019-02-15
211+
### Changed
212+
- Start to split out commands, helpers and client
213+
214+
## [0.0.1a0] - 2019-02-15
215+
### Added
216+
- Initial import of `solotool.py` script from [solo](https://github.com/solokeys/solo)

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ init: update-venv
66
# ensure this passes before commiting
77
check: lint
88
black --check solo/
9-
isort --check-only --recursive solo/
9+
isort --profile black --check-only solo/
1010

1111
# automatic code fixes
1212
fix: black isort
@@ -15,7 +15,7 @@ black:
1515
black solo/
1616

1717
isort:
18-
isort -y --recursive solo/
18+
isort --profile black solo/
1919

2020
lint:
2121
flake8 solo/

dev-requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
black
55
flake8
6-
flit
6+
flit_core==2.3.0
7+
flit==2.3.0
78
ipython
8-
isort
9+
isort>=5.0.0
910

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
[build-system]
23
requires = ["flit"]
34
build-backend = "flit.buildapi"
@@ -11,10 +12,10 @@ home-page = "https://github.com/trustcrypto/onlykey-solo-python"
1112
requires-python = ">=3.6"
1213
description-file = "README.md"
1314
requires = [
14-
"click >= 7.0",
15+
"click >= 7.1",
1516
"cryptography",
1617
"ecdsa",
17-
"fido2 >= 0.8.1",
18+
"fido2 >= 0.9.1",
1819
"intelhex",
1920
"pyserial",
2021
"pyusb",

solo/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
0.0.28
2+

solo/cli/__init__.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from solo.cli.monitor import monitor
1919
from solo.cli.program import program
2020

21-
from . import _patches # noqa (since otherwise "unused")
2221
from ._checks import init_checks
2322

2423
init_checks()
@@ -136,10 +135,20 @@ def ls(all):
136135
print(":: Solos")
137136
for c in solos:
138137
descriptor = c.dev.descriptor
139-
if "serial_number" in descriptor:
140-
print(f"{descriptor['serial_number']}: {descriptor['product_string']}")
138+
139+
if hasattr(descriptor, "product_name"):
140+
product_name = descriptor.product_name
141+
elif c.is_solo_bootloader():
142+
product_name = "Solo Bootloader device"
143+
else:
144+
product_name = "FIDO2 device"
145+
146+
if hasattr(descriptor, "serial_number"):
147+
serial_or_path = descriptor.serial_number
141148
else:
142-
print(f"{descriptor['path']}: {descriptor['product_string']}")
149+
serial_or_path = descriptor.path
150+
151+
print(f"{serial_or_path}: {product_name}")
143152

144153
if all:
145154
print(":: Potential Solos in DFU mode")

0 commit comments

Comments
 (0)