Commit Graph

195 Commits

Author SHA1 Message Date
str4d 70c109aa1d Merge pull request #126 from str4d/integration-tests
Add some integration tests
2023-02-11 18:52:41 +00:00
Jack Grigg 355ce1cfde Add integration tests that require a live YubiKey slot 2023-02-11 18:40:09 +00:00
Jack Grigg 3408998283 Add encryption test with rage 2023-02-11 18:40:09 +00:00
str4d bf437663af Merge pull request #116 from str4d/avoid-resetting-unused-yubikeys
Avoid resetting unused YubiKeys
2023-02-11 04:57:23 +00:00
Jack Grigg 665aedbbba Merge branch 'version-0.3.3' back into main 2023-02-11 04:51:58 +00:00
str4d 307f5396a8 Merge pull request #124 from str4d/release-0.3.3
CI checks / Test on linux (push) Has been cancelled
CI checks / Test on macos (push) Has been cancelled
CI checks / Test on windows (push) Has been cancelled
CI checks / Clippy (1.56.0) (push) Has been cancelled
CI checks / Clippy (nightly) (push) Has been cancelled
CI checks / Code coverage (push) Has been cancelled
CI checks / Intra-doc links (push) Has been cancelled
CI checks / Rustfmt (push) Has been cancelled
Publish release binaries / Publish for macos-arm64 (push) Has been cancelled
Publish release binaries / Publish for macos-x86_64 (push) Has been cancelled
Publish release binaries / Publish for linux (push) Has been cancelled
Publish release binaries / Publish for windows (push) Has been cancelled
Publish release binaries / Debian linux (push) Has been cancelled
Release 0.3.3
v0.3.3
2023-02-11 04:37:09 +00:00
Jack Grigg cd03e7bda3 Release 0.3.3 2023-02-11 04:28:16 +00:00
str4d 54ad666c73 Merge pull request #123 from str4d/120-prevent-default-pin
Prevent changing the default PIN to itself
2023-02-11 03:00:31 +00:00
Jack Grigg d2132b4ac2 Prevent changing the default PIN to itself
Closes str4d/age-plugin-yubikey#120.
2023-02-11 02:47:55 +00:00
str4d 80e8072624 Merge pull request #117 from str4d/more-smartcard-errors
Treat `pcsc::Error::NoSmartcard` as a "YubiKey disconnected" error
2023-02-11 02:18:34 +00:00
Jack Grigg ff3e8e37c9 Treat pcsc::Error::NoSmartcard as a "YubiKey disconnected" error
Some SmartCard readers report this error when no SmartCard is inserted,
so we need to check for it when filtering for connected YubiKeys (along
with `pcsc::Error::RemovedCard` which some _other_ SmartCard readers
report instead).

Closes str4d/age-plugin-yubikey#81.
2023-01-30 00:39:08 +00:00
str4d a5178bb16e Merge pull request #118 from str4d/correctly-handle-short-pins
Enforce correct PIN lengths during YubiKey setup
2023-01-30 00:37:44 +00:00
Jack Grigg b1710e8d69 Enforce correct PIN lengths during YubiKey setup
The behaviour of `age-plugin-yubikey` during setup now matches its
behaviour during plugin usage.
2023-01-29 23:00:46 +00:00
str4d 8483010393 Merge pull request #108 from str4d/dependabot/github_actions/svenstaro/upload-release-action-2.4.0
Bump svenstaro/upload-release-action from 2.3.0 to 2.4.0
2023-01-29 15:38:18 +00:00
Jack Grigg 55bfa5dafb Avoid resetting YubiKeys that don't match the desired serial
If multiple YubiKeys were connected, and the one we needed for plugin
encryption or decryption was not first in the list of readers, any
YubiKeys before it were being reset upon drop. We now explicitly
disconnect without resetting, since we only access these YubiKeys as a
side-effect of finding the one we need.
2023-01-29 14:16:35 +00:00
Jack Grigg 90b61682bd Don't reset tested YubiKeys in key::filter_connected
This method only connects to YubiKeys in order to confirm it can do so
(i.e. as a side-effect). We therefore want to explicitly disconnect
without resetting the YubiKeys, to avoid clearing PIN caches.
2023-01-29 14:16:35 +00:00
dependabot[bot] 97ddfc3bea Bump svenstaro/upload-release-action from 2.3.0 to 2.4.0
Bumps [svenstaro/upload-release-action](https://github.com/svenstaro/upload-release-action) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/svenstaro/upload-release-action/releases)
- [Changelog](https://github.com/svenstaro/upload-release-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/svenstaro/upload-release-action/compare/2.3.0...2.4.0)

---
updated-dependencies:
- dependency-name: svenstaro/upload-release-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 08:13:17 +00:00
str4d f34c534e84 Merge pull request #102 from tekumara/patch-1
docs: add brew install instructions
2023-01-03 02:31:27 +00:00
str4d 681cd06087 Merge pull request #103 from str4d/101-fix-gen-pin-always
Request PIN before certificate generation if PIN policy is "always"
2023-01-03 02:25:21 +00:00
Jack Grigg 45f6580be4 Request PIN before certificate generation if PIN policy is "always"
We also correctly ask for a PIN touch after the key is generated (which
does not need it) but before certificate generation (which does if the
touch policy is not "none").

Closes str4d/age-plugin-yubikey#101.
2023-01-03 02:20:51 +00:00
Oliver Mannion f5c8f7a559 docs: add brew install instructions 2023-01-03 10:10:45 +11:00
str4d e26ed3a163 Merge pull request #100 from str4d/pin-caching
Enable PIN caching
2023-01-02 19:12:11 +00:00
Jack Grigg 04c0418c02 Update README and CHANGELOG for PIN cache changes 2023-01-02 19:06:37 +00:00
Jack Grigg 00ab2c756e Don't re-request a cached PIN for identities with PIN policy "once" 2023-01-02 19:06:37 +00:00
Jack Grigg 9418921dab Disconnect without resetting YubiKeys if it is safe to do so
This enables the PIN caches to be preserved across age-plugin-yubikey
processes, allowing PIN policies of "once" to become meaningful.
2023-01-02 19:06:37 +00:00
str4d 87541510ad Merge pull request #99 from VlkrS/main
Add pcscd recommentation for {Open,Free}BSD
2023-01-01 14:43:41 +00:00
vlkrs 9ac72cd66f Add recommendations for {Open,Free}BSD when pcscd isn't running. 2023-01-01 15:30:40 +01:00
VlkrS 093a35733f Add pcscd instructions for FreeBSD and OpenBSD 2023-01-01 15:16:42 +01:00
str4d 082a4f976c Merge pull request #88 from str4d/msrv-1.60
Bump MSRV to 1.60
2023-01-01 14:12:31 +00:00
Jack Grigg 3e1f3b45f5 sysinfo 0.27 2023-01-01 14:07:23 +00:00
Jack Grigg a6a5ad109e Fix clippy lints 2023-01-01 14:07:23 +00:00
Jack Grigg 25fcd353f3 dialoguer 0.10 2023-01-01 14:07:22 +00:00
Jack Grigg d8ab6e373e base64 0.20 2023-01-01 14:06:35 +00:00
Jack Grigg 0490dd3529 env_logger 0.10 2023-01-01 14:06:35 +00:00
Jack Grigg f45ff653b8 Bump cryptographic dependencies
- age-plugin 0.4
- bech32 0.9
- p256 0.11
- sha2 0.10
- x509-parser 0.14
- yubikey 0.7
2023-01-01 14:06:34 +00:00
Jack Grigg e78871d6f3 cargo update 2023-01-01 14:04:28 +00:00
Jack Grigg ec83a8c9cc Bump MSRV to 1.60.0 2023-01-01 14:04:27 +00:00
str4d fc2081c216 Merge pull request #98 from str4d/release-0.3.2
CI checks / Test on linux (push) Has been cancelled
CI checks / Test on macos (push) Has been cancelled
CI checks / Test on windows (push) Has been cancelled
CI checks / Clippy (1.56.0) (push) Has been cancelled
CI checks / Clippy (nightly) (push) Has been cancelled
CI checks / Code coverage (push) Has been cancelled
CI checks / Intra-doc links (push) Has been cancelled
CI checks / Rustfmt (push) Has been cancelled
Publish release binaries / Publish for macos-arm64 (push) Has been cancelled
Publish release binaries / Publish for macos-x86_64 (push) Has been cancelled
Publish release binaries / Publish for linux (push) Has been cancelled
Publish release binaries / Publish for windows (push) Has been cancelled
Publish release binaries / Debian linux (push) Has been cancelled
Release 0.3.2
v0.3.2
2023-01-01 13:53:55 +00:00
Jack Grigg 367a081eea Release 0.3.2 2023-01-01 13:45:21 +00:00
str4d cfb1e5e3d5 Merge pull request #97 from str4d/more-cleanups
More cleanups
2023-01-01 13:44:15 +00:00
Jack Grigg 1dfadc7e27 Clean up key::filter_connected 2023-01-01 13:29:30 +00:00
Jack Grigg fc66d9f6fd Add helper methods for filtering available keys 2023-01-01 13:27:10 +00:00
Jack Grigg d8eb198e97 Move certificate parsing into Metadata::extract 2023-01-01 13:27:10 +00:00
str4d c8f9df1b45 Merge pull request #95 from str4d/94-yubikey-agent-sighup
Extend "sharing violation" logic to send SIGHUP to `yubikey-agent` processes
2023-01-01 13:24:57 +00:00
Jack Grigg 3597d96332 Correctly hunt agents in plugin mode 2023-01-01 13:18:41 +00:00
Jack Grigg 1913838f8e Hunt for yubikey-agent 2023-01-01 12:52:17 +00:00
Jack Grigg 6e47448560 Generalise code for hunting agents that may be holding YubiKeys 2023-01-01 12:52:17 +00:00
str4d 4d4d8cc183 Merge pull request #96 from str4d/refactors-and-cleanups
Refactors and cleanups
2022-12-31 16:41:21 +00:00
Jack Grigg ac7b04a61d Add keyword argument support to fl! and wlnfl! macros 2022-12-31 14:31:25 +00:00
Jack Grigg 493479344c De-duplicate parsing recipients from SubjectPublicKeyInfo 2022-12-31 12:49:44 +00:00