Commit graph

169 commits

Author SHA1 Message Date
Heiko Schaefer
52a145528e
openpgp-card-sequoia: cleanup internal ptf() hack
This fixes the generation of a mismatching Fingerprint on the card and OpenPGP public key when using generate_key(), which may have been cause by inconsistent kek/kdf parameter use for some ECC decryption subkeys.
2023-09-06 01:47:21 +02:00
Heiko Schaefer
041228a4a2
openpgp-card-sequoia: normalize naming of pin verify fns 2023-09-06 01:28:48 +02:00
Heiko Schaefer
b6fef9511a
openpgp-card-sequoia: handle PINs as &str
According to the spec, PINs are supposed to be handled in utf8 format (not binary)
2023-09-06 01:28:48 +02:00
Heiko Schaefer
858d91b1f8
openpgp-card-sequoia: don't do automatic cardholder name encoding, and document this
Normalize fn name: set_name() -> set_cardholder_name().
2023-09-06 01:28:48 +02:00
Heiko Schaefer
f7936a75fd
openpgp-card-sequoia: Login Data is a binary field 2023-09-06 01:16:32 +02:00
Heiko Schaefer
1681d94710
openpgp-card-sequoia: add set_algorithm() (and remove algorithm setting from generate_key)
Also add set_algorithm_attributes().
2023-09-06 01:16:32 +02:00
Heiko Schaefer
2d1bf919d4
openpgp-card: rename Openpgp and OpenpgpTransaction, restructure modules 2023-09-06 01:16:32 +02:00
Heiko Schaefer
566fd6f9a0
card-functionality: Perform the full set of tests in a single Card<Transaction> 2023-09-06 01:16:32 +02:00
Heiko Schaefer
746f2f647d
card-functionality: adjust to backend and openpgp-card-sequoia API changes 2023-09-06 01:16:32 +02:00
Heiko Schaefer
b19d6ca305
card-functionality: also test RSA3k in opcard-rs
New feature since opcard-rs v0.4.0:
https://github.com/Nitrokey/opcard-rs/releases/tag/v0.4.0
2023-08-17 13:44:36 +02:00
Patryk Cisek
61ab492d9c
Added login data
Added ability to read and set login data field.
2023-08-16 18:41:27 -07:00
Heiko Schaefer
d0fc4b5725
ci: Add tests against canokey virtual card
(see https://github.com/canokeys/canokey-core)

Fixes #4.
2023-05-19 16:30:45 +02:00
Wiktor Kwapisiewicz
4510c34cdc Fix clippy lints: directly use variables in format! strings
The source has been reformatted using `cargo +nightly fmt`.
2023-02-02 09:09:47 +01:00
Heiko Schaefer
49b2e95f56
CI: Enable RSA tests for opcard-rs 2022-12-25 00:52:29 +01:00
Heiko Schaefer
27697cb2c5
add rustfmt.toml and set group_imports = "StdExternalCrate" 2022-11-03 14:32:00 +01:00
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