Commit graph

872 commits

Author SHA1 Message Date
RyanSquared
3d407eaa8e
cargo-deny: skip RUSTSEC-2023-0071 2024-01-07 22:06:06 -05:00
RyanSquared
799d077d55
openpgp-card: optimize use of iter/collect to use to_vec 2024-01-07 21:51:21 -05:00
RyanSquared
00491e8de8
openpgp-card: send all bytes of creation time 2024-01-07 21:43:26 -05:00
Heiko Schaefer
318571db4f
ci: pick dependency versions so that rustc 1.63 can build 2023-11-03 15:02:43 +01:00
Heiko Schaefer
cb53e0826c
ci: Install cmake for semver-checks 2023-11-03 09:27:48 +01:00
Heiko Schaefer
3235f1a8a6
Ignore sequoia-openpgp deprecations.
sequoia-openpgp's deprecations in 1.17 effectively force users that enable "-D warnings" to either upgrade to 1.17 (which would force our downstreams to also use that version).

Alternatives are:
- upgrade sequoia-openpgp
- disable "-D warnings"
- ignore the deprecations with #allow.
2023-11-03 09:24:13 +01:00
Heiko Schaefer
20ee493ea8
openpgp-card-sequoia: README adjustment 2023-09-10 14:39:18 +02:00
Heiko Schaefer
46b265637c
ci: run cargo-semver-checks 2023-09-10 14:39:18 +02:00
Heiko Schaefer
e6bb9cccca
openpgp-card-sequoia: rename Card<Open>::into_card -> into_backend 2023-09-06 01:47:21 +02:00
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
01cc2caafc
openpgp-card-sequoia: rustdoc improvements 2023-09-06 01:47:21 +02:00
Heiko Schaefer
290ca2acd0
openpgp-card-sequoia: add set_user_pin_signing_validity() 2023-09-06 01:28:48 +02:00
Heiko Schaefer
468402364a
openpgp-card-sequoia: rename set_user_interaction_flag to set_touch_policy 2023-09-06 01:28:48 +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
f12b052d35
openpgp-card-sequoia: drop security_support_template() in favor of digital_signature_count() 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
21ba1aadbb
openpgp-card-sequoia: rustdoc improvements
(And minor comment notes)
2023-09-06 01:28:47 +02:00
Heiko Schaefer
f7936a75fd
openpgp-card-sequoia: Login Data is a binary field 2023-09-06 01:16:32 +02:00
Heiko Schaefer
1de083e1b8
openpgp-card-sequoia: access ard through getter/setters 2023-09-06 01:16:32 +02:00
Heiko Schaefer
2ef3e1f0a8
openpgp-card-sequoia: rename uif->user_interaction_flag 2023-09-06 01:16:32 +02:00
Heiko Schaefer
736199a8de
openpgp-card-sequoia: move all uif_* getters into uif() 2023-09-06 01:16:32 +02:00
Heiko Schaefer
d55980cef6
openpgp-card-sequoia: add fingerprint, key_generation_time getters with key_type parameter 2023-09-06 01:16:32 +02:00
Heiko Schaefer
8f80020f9c
openpgp-card-sequoia: use immutable fields from openpgp-card::Card 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
87a9f4f216
bump backend versions
card-backend to 0.2.0,
pcsc and scdc to 0.5.0
2023-09-06 01:16:32 +02:00
Heiko Schaefer
31eee9e738
backend: add CardBackend::limit_card_caps
This mechanism allows the pcsc backend to signal to openpgp-card that a reader doesn't support "extended length".
2023-09-06 01:16:32 +02:00
Heiko Schaefer
e476103e6d
In select_data(): fold yk_workaround parameter into the openpgp-card business logic 2023-09-06 01:16:32 +02:00
Heiko Schaefer
536bcf788b
openpgp-card: ExtendedCapabilities, add getters for capabilities 2023-09-06 01:16:32 +02:00
Heiko Schaefer
465847ea79
openpgp-card: ExtendedCapabilities, make v2 command length getters private.
Command length negotiation is handled in this library, this information should never be useful to callers.
2023-09-06 01:16:32 +02:00
Heiko Schaefer
724be38e4f
openpgp-card: in private_use_do accessors, don't panic, but return error for illegal num.
Fix: set_private_use_do() doesn't return data.
2023-09-06 01:16:32 +02:00
Heiko Schaefer
8ee389ca7a
openpgp-card: attestation_key_generation_time() only needs &self 2023-09-06 01:16:32 +02:00
Heiko Schaefer
4d5d9e7ee1
openpgp-card: allow additional status in factory reset
The opcard-rs implementation may return StatusBytes::ExecutionErrorNonVolatileMemoryUnchanged in some circumstances.

Also see https://gitlab.com/openpgp-card/openpgp-card/-/issues/70

Fixes #70
2023-09-06 01:16:32 +02:00
Heiko Schaefer
82662e6d46
openpgp-card: Remove algorithm setting from key generation
Also entirely remove set_algorithm_attributes_simple.
Callers should use AlgoSimple::matching_algorithm_attributes to determine the appropriate AlgorithmAttributes.
2023-09-06 01:16:32 +02:00
Heiko Schaefer
a54b057e00
openpgp-card: Add matching_algorithm_attributes() in AlgoSimple
Gets matching AlgorithmAttributes for the current card.
2023-09-06 01:16:32 +02:00
Heiko Schaefer
0067fe1d48
openpgp-card: don't PUT algorithm_attributes if feature is unsupported
And improve rustdocs.
2023-09-06 01:16:32 +02:00
Heiko Schaefer
b1c4b46b22
openpgp-card: Rework key import functions 2023-09-06 01:16:32 +02:00
Heiko Schaefer
32095298aa
openpgp-card: Minor cleanup 2023-09-06 01:16:32 +02:00
Heiko Schaefer
86ba745ea6
openpgp-card: use cache for immutable card settings 2023-09-06 01:16:32 +02:00
Heiko Schaefer
925d5c6f9c
openpgp-card: Cache immutable card information from ApplicationRelatedData in Card::new 2023-09-06 01:16:32 +02:00
Heiko Schaefer
0e0da24918
openpgp-card: clean up visibilities 2023-09-06 01:16:32 +02:00
Heiko Schaefer
5440fdeb1e
openpgp-card: move commands out of the apdu module 2023-09-06 01:16:32 +02:00
Heiko Schaefer
2b0111b923
openpgp-card: rustdoc 2023-09-06 01:16:32 +02:00
Heiko Schaefer
ff1afee7c5
openpgp-card: rename RsaAttrs->RsaAttributes, EccAttrs->EccAttributes 2023-09-06 01:16:32 +02:00
Heiko Schaefer
423c9d23ee
openpgp-card: add Curve::Unknown variant 2023-09-06 01:16:32 +02:00
Heiko Schaefer
da776bc4cf
openpgp-card: rename AlgorithmInformation::filter_by_keytype -> for_keytype 2023-09-06 01:16:32 +02:00
Heiko Schaefer
f7f7a1dd3c
openpgp-card: rename AlgoInfo->AlgorithmInformation 2023-09-06 01:16:32 +02:00
Heiko Schaefer
32c59a15b1
openpgp-card: move setting of AlgorithmAttributes out of gen_key_with_metadata() 2023-09-06 01:16:32 +02:00
Heiko Schaefer
11ce179c00
openpgp-card: lint fix (replace deprecated chrono call) 2023-09-06 01:16:32 +02:00
Heiko Schaefer
9761e0e664
openpgp-card: internal API cleanup, continued 2023-09-06 01:16:32 +02:00