Commit graph

733 commits

Author SHA1 Message Date
Heiko Schaefer
a4dff1ecb8
rustfmt: enable format_code_in_doc_comments 2022-11-03 14:43:28 +01:00
Heiko Schaefer
5e039204d5
remove "use sequoia_openpgp as openpgp;" pattern 2022-11-03 14:43:28 +01:00
Heiko Schaefer
fd07f6b6b9
ci: work around confusing cargo-fmt problem with CARGO_HOME 2022-11-03 14:43:28 +01:00
Heiko Schaefer
27697cb2c5
add rustfmt.toml and set group_imports = "StdExternalCrate" 2022-11-03 14:32:00 +01:00
Heiko Schaefer
87a80a4797
opgpcard: rename "key_status" to "additional_key_status".
This field will only contain data in rare cases (I don't know of a card where it will) when a card has key information for unusual key types (also see OpenPGP card spec 3.4.1 pg.43)
2022-11-03 11:57:20 +01:00
Heiko Schaefer
bfaff6b9bf
opgpcard: handle "key status" information for attestation key. 2022-11-03 11:57:20 +01:00
Heiko Schaefer
80659f71bd
opgpcard: bump version to 0.9.0 2022-10-31 15:50:04 +01:00
Heiko Schaefer
876c22997a
opgpcard: edit README.md
- move text about non-interactive use to its own section
- add a brief introduction to JSON output
- edits to adjust output to changed output format
- minor edits for clarity
2022-10-31 15:50:04 +01:00
Heiko Schaefer
abd2bae179
opgpcard: edits to scripting.md
- use standard example card ident
- slightly generalize manufacturer section
- move copyright information to header (like in other markdown documents)
- minor edits
2022-10-31 15:50:03 +01:00
Heiko Schaefer
7fe693ab98
opgpcard: re-add newlines in text output for 'ssh' 2022-10-31 15:50:03 +01:00
Heiko Schaefer
001bbd4412
opgpcard: tweak 'info' text output; add FIXME to re-work the form of algorithm information output 2022-10-31 15:50:03 +01:00
Heiko Schaefer
ae25e6b608
opgpcard: move creation time up in text output for 'status', and adjust printed field name 2022-10-31 15:50:03 +01:00
Heiko Schaefer
3a9d40454f
opgpcard: in 'status', handle 'pkm' parameter analogously to 'verbose' 2022-10-31 15:50:03 +01:00
Heiko Schaefer
5f715647c9
opgpcard: rename/reorder 'status' fields to reflect common terminology and logical structure of the fields.
Temporarily remove key_statuses and ca_fingerprints from machine-readable output. These fields should be stabilized before adding them to JSON.
2022-10-31 15:50:03 +01:00
Heiko Schaefer
535c9e6e0a
openpgp-card: add algorithm to PublicKeyMaterial Display for EccPub 2022-10-31 12:39:06 +01:00
Heiko Schaefer
fe0a8565e8
openpgp-card-sequoia: bump version to 0.1.0 2022-10-28 19:29:22 +02:00
Heiko
04b875754d Merge branch 'heiko/openpgp-card-sequoia-api' into 'main'
Reorganize openpgp-card-sequoia API

See merge request openpgp-card/openpgp-card!30
2022-10-28 17:28:57 +00:00
Heiko Schaefer
fd441dbd14
adjust to changed openpgp-card-sequoia API 2022-10-28 18:55:42 +02:00
Heiko Schaefer
db682c45db
openpgp-card-sequoia: restructure code, api; add more documentation 2022-10-28 18:55:42 +02:00
Heiko Schaefer
819f213ec4
openpgp-card: bump version to 0.3.3 2022-10-28 16:21:54 +02:00
Heiko
9ab55545f2 Merge branch 'nora/43' into 'main'
opgpcard: Add error handling for PIN file

Closes #43

See merge request openpgp-card/openpgp-card!29
2022-10-28 14:16:14 +00:00
Nora Widdecke
3169855e5c
opgpcard: Add error handling for PIN file
- If a PIN file could not be read, there is no error and the program
    proceeds as if no PIN file argument was given.

  - Add error handling for read errors of the PIN file.

  Fixes #43
2022-10-28 13:58:19 +02:00
Nora Widdecke
538dc16165 Merge branch 'heiko/pin-validity' into 'main'
opgpcard: only the SIG slot has configurable validity mechanism for PIN verification

See merge request openpgp-card/openpgp-card!28
2022-10-28 11:56:46 +00:00
Heiko Schaefer
f98ea9d0aa
opgpcard: only the SIG slot has configurable validity mechanism for PIN verification 2022-10-28 12:46:44 +02:00
Nora Widdecke
19d7aa94bf Merge branch 'heiko/attestation-key-status' into 'main'
opgpcard: Move attestation key metatdata into a separate KeySlotInfo struct

See merge request openpgp-card/openpgp-card!27
2022-10-28 10:29:50 +00:00
Heiko Schaefer
fe885a4b1c
opgpcard: Move attestation key metadata to its own KeySlotInfo 2022-10-28 10:17:45 +02:00
Heiko Schaefer
375c002730
openpgp-card-sequoia: add getters for attestation key metadata 2022-10-28 10:17:45 +02:00
Heiko Schaefer
87c62840d5
openpgp-card: add getters for attestation key metadata 2022-10-28 10:17:45 +02:00
Heiko
6274c87de3 Merge branch 'nora/keygen_test' into 'main'
opgpcard: test key generation and use

See merge request openpgp-card/openpgp-card!26
2022-10-28 08:13:04 +00:00
Nora Widdecke
8c9d792c42
ci: prevent multithreading for subplot tests
- There is only one virtual card, accessing it from multiple programs
    in parallel leads to undefined behavior.
2022-10-28 09:45:27 +02:00
Nora Widdecke
09c554affd
opgpcard: Test key use.
- Add tests for all four combinations of key generation and import,
    and signing and decrypting.
2022-10-28 09:45:27 +02:00
Nora Widdecke
b489c7da4d
opgpcard: Allow sign and decrypt to write to file
- Sometimes, it is more convenient to give the target filename as an
    argument, instead of using pipes.

  - Add an optional argument -o/--output to opgpcard sign and opgpcard
    decrypt.
2022-10-27 22:02:14 +02:00
Nora Widdecke
678cc30455 Merge branch 'heiko/cardholder-name' into 'main'
Cardholder name format handling belongs in openpgp-card-sequoia

See merge request openpgp-card/openpgp-card!25
2022-10-27 18:08:19 +00:00
Heiko Schaefer
92a3f76dd0
Cardholder name format handling belongs in openpgp-card-sequoia 2022-10-27 18:26:18 +02:00
Heiko
d689ceb1dc Merge branch 'nora/texts' into 'main'
Add and improve help texts

See merge request openpgp-card/openpgp-card!19
2022-10-27 16:22:01 +00:00
Nora Widdecke
f0c9fcc842
opgpcard: Add and improve help texts 2022-10-27 17:44:00 +02:00
Nora Widdecke
e656946335
opgpcard: Unify on aut-fp not auth-fp 2022-10-27 17:42:21 +02:00
Nora Widdecke
eebe3f0fc2
opgpcard: Use the name cv25519 2022-10-27 17:42:21 +02:00
Nora Widdecke
a580a9c8a7
opgpcard: Enable dynamic line wrapping 2022-10-27 17:42:21 +02:00
Heiko
2fb4f3961a Merge branch 'nora/mandatory_generate_output' into 'main'
opgpcard: Prevent losing the generated cert.

Closes #49

See merge request openpgp-card/openpgp-card!23
2022-10-27 14:55:32 +00:00
Heiko
538afffcaf Merge branch 'nora/tests' into 'main'
opgpcard: Replace flagfile with environment variable

See merge request openpgp-card/openpgp-card!21
2022-10-27 14:37:07 +00:00
Nora Widdecke
4c5a166d2b
opgpcard: Remove ident line from output.
- The certificate generated by admin generate is written to a file,
    prefixed with a line containing the card identifier. That means the
    file is not immediately usable as a pgp certificate.

  - Remove the identifier line.
2022-10-27 15:48:55 +02:00
Nora Widdecke
dfb7f3275d
opgpcard: Replace flagfile with environment variable
- A flagfile requires manual management with touch and rm, replace it
    with an environment variable that can be set more conveniently.

  - Removing tools/tests/opgpcard.rs is not necessary, the file it links
    to is always generated in build.rs, either with subplot tests or
    without. But it is always there, so cargo test does not fail for
    that reason.
2022-10-27 15:46:42 +02:00
Nora Widdecke
db34132dda
opgpcard: Make docker script more robust 2022-10-27 15:11:45 +02:00
Nora Widdecke
bfe22ec1b8
opgpcard: Make shebang system independent 2022-10-27 15:11:45 +02:00
Nora Widdecke
f0d6d4b1d2
opgpcard: Add rudimentary logging to build.rs 2022-10-27 15:11:45 +02:00
Nora Widdecke
71f6c98ed5
opgpcard: Prevent losing the generated cert.
- opgpcard admin generate by default prints the corresponding
    certificate to stdout, where it's easy for a careless user to lose
    it.

  - Make the --output argument mandatory, so the certificate is always
    stored in a file.
2022-10-27 15:10:28 +02:00
Nora Widdecke
46b5f59d0f Merge branch 'ocs-card-state' into 'main'
Refactor openpgp-card-state to use Card<State> types

See merge request openpgp-card/openpgp-card!20
2022-10-27 12:46:28 +00:00
Heiko Schaefer
2eb31ede6a
card-functionality: use new Card<State> interface 2022-10-27 13:41:24 +02:00
Heiko Schaefer
1104e60b33
examples: use new Card<State> interface 2022-10-27 13:41:24 +02:00