Heiko Schaefer
fd441dbd14
adjust to changed openpgp-card-sequoia API
2022-10-28 18:55:42 +02:00
Heiko Schaefer
2eb31ede6a
card-functionality: use new Card<State> interface
2022-10-27 13:41:24 +02:00
Heiko Schaefer
0d978f8dcb
card-functionality: use virtual 'opcard-rs' card in CI
2022-10-21 18:07:24 +02:00
Heiko Schaefer
13b2b62f07
Simplify: use the changed CardBackend handling and the new openpgp-card-sequoia Card struct
2022-09-28 20:44:34 +02:00
Heiko Schaefer
c96377c9df
OpenPGP owns CardBackend (instead of holding a &mut CardBackend).
...
When OpenPgp holds a &mut CardBackend, clients of this library need to keep track of the CardBackend (which adds unnecessary complexity).
2022-09-28 20:42:27 +02:00
Heiko Schaefer
96e28b1b4f
opgpcard: Add optional user-id parameter for "pubkey" and "admin generate", to bind User IDs to the certificate.
2022-09-04 20:30:33 +02:00
Heiko Schaefer
202b0ef5ce
Uniformly use 'YubiKey' styling.
2022-07-26 09:43:27 +02:00
Heiko Schaefer
430afda40a
Adjust to changes in openpgp-card-sequoia
2022-07-25 18:12:03 +02:00
Heiko Schaefer
a477b81a19
Clippy fixes: don't bind unit values.
2022-07-16 12:13:37 +02:00
Heiko Schaefer
6d52835efa
Adjust paths for move to gitlab group 'openpgp-card'.
2022-06-11 21:46:32 +02:00
Heiko Schaefer
374f9eec89
Add callback Fn for touch confirmation prompt for decryption operations.
2022-06-11 09:55:06 +02:00
Heiko Schaefer
079cc32427
Add callback Fn for touch confirmation prompt for signing operations.
2022-06-11 09:55:05 +02:00
Heiko Schaefer
2c666c6857
Adjust virtual SmartPGP and FluffyPGP identities to align with changes in openpgp-card-images
2022-05-29 14:34:31 +02:00
Heiko Schaefer
c3abf4ba9c
Move virtual card CI test configs to card-functionality/ci/ (where configurations for tests on hardware cards already were).
2022-05-19 18:02:37 +02:00
Heiko Schaefer
5a5ae255b5
Document Dockerfile.hardware-builddeps usage
2022-05-19 18:02:36 +02:00
Heiko Schaefer
13edd290ef
Add FluffyPGP to CI tests
2022-05-13 23:05:04 +02:00
Heiko Schaefer
e6c40be8ad
Adjusted/improved handling of public keys (especially to find the correct KDF parameters for ECC decryption keys):
...
- "Brute force" find the right KDF parameters in the new helper fn public_key_material_and_fp_to_key() [try possible parameters until a matching fingerprint is found, error if none].
- In `opgpcard pubkey`, use public_key_material_and_fp_to_key() to find the right parameters for the ECC decryption subkey (this subcommand now fails when the fingerprint on the card doesn't match the fingerprint of the public key data for that key slot)
- When generating OpenPGP ECC decryption keys from public key material (including to compute fingerprints from the key material), use SHA256/AES128 as default parameters.
2022-04-15 16:17:04 +02:00
Heiko Schaefer
f069fb1e20
Model PINs as &[u8] in openpgp-card-sequoia
2022-03-29 22:40:26 +02:00
Heiko Schaefer
e74446cba8
Add license
2022-03-22 16:49:39 +01:00
Heiko Schaefer
63b47cffdc
Update/remove dependency on env_logger
2022-03-22 11:27:48 +01:00
Heiko Schaefer
421e4d155f
Make OpenPgp "Send + Sync"
2022-02-28 11:06:00 +01:00
Heiko Schaefer
e9235164c8
Rename PIN-related functions for clarity
2022-02-24 21:25:47 +01:00
Heiko Schaefer
088bb88a02
Consistently model pin as &[u8] in openpgp-card
.
...
Fixes #22
2022-02-24 21:25:47 +01:00
Heiko Schaefer
96167f6530
Move OpenPGP card functionality into OpenPgp/OpenPgpTransaction.
...
This separates backend access (implemented in CardBackend and CardTransaction) from OpenPGP card operations.
Fixes #7
2022-02-24 21:25:47 +01:00
Heiko Schaefer
636813279b
Reformatted to conform to vanilla rustfmt.
2022-02-24 21:25:47 +01:00
Neal H. Walfield
64119c4f29
Where possible, avoid unnecessary boxing.
2022-02-18 17:43:29 +01:00
Heiko Schaefer
0c86fcb84a
Implement CardBackend/CardTransaction for scdc backend
2022-02-18 16:23:37 +01:00
Heiko Schaefer
1496da6dd5
Rename pcsc::PcscCard -> pcsc::PcscBackend, pcsc::TxClient -> pcsc::PcscTransaction
2022-02-18 15:58:12 +01:00
Heiko Schaefer
265587252a
lints
2022-02-18 15:06:31 +01:00
Heiko Schaefer
e01c79e857
Tweak ergonomics of openpgp-card-pcsc usage and simplify client code.
2022-02-18 15:06:31 +01:00
Heiko Schaefer
c23f23c619
Introduce the new CardBackend trait.
...
A CardBackend represents a card without an open transaction (a CardTransaction implementation can be acquired from a CardBackend).
2022-02-18 15:06:31 +01:00
Heiko Schaefer
5133051626
Rename CardClient -> CardTransaction.
2022-02-18 15:06:31 +01:00
Heiko Schaefer
dcf73bd86d
More explicit data type Lang
for language.
2022-02-16 10:02:35 +01:00
Heiko Schaefer
889eedbb79
Remove cardholder_certificate from the public CardClient API, for now (until we learn of actual use cases for this part of the spec).
2022-02-15 16:07:05 +01:00
Heiko Schaefer
574d7be765
Use byte-array data types for url, name, lang in openpgp-card.
2022-02-15 15:34:52 +01:00
Heiko Schaefer
80af7000e0
Use newly published pcsc 2.7 (instead of git)
2022-02-15 15:34:52 +01:00
Heiko Schaefer
0e94871189
Implement PcscCard::transaction() to replace the transaction!() macro.
...
(This currently requires unreleased pcsc from git)
2022-02-15 15:34:52 +01:00
Heiko Schaefer
87788e8912
rename get_txc!() -> transaction!()
2022-02-15 10:53:46 +01:00
Heiko Schaefer
bdde317a2d
Simplify optional $reselect parameter in get_txc!()
2022-02-15 10:53:46 +01:00
Heiko Schaefer
8a759f01f5
Try opening cards three times before failing
2022-02-15 10:53:46 +01:00
Heiko Schaefer
7573361836
Make ShareMode an optional parameter when opening cards via pcsc.
2022-02-15 10:53:46 +01:00
Heiko Schaefer
36b9fb2770
get_txc!() now assumes the OpenPGP application should be re-selected, by default
2022-02-15 10:49:55 +01:00
Heiko Schaefer
53f637e0a1
Change transaction-starting macro to consume a PcscCard and produce a TxClient.
...
Rename: start_tx!->get_txc!.
2022-02-14 17:50:42 +01:00
Heiko Schaefer
53c8609f05
Remove unused imports
2022-02-14 17:46:16 +01:00
Heiko Schaefer
30341d6c4b
Rename: PcscClient->PcscCard,PcscTxClient->TxClient
2022-02-14 17:46:16 +01:00
Heiko Schaefer
431da53b28
Don't implement CardClient for PcscClient (users should always use transactions)
2022-02-14 17:46:16 +01:00
Heiko Schaefer
2480745088
Move implementation of low-level OpenPGP functionality from CardApp to CardClient.
2022-02-14 17:46:16 +01:00
Heiko Schaefer
c43b53d210
Add $reselect parameter to start_tx! that specifies if the card should be re-selected if it was reset
2022-02-14 17:43:07 +01:00
Heiko Schaefer
f4eaca229d
Copy card_caps information from PcscClient to PcscTxClient, if any
2022-02-14 17:43:07 +01:00
Heiko Schaefer
b6b2957580
Naming; cleanup; logging for pcsc::initialize_card()
2022-02-14 17:43:07 +01:00