Tony Arcieri (iqlusion)
8e52d75992
Rename Ccc to CccId ( #287 )
2021-07-12 19:28:46 -07:00
Tony Arcieri (iqlusion)
42ae5fb974
Rename SettingValue to Setting. ( #286 )
...
Breaking change, but the crate is fresh and there's time to yank and
republish.
2021-07-12 17:36:42 -07:00
Tony Arcieri (iqlusion)
224d346f09
yubikey-cli v0.4.0 ( #284 )
yubikey-cli/v0.4.0
2021-07-12 14:33:51 -07:00
Tony Arcieri
01e5bba33f
README.md: remove gitter badge
2021-07-12 14:10:11 -07:00
Tony Arcieri
48f42780df
README.md: remove maintenance badge
2021-07-12 14:07:08 -07:00
Tony Arcieri (iqlusion)
92f770805f
yubikey v0.4.0 ( #283 )
yubikey/v0.4.0
2021-07-12 14:02:59 -07:00
Tony Arcieri (iqlusion)
563f6f9ccc
Extract consts module ( #282 )
...
Extracts miscellaneous constants that were floating around in the
toplevel into their own module.
2021-07-12 12:54:54 -07:00
Tony Arcieri (iqlusion)
5f418bbd1d
Doc improvements and minor cleanups ( #281 )
2021-07-12 11:57:42 -07:00
Tony Arcieri (iqlusion)
47776ebf0b
Fix parsing local DoS ( #279 )
...
Closes #152
Adds additional checks when parsing TLV records to ensure panic-free
operation.
2021-07-12 11:19:26 -07:00
Tony Arcieri (iqlusion)
227518dd1b
Rename readers module to reader; Readers => Context ( #278 )
...
Renames the `readers` module to be singular: `reader`.
Renames the former `readers::Readers` struct to `reader::Context`.
2021-07-12 11:01:12 -07:00
Tony Arcieri (iqlusion)
e6cea2eca6
Rename key module to piv ( #277 )
...
Now that the crate is named `yubikey` rather than `yubikey-piv`, it
makes more sense to call this module out as PIV-related functionality.
2021-07-12 10:42:55 -07:00
Tony Arcieri (iqlusion)
e249e91297
Replace getrandom with rand_core ( #276 )
...
`rand_core::OsRng` provides a facade over `getrandom` which simplifies
error handling.
2021-07-12 09:58:58 -07:00
Tony Arcieri (iqlusion)
1018127843
Fix generate_self_signed_ec_cert integration test ( #275 )
...
Unfortunately these tests can't be run in CI as they require a YubiKey
to test against.
The YubiKey generates an ASN.1 DER-encoded ECDSA signature, but the test
was using a fixed-width signature.
The test now passes live against a YubiKey.
2021-07-12 09:05:40 -07:00
Tony Arcieri (iqlusion)
1765e11bc0
Flatten API ( #274 )
...
Re-exports types from the toplevel instead of placing them in individual
modules (often which only contain one type).
This makes the API easier for users to navigate, while still retaining
the same module structure internally.
Additionally, this commit uses the `uuid` crate for modeling UUIDs.
2021-07-12 08:40:31 -07:00
Tony Arcieri (iqlusion)
1228d16439
Rename settings::BoolValue => ConfigValue; refactor/cleanup ( #272 )
...
Renames the type used for storing a configuration setting.
Also changes the internal functions to use `Option<ConfigValue>` as the
return value, rather than comparing to a default value, which makes them
slightly more idiomatic.
2021-07-11 14:53:54 -07:00
Tony Arcieri (iqlusion)
de51b0cc46
Add Result alias ( #271 )
...
Adds a `yubikey::Result` alias with `yubikey::Error` as the error type.
Since we only have one `Error` type, this simplifies the return types
where a `Result` is returned.
2021-07-11 09:44:08 -07:00
Tony Arcieri (iqlusion)
1051eaf26d
Rename Ccc::cccid => Ccc::card_id ( #270 )
...
Better reflects the return type
2021-07-11 09:00:58 -07:00
Tony Arcieri (iqlusion)
a1d9c7afc5
Fix clippy::upper_case_acronyms nits; small cleanups ( #269 )
...
Renames the following to match Rust idioms:
- `APDU` => `Apdu`
- `CCC` => `Ccc`
- `CHUID` => `ChuId`
Also removes `Copy` from `mscmap::Container`, which fixes a clippy lint
about its usage of `to_bytes`.
2021-07-11 08:51:25 -07:00
Tony Arcieri (iqlusion)
2c06626c25
Bump elliptic-curve to v0.10; MSRV 1.51+ ( #268 )
...
Also updates the following:
- `p256` v0.9
- `p384` v0.8
2021-07-11 08:14:14 -07:00
Tony Arcieri (iqlusion)
a2a912fc3c
Rename to yubikey.rs ( #267 )
...
We now have publishing rights to the `yubikey` crate.
This commit renames the project to yubikey.rs
Co-authored-by: Tony Arcieri <bascule@gmail.com >
2021-07-10 17:02:59 -07:00
dependabot[bot]
c9e2edc41f
Bump sha-1 from 0.9.5 to 0.9.6 ( #256 )
...
Bumps [sha-1](https://github.com/RustCrypto/hashes ) from 0.9.5 to 0.9.6.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha-1-v0.9.5...sha-1-v0.9.6 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 11:35:31 -07:00
dependabot[bot]
20bf9b0679
Bump sha2 from 0.9.4 to 0.9.5 ( #257 )
...
Bumps [sha2](https://github.com/RustCrypto/hashes ) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.9.4...sha2-v0.9.5 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 11:17:23 -07:00
dependabot[bot]
0d4d4f7f06
Bump p256 from 0.8.0 to 0.8.1 ( #255 )
...
Bumps [p256](https://github.com/RustCrypto/elliptic-curves ) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/RustCrypto/elliptic-curves/releases )
- [Commits](https://github.com/RustCrypto/elliptic-curves/compare/p256/v0.8.0...p256/v0.8.1 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 14:17:17 -07:00
Shella Stephens
d31872964d
Cargo.lock: bump sha-1 & sha2 ( #254 )
2021-05-10 09:05:28 -07:00
Tony Arcieri (iqlusion)
865353f4da
RustCrypto dependency updates; MSRV 1.47+ ( #251 )
...
Updates the following dependencies:
- `des` v0.7
- `elliptic-curve` v0.9
- `hmac` v0.11
- `pbkdf2` v0.8
- `p256` v0.8
- `p384` v0.7
2021-04-30 07:09:24 -07:00
Shella Stephens
1ad17bb025
.github/workflows/ci.yml: fix override: true ( #250 )
...
* .github/workflows/ci.yml: fix override: true
* cargo update
2021-04-27 14:36:20 -07:00
Shella Stephens
d33e80faea
Update rsa to v0.4.0 & fix cargo audit ( #246 )
...
* Bump rsa to v0.4.0
2021-03-29 09:12:33 -07:00
Tony Arcieri (iqlusion)
e61682be43
yubikey-cli v0.3.0 ( #241 )
yubikey-cli/v0.3.0
2021-03-22 10:23:15 -07:00
Tony Arcieri (iqlusion)
43dfc06875
yubikey-piv v0.3.0 ( #240 )
yubikey-piv/v0.3.0
2021-03-22 09:45:19 -07:00
Tony Arcieri (iqlusion)
e230390e7e
Cargo.lock: bump dependencies ( #238 )
2021-03-22 09:27:28 -07:00
Tony Arcieri (iqlusion)
ef3df46ed2
Cargo.lock: bump deps ( #227 )
2021-02-03 06:13:01 -08:00
str4d
18e3636161
Replace MgmKey::set with MgmKey::{set_default, set_manual} ( #224 )
...
* Add MgmKey::set_default method
This wipes any metadata related to derived and PIN-protected management
keys, returning the management key to its default state.
* Transaction::set_mgm_key: Take touch requirement as bool
The Option<u8> was inherited from the original C code's usage of an
unsigned char. We don't need that flexibility, because only two cases
are supported.
* Replace MgmKey::set with MgmKey::set_manual
MgmKey::set_default is now implemented as a wrapper around
MgmKey::set_manual, as they both require clearing metadata related to
derived and PIN-protected management keys.
2021-02-01 09:27:04 -08:00
str4d
9d1da84233
Create typed structs for PIN-protected and admin metadata ( #223 )
...
MgmKey::set_protected and YubiKey::set_pin_last_changed both contained
bugs resulting from the conversion of C pointer logic (incorrect buffer
management). The new Metadata struct holds its own buffer, avoiding the
problem.
Also adds a protected management key integration test.
2021-01-31 09:54:13 -08:00
Tony Arcieri (iqlusion)
37088bba56
yubikey-cli v0.2.0 ( #222 )
yubikey-cli/v0.2.0
2021-01-30 12:23:09 -08:00
Tony Arcieri (iqlusion)
3580c45f71
yubikey-piv v0.2.0 ( #220 )
yubikey-piv/v0.2.0
2021-01-30 07:47:39 -08:00
Tony Arcieri (iqlusion)
79c289ac00
Bump pbkdf2 dependency to v0.7 ( #219 )
2021-01-30 07:34:54 -08:00
Tony Arcieri (iqlusion)
cbca858488
Cargo.lock: bump deps ( #218 )
2021-01-30 07:23:26 -08:00
Tony Arcieri (iqlusion)
8b896ab4de
Rename default git branch from develop to main ( #217 )
2021-01-30 07:11:18 -08:00
str4d
24b035008c
Improve self-signed certificates ( #207 )
...
Adds support for:
- A hierarchical SubjectName field.
- Certificate extensions.
2021-01-11 07:49:15 -08:00
str4d
90bc878b21
Dependency updates and MSRV 1.46 ( #208 )
...
- cargo update
- cli: Bump x509-parser to 0.9
- Bump elliptic-curve to 0.8. Also requires bumping p256 and p384.
- Bump MSRV to 1.46.0. Required to match the MSRV of elliptic-curve.
2021-01-10 07:14:02 -08:00
Shella Stephens
08185c5ec9
Bump der-parser, nom, x509-parser ( #194 )
...
* Bump der-parser from 4.1.0 to 5.0.0
Bumps [der-parser](https://github.com/rusticata/der-parser ) from 4.1.0 to 5.0.0.
- [Release notes](https://github.com/rusticata/der-parser/releases )
- [Changelog](https://github.com/rusticata/der-parser/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rusticata/der-parser/compare/der-parser-4.1.0...der-parser-5.0.0 )
Signed-off-by: dependabot[bot] <support@github.com >
* Bump der-parser, nom, x509-parser
* clippy
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-07 07:20:58 -08:00
dependabot[bot]
7da2c7ba6a
Bump termcolor from 1.1.0 to 1.1.2 ( #191 )
...
Bumps [termcolor](https://github.com/BurntSushi/termcolor ) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/BurntSushi/termcolor/releases )
- [Commits](https://github.com/BurntSushi/termcolor/compare/1.1.0...1.1.2 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-30 10:52:35 -08:00
dependabot[bot]
fecd786262
Bump ring from 0.16.15 to 0.16.18 ( #192 )
...
Bumps [ring](https://github.com/briansmith/ring ) from 0.16.15 to 0.16.18.
- [Release notes](https://github.com/briansmith/ring/releases )
- [Commits](https://github.com/briansmith/ring/commits )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-30 09:09:16 -08:00
dependabot[bot]
1a6d1d0a71
Bump num-integer from 0.1.43 to 0.1.44 ( #185 )
...
Bumps [num-integer](https://github.com/rust-num/num-integer ) from 0.1.43 to 0.1.44.
- [Release notes](https://github.com/rust-num/num-integer/releases )
- [Changelog](https://github.com/rust-num/num-integer/blob/master/RELEASES.md )
- [Commits](https://github.com/rust-num/num-integer/compare/num-integer-0.1.43...num-integer-0.1.44 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-09 06:10:32 -08:00
dependabot[bot]
f43539088b
Bump num-traits from 0.2.12 to 0.2.14 ( #186 )
...
Bumps [num-traits](https://github.com/rust-num/num-traits ) from 0.2.12 to 0.2.14.
- [Release notes](https://github.com/rust-num/num-traits/releases )
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md )
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.12...num-traits-0.2.14 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-09 06:02:17 -08:00
dependabot[bot]
72f63131ac
Bump sha-1 from 0.9.1 to 0.9.2 ( #187 )
...
Bumps [sha-1](https://github.com/RustCrypto/hashes ) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/md5-v0.9.1...streebog-v0.9.2 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-09 05:34:54 -08:00
dependabot[bot]
b59856d09e
Bump sha2 from 0.9.1 to 0.9.2 ( #188 )
...
Bumps [sha2](https://github.com/RustCrypto/hashes ) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.9.1...streebog-v0.9.2 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-09 05:27:54 -08:00
Tony Arcieri (iqlusion)
7628ebf605
yubikey-cli v0.1.0 ( #183 )
yubikey-cli/v0.1.0
2020-10-19 09:28:45 -07:00
Tony Arcieri (iqlusion)
0688dbf30d
cli: bump sha2 to v0.9 ( #182 )
2020-10-19 08:56:26 -07:00
Tony Arcieri (iqlusion)
7e3d0bc838
cli: bump x509-parser to v0.8 ( #181 )
2020-10-19 08:35:49 -07:00