Commit graph

161 commits

Author SHA1 Message Date
Nora Widdecke
9b7e614772
opgpcard: Extract set_identity command into module 2022-10-26 18:58:30 +02:00
Nora Widdecke
d0ad41c9f5
opgpcard: Extract factory_reset command into module 2022-10-26 18:58:30 +02:00
Nora Widdecke
3615087065
opgpcard: Extract sign command into module 2022-10-26 18:58:30 +02:00
Nora Widdecke
9e5e30cea4
opgpcard: Extract decrypt command into module 2022-10-26 18:58:30 +02:00
Nora Widdecke
3ff4127fff
opgpcard: Extract pubkey command into module 2022-10-26 18:58:30 +02:00
Nora Widdecke
660ba2d3bb
opgpcard: Extract ssh command into module 2022-10-26 18:58:30 +02:00
Nora Widdecke
d05feec605
opgpcard: Extract info command into module 2022-10-26 18:58:30 +02:00
Nora Widdecke
f0ab24b040
opgpcard: Extract status command into module 2022-10-26 18:58:30 +02:00
Nora Widdecke
4e575685a1
opgpcard: Make default output values type safe 2022-10-26 12:02:53 +02:00
Heiko Schaefer
6df7e2d56f
opgpcard: tighten/clarify output 2022-10-26 01:12:51 +02:00
Heiko Schaefer
bb577647c4
opgpcard: clarify/add comment 2022-10-26 01:00:29 +02:00
Heiko Schaefer
4674b95557
opgpcard: properly error out of sign/decrypt, if the relevant key slot is empty 2022-10-25 19:03:53 +02:00
Nora Widdecke
23b4c05c3d
opgpcard: Make algo selection type safe 2022-10-25 14:55:39 +02:00
Nora Widdecke
1834762879
opgpcard: Remove negative logic 2022-10-25 14:53:05 +02:00
Nora Widdecke
e81ebd21a0
opgpcard: Restrict values of id of set-identity 2022-10-25 14:53:05 +02:00
Nora Widdecke
a7731ec467
opgpcard: Add Nora to license headers 2022-10-25 14:53:05 +02:00
Nora Widdecke
e9787dcbd3
opgpcard: Make TouchPolicy type safe 2022-10-25 14:53:05 +02:00
Nora Widdecke
9dd4f3ab56
opgpcard: Make the KeySlots type safe 2022-10-25 14:44:44 +02:00
Heiko Schaefer
708a8b2707
opgpcard: remove dependencies on lower level openpgp-card (use only the openpgp-card-sequoia API) 2022-10-25 12:53:37 +02:00
Heiko Schaefer
fff5b18310
opgpcard: adjust handling of card_service_data 2022-10-25 10:37:37 +02:00
Lars Wirzenius
bfb7449686 add an example for scripting use of opgpcard
Sponsored-by: NLnet Foundation; NGI Assure
2022-10-24 20:30:14 +03:00
Lars Wirzenius
dd02a29497 add integration/acceptance test with Subplot
These need to be run with the virtual smartcard emulation in the
Docker container specified in .gitlab-ci.yml for tests.

The tests are a little simplistic, as it turned out that making
changes to the smart card results in flaky tests. Thus only parts of
opgpcard that don't change the card are tested.

Sponsored-by: NLnet Foundation; NGI Assure
2022-10-24 20:30:14 +03:00
Lars Wirzenius
0b616e7b6e implement output formats, version
This is where we actually implement support for the new, versioned
JSON/YAML output formatting.
2022-10-24 19:33:21 +03:00
Lars Wirzenius
dd6950e5fe add command line options to specify output format, version
In this change, these have no effect, but they will have soon. Very soon.

Sponsored-by: NLnet Foundation; NGI Assure
2022-10-24 19:33:21 +03:00
Lars Wirzenius
eb0ad179f6 output: add module that models output for various subcommands
Each subcommand has its own model, and models for each major version
of the output. This isn't used yet, but soon will be.

Sponsored-by: author
2022-10-24 19:33:21 +03:00
Lars Wirzenius
dd0b74c43b versioned_output.rs: add scaffolding for versioned JSON
JSON and other structured output needs to be versioned so that
consumers can rely on it long term. Add a module for specifying output
format and version, as well as traits for implementing things. This
doesn't do anything on its own, but future changes will build on it.

Sponsored-by: NLnet Foundation; NGI Assure
2022-10-24 19:33:21 +03:00
Lars Wirzenius
326aa23dba tools/Cargo.toml: add dependencies for upcoming changes
These dependencies aren't used yet, but are added in preparation for
upcoming changes.

Sponsored-by: NLnet Foundation; NGI Assure
2022-10-24 19:33:21 +03:00
Heiko Schaefer
35f6240608
Bump versions.
This fixes a mistake with the openpgp-card-pcsc 0.2.2 release: openpgp-card-pcsc 0.2.2 depends on openpgp-card 0.3. However, this results in an (accidental) semver break, because openpgp-card-pcsc exposes parts of the openpgp-card API.
See https://gitlab.com/openpgp-card/openpgp-card/-/issues/41
2022-10-01 15:36:17 +02:00
Heiko Schaefer
dc72a9c6c2
Clarify version requirement 2022-09-28 21:03:03 +02:00
Heiko Schaefer
efc2aefcc9
Bump versions 2022-09-28 20:48:14 +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
4b16a0bf63
Bump version 2022-09-27 22:13:47 +02:00
Heiko Schaefer
9fe1ca31c0
Bump version 2022-09-18 15:30:50 +02:00
Heiko Schaefer
9734ed5dc9
Bump version 2022-09-08 19:30:31 +02:00
Heiko Schaefer
8cadded9f0
opgpcard: rename parameter "user-id" to "userid" to match sq 2022-09-08 19:30:05 +02:00
Heiko Schaefer
69ea7c453b
opgpcard: Document optionally binding User IDs to certificates in 'admin generate' and 'pubkey'. 2022-09-04 20:45:04 +02:00
Heiko Schaefer
9aff50d2d3
Fix lint warnings 2022-09-04 20:36:17 +02:00
Heiko Schaefer
fa524a4942
Bump version 2022-09-04 20:33:42 +02:00
Heiko Schaefer
639c80f6c8
Bump version 2022-09-04 20:31:08 +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
8e6f03a2c5
Fix new clippy lints. 2022-08-30 19:19:25 +02:00
Heiko Schaefer
e5537c04f5
Bump version 2022-08-05 23:01:25 +02:00
Heiko Schaefer
9309658d39
Document password entry for opgpcard key import. 2022-08-05 23:01:25 +02:00
Heiko Schaefer
380592b069
opgpcard: implement import of encrypted keys.
- handle cases where not all keys are encrypted, or keys are encrypted with different passwords.
- check availability of all necessary passwords before starting to write to the card.

(Fixes #33)
2022-08-05 22:43:23 +02:00
Heiko Schaefer
3f833faf3b
Change short option name for showing "public-key-material" in status to '-K' for uniqueness. 2022-07-26 16:16:44 +02:00
Heiko Schaefer
93b0cf93d0
openpgp-card-tools documentation: Use long form option names (except for PIN options). 2022-07-26 16:15:39 +02:00
Heiko Schaefer
4b20107197
openpgp-card-tools documentation edits.
- always show examples for interactive pin-entry first, as the default,
- fix documentation error for 'pin set-admin',
- misc minor edits.
2022-07-26 16:08:05 +02:00
Heiko Schaefer
202b0ef5ce
Uniformly use 'YubiKey' styling. 2022-07-26 09:43:27 +02:00
Heiko Schaefer
8427eadfad
Bump versions 2022-07-25 18:13:36 +02:00