Tony Arcieri (iqlusion)
de142256d0
Bump clippy to use Rust 1.71 ( #513 )
2023-08-15 16:31:13 -06:00
hko-s
485d49a6c8
Make YubiKey::open() more robust ( #504 )
...
On systems with a physical card-reader, the previous implementation falsely
reports "multiple YubiKeys detected!", even if only one YubiKey is connected.
This change attempts to actually open each reader as a YubiKey, and only
reports "multiple YubiKeys" if it can actually open more than one.
Additionally, this change avoids resetting the YubiKeys in case we find more
than one.
2023-08-15 16:20:04 -06:00
Tony Arcieri (iqlusion)
9932d05428
Remove chrono dependency ( #512 )
...
It's no longer used as of #495
2023-08-15 16:18:08 -06:00
Tony Arcieri (iqlusion)
363648bbc5
Cargo.lock: bump dependencies ( #511 )
...
Upgrades the following dependencies:
$ cargo update
Updating crates.io index
Updating aho-corasick v0.7.20 -> v1.0.4
Adding android-tzdata v0.1.1
Adding anstream v0.3.2
Adding anstyle v1.0.1
Adding anstyle-parse v0.2.1
Adding anstyle-query v1.0.0
Adding anstyle-wincon v1.0.2
Updating base64ct v1.5.3 -> v1.6.0
Adding bitflags v2.4.0
Updating block-buffer v0.10.3 -> v0.10.4
Updating bumpalo v3.11.1 -> v3.13.0
Updating cc v1.0.78 -> v1.0.82
Updating chrono v0.4.23 -> v0.4.26
Updating cipher v0.4.3 -> v0.4.4
Updating clap v4.0.32 -> v4.3.21
Adding clap_builder v4.3.21
Updating clap_derive v4.0.21 -> v4.3.12
Updating clap_lex v0.3.0 -> v0.5.0
Removing codespan-reporting v0.11.1
Adding colorchoice v1.0.0
Updating const-oid v0.9.2 -> v0.9.5
Updating core-foundation-sys v0.8.3 -> v0.8.4
Updating cpufeatures v0.2.5 -> v0.2.9
Updating crypto-bigint v0.5.1 -> v0.5.2
Removing cxx v1.0.85
Removing cxx-build v1.0.85
Removing cxxbridge-flags v1.0.85
Removing cxxbridge-macro v1.0.85
Updating der v0.7.6 -> v0.7.8
Updating der_derive v0.7.1 -> v0.7.2
Updating digest v0.10.6 -> v0.10.7
Updating ecdsa v0.16.7 -> v0.16.8
Updating elliptic-curve v0.13.4 -> v0.13.5
Updating errno v0.2.8 -> v0.3.2
Updating generic-array v0.14.6 -> v0.14.7
Updating getrandom v0.2.8 -> v0.2.10
Updating heck v0.4.0 -> v0.4.1
Updating hermit-abi v0.2.6 -> v0.3.2
Updating iana-time-zone v0.1.53 -> v0.1.57
Updating iana-time-zone-haiku v0.1.1 -> v0.1.2
Removing io-lifetimes v1.0.3
Updating is-terminal v0.4.2 -> v0.4.9
Updating js-sys v0.3.60 -> v0.3.64
Updating libc v0.2.139 -> v0.2.147
Updating libm v0.2.6 -> v0.2.7
Removing link-cplusplus v1.0.8
Updating linux-raw-sys v0.1.4 -> v0.4.5
Updating log v0.4.17 -> v0.4.20
Updating nom v7.1.2 -> v7.1.3
Updating num-bigint-dig v0.8.2 -> v0.8.4
Updating num-traits v0.2.15 -> v0.2.16
Updating once_cell v1.17.0 -> v1.18.0
Removing os_str_bytes v6.4.1
Updating p256 v0.13.0 -> v0.13.2
Updating pbkdf2 v0.12.1 -> v0.12.2
Updating pkg-config v0.3.26 -> v0.3.27
Updating primeorder v0.13.0 -> v0.13.2
Removing proc-macro-error v1.0.4
Removing proc-macro-error-attr v1.0.4
Updating proc-macro2 v1.0.56 -> v1.0.66
Updating quote v1.0.26 -> v1.0.32
Updating regex v1.7.0 -> v1.9.3
Adding regex-automata v0.3.6
Updating regex-syntax v0.6.28 -> v0.7.4
Updating rustix v0.36.6 -> v0.38.8
Removing scratch v1.0.3
Updating sec1 v0.7.1 -> v0.7.3
Updating serde v1.0.152 -> v1.0.183
Updating sha2 v0.10.6 -> v0.10.7
Updating smallvec v1.10.0 -> v1.11.0
Updating subtle v2.4.1 -> v2.5.0
Removing syn v1.0.107
Removing syn v2.0.15
Adding syn v2.0.28
Updating termcolor v1.1.3 -> v1.2.0
Updating unicode-ident v1.0.6 -> v1.0.11
Removing unicode-width v0.1.10
Adding utf8parse v0.2.1
Updating uuid v1.2.2 -> v1.4.1
Updating wasm-bindgen v0.2.83 -> v0.2.87
Updating wasm-bindgen-backend v0.2.83 -> v0.2.87
Updating wasm-bindgen-macro v0.2.83 -> v0.2.87
Updating wasm-bindgen-macro-support v0.2.83 -> v0.2.87
Updating wasm-bindgen-shared v0.2.83 -> v0.2.87
Adding windows v0.48.0
Updating windows-sys v0.42.0 -> v0.48.0
Adding windows-targets v0.48.2
Updating windows_aarch64_gnullvm v0.42.0 -> v0.48.2
Updating windows_aarch64_msvc v0.42.0 -> v0.48.2
Updating windows_i686_gnu v0.42.0 -> v0.48.2
Updating windows_i686_msvc v0.42.0 -> v0.48.2
Updating windows_x86_64_gnu v0.42.0 -> v0.48.2
Updating windows_x86_64_gnullvm v0.42.0 -> v0.48.2
Updating windows_x86_64_msvc v0.42.0 -> v0.48.2
Updating x509-cert v0.2.3 -> v0.2.4
2023-08-14 19:07:13 -06:00
Arthur Gautier
6a1e1603ef
Use x509-cert certificate builder ( #495 )
...
Co-authored-by: Carl Wallace <carl@redhoundsoftware.com >
2023-08-14 18:31:39 -06:00
Arthur Gautier
8cf18d2986
Bump rsa to 0.9.0 ( #502 )
2023-05-03 06:22:45 -06:00
dependabot[bot]
07281440c0
Bump rsa from 0.9.0-pre.1 to 0.9.0-pre.2 ( #500 )
...
Bumps [rsa](https://github.com/RustCrypto/RSA ) from 0.9.0-pre.1 to 0.9.0-pre.2.
- [Release notes](https://github.com/RustCrypto/RSA/releases )
- [Changelog](https://github.com/RustCrypto/RSA/blob/master/CHANGELOG.md )
- [Commits](https://github.com/RustCrypto/RSA/compare/v0.9.0-pre.1...v0.9.0-pre.2 )
---
updated-dependencies:
- dependency-name: rsa
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-27 08:54:23 -06:00
dependabot[bot]
cd76a55318
Bump rsa from 0.9.0-pre.0 to 0.9.0-pre.1 ( #497 )
...
Bumps [rsa](https://github.com/RustCrypto/RSA ) from 0.9.0-pre.0 to 0.9.0-pre.1.
- [Release notes](https://github.com/RustCrypto/RSA/releases )
- [Changelog](https://github.com/RustCrypto/RSA/blob/master/CHANGELOG.md )
- [Commits](https://github.com/RustCrypto/RSA/compare/v0.9.0-pre.0...v0.9.0-pre.1 )
---
updated-dependencies:
- dependency-name: rsa
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 10:10:55 -06:00
dependabot[bot]
23bbf1b783
Bump zeroize from 1.5.7 to 1.6.0 ( #496 )
...
Bumps [zeroize](https://github.com/RustCrypto/utils ) from 1.5.7 to 1.6.0.
- [Release notes](https://github.com/RustCrypto/utils/releases )
- [Commits](https://github.com/RustCrypto/utils/compare/zeroize-v1.5.7...zeroize-v1.6.0 )
---
updated-dependencies:
- dependency-name: zeroize
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 11:33:52 -06:00
Tony Arcieri (iqlusion)
cafb0b2c18
v0.8.0-pre.0 ( #491 )
yubikey/v0.8.0-pre.0
2023-03-14 17:17:07 -06:00
Tony Arcieri (iqlusion)
0c7441a81e
Bump asymmetric crypto dependencies; MSRV 1.65 ( #490 )
...
Bumps the following dependencies to the latest versions:
- `elliptic-curve` v0.13
- `k256` v0.13
- `p256` v0.13
- `p384` v0.13
- `pbkdf2` v0.12
- `rsa` v0.9.0-pre.0
- `signature` v2
2023-03-14 11:53:00 -06:00
str4d
a50addc15b
Fix StatusWords::code output for StatusWords::VerifyFailError ( #479 )
...
* Fix `StatusWords::code` output for `StatusWords::VerifyFailError`
Closes iqlusioninc/yubikey.rs#473 .
* Refactor `Transaction::transfer_data` to match on `StatusWords`
This makes the code more reliable, such that it would have avoided
the bug in iqlusioninc/yubikey.rs#473 .
2023-02-12 12:02:22 -07:00
str4d
0809f300b7
Return errors from YubiKey::open_by_serial that indicate a key may exist ( #477 )
...
* Return errors from `YubiKey::open_by_serial` that indicate a key may exist
The only such error at the moment is `pcsc::Error::SharingViolation`, which
indicates a transient failure to access a specific reader that could have
been the one we needed (and so a future retry might succeed).
Closes iqlusioninc/yubikey.rs#458 .
* Avoid resetting unused devices in YubiKey::open_by_serial
We only connect to readers so that we can determine their serial. We
now try to ensure that the order in which we connect to them doesn't
have an effect on their state after we are done.
2023-02-12 10:22:05 -07:00
str4d
d55079f9a6
Enable library users to detect if a smart card doesn't support PIV ( #476 )
...
* Enable library users to detect if a smart card doesn't support PIV
Closes iqlusioninc/yubikey.rs#456 .
* Avoid resetting the card if we fail to select PIV or fetch version/serial
2023-02-12 10:20:34 -07:00
str4d
10241230b3
Raise minimum pcsc version to remove workaround ( #478 )
...
In iqlusioninc/yubikey.rs#88 we added a workaround for what turned out
to be a bug in `pcsc`, where an error was returned if no readers were
available, instead of returning an empty iterator. `pcsc 2.3.1` was
published in 2019, so we can safely rely on it.
2023-02-12 10:18:55 -07:00
dependabot[bot]
1e02f135f0
Bump env_logger from 0.9.3 to 0.10.0 ( #452 )
...
Bumps [env_logger](https://github.com/rust-cli/env_logger ) from 0.9.3 to 0.10.0.
- [Release notes](https://github.com/rust-cli/env_logger/releases )
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.9.3...v0.10.0 )
---
updated-dependencies:
- dependency-name: env_logger
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-08 15:24:30 -07:00
Tony Arcieri (iqlusion)
0c2633ab31
transaction: comment cleanup in get_serial ( #467 )
...
Moves comments about each YubiKey version number above the arms of the
`match` expression
2023-01-07 13:35:52 -08:00
Tony Arcieri (iqlusion)
f49c617a9d
Improve parsing of serial numbers ( #466 )
...
Checks the length of the data returned when querying the serial number,
returning an error if it's longer than 4 bytes, and left-padding with
zeroes if it's too short.
This fixes some potential panics due to incorrect slice lengths as were
experienced in #465
2023-01-07 08:35:37 -08:00
Tony Arcieri (iqlusion)
1d33ea1747
Cargo.lock: bump dependencies ( #463 )
2023-01-02 10:22:07 -08:00
str4d
18eb4bf4f4
Add YubiKey::disconnect ( #462 )
...
This exposes `pcsc::Card::disconnect` to allow alternate disposition
methods.
2023-01-02 10:15:31 -08:00
str4d
10941bfb5b
Add partial Debug impls for Context and YubiKey ( #457 )
...
This enables `yubikey::Result<T>` to be debug-formatted, for example
when wrapping the output of an API method in `dbg!()`.
2023-01-01 11:16:10 -07:00
Tony Arcieri (iqlusion)
002491193e
Cargo.lock: bump dependencies + audit config ( #451 )
...
This should get the security audit passing again
2022-11-28 10:19:39 -08:00
Tony Arcieri (iqlusion)
2e5139b237
yubikey-cli v0.7.0 ( #446 )
yubikey-cli/v0.7.0
2022-11-14 17:17:02 -08:00
Tony Arcieri (iqlusion)
d880faaefa
yubikey v0.7.0 ( #444 )
yubikey/v0.7.0
2022-11-14 15:53:00 -08:00
Tony Arcieri (iqlusion)
cc00a10c2f
img: add logo-sq.png ( #445 )
...
Square logo for use with rustdoc
2022-11-14 15:15:19 -08:00
Tony Arcieri (iqlusion)
0a2e798894
Switch from subtle-encoding to base16ct ( #443 )
2022-11-14 14:26:07 -08:00
Tony Arcieri (iqlusion)
5c4259023f
Switch from lazy_static to once_cell ( #442 )
...
The latter will hopefully eventually be upstreamed into `std`.
2022-11-14 12:52:27 -08:00
Tony Arcieri (iqlusion)
57bb088c7d
yubikey-cli: bump x509-parser to v0.14 ( #441 )
2022-11-14 12:30:55 -08:00
Tony Arcieri (iqlusion)
ccf19a3668
Bump rsa to v0.7.1 ( #440 )
2022-11-14 11:08:05 -08:00
dependabot[bot]
db13fce53b
Bump clap from 3.2.23 to 4.0.23 ( #438 )
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.23 to 4.0.23.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.23...v4.0.23 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 10:44:39 -08:00
Ferdinand Linnenberg
0071566097
feat: fixed incorrect issuer for certificates & added x509 prints ( #437 )
2022-11-14 10:42:07 -08:00
Tony Arcieri (iqlusion)
d8653bc6f0
Use chrono v0.4.23 or newer ( #436 )
...
Addresses RUSTSEC-2020-0159
2022-11-12 15:42:34 -08:00
Tony Arcieri (iqlusion)
603b102932
Followups from #371 ( #435 )
...
Implements the changes I suggested in that PR, which are related to
naming conventions and documentation.
2022-11-12 15:41:58 -08:00
Tony Arcieri (iqlusion)
7470b1613a
Cargo.lock: bump dependencies ( #434 )
2022-11-12 13:27:08 -08:00
Tony Arcieri (iqlusion)
4310cc0f9a
Fix build and clippy warnings ( #433 )
2022-11-12 13:15:42 -08:00
Arthur Gautier
87ed7b2338
Adds support for metadata command ( #371 )
...
On firmware 5.4.3, yubikey introduced a metadata command. This returns
the policy attached to as slot as well as the public key of the pair in
the slot.
https://docs.yubico.com/yesdk/users-manual/application-piv/apdu/metadata.html
2022-11-12 11:12:10 -08:00
Shella Stephens
7866d8d53e
MSRV 1.60.0 ( #423 )
2022-11-07 08:58:45 -07:00
Shella Stephens
744238fd77
Cargo.lock: update dependencies & fix audit
2022-11-07 07:56:25 -07:00
william light
bbb186f95e
Display inner PC/SC errors ( #420 )
2022-10-31 15:00:21 -07:00
dependabot[bot]
c89cc5acd0
Bump sha2 from 0.10.2 to 0.10.5 ( #407 )
...
Bumps [sha2](https://github.com/RustCrypto/hashes ) from 0.10.2 to 0.10.5.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.10.2...sha2-v0.10.5 )
---
updated-dependencies:
- dependency-name: sha2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 14:29:21 -07:00
dependabot[bot]
2294c1cc3a
Bump chrono from 0.4.21 to 0.4.22 ( #405 )
...
Bumps [chrono](https://github.com/chronotope/chrono ) from 0.4.21 to 0.4.22.
- [Release notes](https://github.com/chronotope/chrono/releases )
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md )
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.21...v0.4.22 )
---
updated-dependencies:
- dependency-name: chrono
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 14:29:08 -07:00
dependabot[bot]
65e201db0f
Bump uuid from 1.1.2 to 1.2.1 ( #415 )
...
Bumps [uuid](https://github.com/uuid-rs/uuid ) from 1.1.2 to 1.2.1.
- [Release notes](https://github.com/uuid-rs/uuid/releases )
- [Commits](https://github.com/uuid-rs/uuid/compare/1.1.2...1.2.1 )
---
updated-dependencies:
- dependency-name: uuid
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 14:28:56 -07:00
Tony Arcieri (iqlusion)
b571f81007
yubikey-cli v0.6.0 ( #404 )
yubikey-cli/v0.6.0
2022-08-10 17:23:41 -07:00
Tony Arcieri (iqlusion)
0a36a37ae3
yubikey v0.6.0 ( #403 )
yubikey/v0.6.0
2022-08-10 16:41:26 -07:00
Tony Arcieri (iqlusion)
3463d109b2
Bump der-parser to v8; x509-parser to v0.14 ( #402 )
2022-08-10 15:19:21 -07:00
dependabot[bot]
014b7ee6fd
Bump p384 from 0.10.0 to 0.11.2 ( #401 )
...
Bumps [p384](https://github.com/RustCrypto/elliptic-curves ) from 0.10.0 to 0.11.2.
- [Release notes](https://github.com/RustCrypto/elliptic-curves/releases )
- [Commits](https://github.com/RustCrypto/elliptic-curves/compare/p384/v0.10.0...p384/v0.11.2 )
---
updated-dependencies:
- dependency-name: p384
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-10 14:57:39 -07:00
vdods
498de4c10d
Adding some common traits for certain enum types to support maps. ( #372 )
2022-08-10 14:34:58 -07:00
Tony Arcieri (iqlusion)
98b038c873
Cargo.lock: bump dependencies ( #400 )
2022-08-10 14:26:33 -07:00
Tony Arcieri (iqlusion)
fab9d25b0a
cli: migrate from gumdrop to clap v3 ( #379 )
...
`gumdrop` was originally chosen for its minimalist set of dependencies,
but `clap` v3 has a slimmed down set of dependencies and better UX.
2022-05-24 21:45:26 -06:00
dependabot[bot]
bb80551324
Bump uuid from 0.8.2 to 1.0.0 ( #376 )
...
Bumps [uuid](https://github.com/uuid-rs/uuid ) from 0.8.2 to 1.0.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases )
- [Commits](https://github.com/uuid-rs/uuid/compare/0.8.2...1.0.0 )
---
updated-dependencies:
- dependency-name: uuid
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-23 20:18:58 -07:00