Heiko Schaefer
77c7a90daf
sq_util::get_subkey() now returns an Option.
...
Not finding any subkey is not an error.
2021-10-23 20:01:10 +02:00
Heiko Schaefer
6d24054e1e
Normalize capitalization to "OpenPGP card"
2021-09-22 16:41:53 +02:00
Heiko Schaefer
d5651e96bb
Reorganize key uploading API
2021-09-11 22:58:02 +02:00
Heiko Schaefer
0d249a47fd
sq_util::get_subkey() is now the central helper fn for picking a (sub)key from a Cert.
2021-09-11 16:27:31 +02:00
Heiko Schaefer
77b2ca98b0
Misc cleanup:
...
Simplify verify_foo() calls.
More orderly output.
Remove Scdc for now.
2021-09-11 12:42:33 +02:00
Heiko Schaefer
be95b9de43
Normalize fn names: remove 'get_' prefixes, and adjust to naming in the spec.
2021-09-11 12:42:33 +02:00
Heiko Schaefer
0e2b53feb4
Fix the assumptions about authorization underlying the card::* types:
...
Multiple passwords can be validated on a card at the same time.
Rename verify_* fn to be more easily legible ("user" instead of "pw1", ...)
2021-09-11 12:42:33 +02:00
Heiko Schaefer
1613f23ecc
Minor adjustments to output formatting.
...
Adjust path to example-data.
2021-09-11 12:42:01 +02:00
Heiko Schaefer
93fa9d9650
Make naming consistent.
2021-09-11 12:42:01 +02:00
Heiko Schaefer
936f04663c
Rename list_cards() -> cards().
...
Remove open_yolo() from the openpgp-card-pcsc API (it's easy enough to approximate by using cards())
2021-09-11 12:42:01 +02:00
Heiko Schaefer
55e7a2c794
Re-ordering the -sequoia crate, as a first step towards defining its API.
2021-09-11 12:42:01 +02:00
Heiko Schaefer
8b5894e961
Rename get_app_data() to get_application_related_data() to correspond with naming in spec.
2021-09-02 22:09:46 +02:00
Heiko Schaefer
f8d998b3a6
Implement From<CardClientBox>, Into<CardClientBox> for CardApp and adjust client code.
2021-09-01 22:26:25 +02:00
Heiko Schaefer
935c77f59a
Rename ApplicationRelatedData::get_aid() to get_application_id()
2021-08-28 19:58:34 +02:00
Heiko Schaefer
9b321c5232
Don't fail when the card doesn't support algo information.
2021-08-26 20:57:50 +02:00
Heiko Schaefer
5109ac5445
Rename card_data -> card_do
2021-08-21 19:02:04 +02:00
Heiko Schaefer
44e915d3e0
Refactor: move OpenPGP card data structures (and parsing) into the module card_data
2021-08-21 15:59:31 +02:00
Heiko Schaefer
c872e46e80
Refactor: move accessor fn for "Application Related Data" into the struct ApplicationRelatedData.
2021-08-20 22:19:39 +02:00
Heiko Schaefer
8aae0a357e
Split the Response
type into an internal RawResponse
type which also contains the status bytes, and an external Response
type that can only be generated from a RawResponse with status "ok".
...
This removes the need for external users of openpgp-card to check the status or operations.
That is, openpgp-card now always returns an `Err` if the status of a command is not ok.
2021-08-20 13:25:58 +02:00
Heiko Schaefer
b8e3fc4816
Set version numbers for crates.io releases
2021-08-18 19:57:54 +02:00
Heiko Schaefer
6be4daa690
Switch back to using the PCSC backend in the test code.
2021-08-18 15:02:15 +02:00
Heiko Schaefer
0b0e9c48fc
Refactor:
...
- Move high-level API from openpgp-card to openpgp-card-sequoia
- Move the pcsc backend into the separate crate openpgp-card-pcsc
2021-08-18 14:03:54 +02:00
Heiko Schaefer
833cdbc238
Adjust to new ScdClient API, socket is not needed anymore.
2021-08-03 18:23:47 +02:00
Heiko Schaefer
083db2a8be
Adjust to changed ScdClient API
2021-08-03 15:32:48 +02:00
Heiko Schaefer
97d4880118
Signing
2021-07-18 12:00:00 +02:00
Heiko Schaefer
5af213562b
Add decryption to card-functionality tests.
2021-07-17 02:24:43 +02:00
Heiko Schaefer
4b7b4a2ab6
Use ScdClient::open_scdc_by_serial() in test code.
2021-07-16 17:24:53 +02:00
Heiko Schaefer
01126aabdf
Support scdaemon as an alternative backend for interaction with OpenPGP cards.
2021-07-16 16:30:56 +02:00
Heiko Schaefer
8e3c6c0046
Add an abstraction layer (CardClient) for access to the card, in preparation for scdaemon client mode.
2021-07-09 20:37:52 +02:00
Heiko Schaefer
fd9cd6eabd
Change set* commands to leave out 'Le', because no response data is expected.
...
(The Floss-Card 3.4 rejects set* commands with "expected" response data)
2021-07-04 01:03:09 +02:00
Heiko Schaefer
3bc14e9d19
Implement check_pw1/3(), which calls "7.2.2 VERIFY" with no data ("Lc empty"), to ask the card for verification status.
...
(It seems that the Yubikey 5 doesn't support this type of request, but instead responds "6A 80: Incorrect parameters")
2021-07-04 00:04:35 +02:00
Heiko Schaefer
d1f854f2f0
Implement get_pw_status_bytes()
2021-07-03 21:23:17 +02:00
Heiko Schaefer
01fab2d91c
Use an "ident" to specify a card.
...
The ident is a combination of manufacturer and serial number.
The OpenPGP card spec stipulates:
"Each OpenPGP application on a card from a manufacturer/personaliser has a unique serial number"
2021-07-03 18:17:30 +02:00
Heiko Schaefer
920da0442b
Rename structs that represent different verification states of the OpenPGP card.
2021-07-02 19:47:34 +02:00
Heiko Schaefer
f00865ab75
rustfmt
2021-07-01 23:46:12 +02:00
Heiko Schaefer
88f0598eab
Initial commit
2021-06-30 22:29:23 +02:00