From bbd32f5f501b7e319a0d2296d1bfef9dec0f9dc4 Mon Sep 17 00:00:00 2001 From: Mitchell Grenier Date: Wed, 16 Apr 2025 17:02:01 -0700 Subject: [PATCH 1/3] Update CTAP2 --- Cargo.toml | 16 ++++++++++++---- benches/certs_per_second.rs | 4 ++-- src/fido/generate/ctap2_hid.rs | 8 ++++---- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 02892bb..d001916 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["ssh", "yubikey", "certs", "certificates"] categories = ["authentication"] [features] -default = ["all"] +default = ["all-gebo"] all = [ "encrypted-keys", @@ -21,6 +21,14 @@ all = [ "fido-support-mozilla", ] +all-gebo = [ + "encrypted-keys", + "rsa-signing", + "x509-support", + "yubikey-support", + "fido-support", +] + all-but-fido = [ "encrypted-keys", "rsa-signing", @@ -86,8 +94,8 @@ authenticator = { version = "0.4.0-alpha.24", default-features = false, features # Dependencies for fido-support -ctap-hid-fido2 = { version = "3", optional = true } -#ctap-hid-fido2 = {git = "https://github.com/gebogebogebo/ctap-hid-fido2", branch="master", optional = true} +#ctap-hid-fido2 = { version = "3", optional = true } +ctap-hid-fido2 = { git = "https://github.com/gebogebogebo/ctap-hid-fido2", branch = "develop", optional = true } #ctap-hid-fido2 = {git = "https://github.com/obelisk/ctap-hid-fido2", branch="device_by_path", optional = true} #ctap-hid-fido2 = {path = "../ctap-hid-fido2", optional = true} @@ -124,7 +132,7 @@ required-features = ["x509-support"] [[example]] name = "new-fido-sshkey" -required-features = ["fido-support-mozilla"] +required-features = ["fido-support"] [[test]] name = "privkey-encrypted" diff --git a/benches/certs_per_second.rs b/benches/certs_per_second.rs index 489c7e5..7efed67 100644 --- a/benches/certs_per_second.rs +++ b/benches/certs_per_second.rs @@ -1,6 +1,6 @@ use criterion::{criterion_group, criterion_main, Criterion}; - -use sshcerts::yubikey::{RetiredSlotId, SlotId, Yubikey}; +use sshcerts::yubikey::piv::Yubikey; +use yubikey::piv::{RetiredSlotId, SlotId}; fn generate_certs(n: u64) -> () { let data = [0; 32]; diff --git a/src/fido/generate/ctap2_hid.rs b/src/fido/generate/ctap2_hid.rs index 4b90d40..b1d53bf 100644 --- a/src/fido/generate/ctap2_hid.rs +++ b/src/fido/generate/ctap2_hid.rs @@ -49,16 +49,16 @@ pub fn generate_new_ssh_key( .map_err(|e| Error::FidoError(FidoError::Unknown(e.to_string())))?; let mut ret = 0x0; - if att.flags_user_present_result { + if att.flags.user_present_result { ret = ret | 0x01; } - if att.flags_user_verified_result { + if att.flags.user_verified_result { ret = ret | 0x04; } - if att.flags_attested_credential_data_included { + if att.flags.attested_credential_data_included { ret = ret | 0x40; } - if att.flags_extension_data_included { + if att.flags.extension_data_included { ret = ret | 0x80; } From d363a66ff72a22de03dba5384044ce100bf48684 Mon Sep 17 00:00:00 2001 From: Mitchell Grenier Date: Fri, 8 Aug 2025 15:04:56 -0700 Subject: [PATCH 2/3] Use master branch --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d001916..f657219 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,7 +95,7 @@ authenticator = { version = "0.4.0-alpha.24", default-features = false, features # Dependencies for fido-support #ctap-hid-fido2 = { version = "3", optional = true } -ctap-hid-fido2 = { git = "https://github.com/gebogebogebo/ctap-hid-fido2", branch = "develop", optional = true } +ctap-hid-fido2 = { git = "https://github.com/gebogebogebo/ctap-hid-fido2", branch = "master", optional = true } #ctap-hid-fido2 = {git = "https://github.com/obelisk/ctap-hid-fido2", branch="device_by_path", optional = true} #ctap-hid-fido2 = {path = "../ctap-hid-fido2", optional = true} From 9576815f3355c513d7abe5230de9078a41ea9308 Mon Sep 17 00:00:00 2001 From: Mitchell Grenier Date: Fri, 8 Aug 2025 15:15:11 -0700 Subject: [PATCH 3/3] Bump version --- Cargo.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f657219..a75622a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sshcerts" -version = "0.14.0" +version = "0.14.1" authors = ["Mitchell Grenier "] edition = "2021" license-file = "LICENSE" @@ -11,22 +11,22 @@ keywords = ["ssh", "yubikey", "certs", "certificates"] categories = ["authentication"] [features] -default = ["all-gebo"] +default = ["all"] all = [ "encrypted-keys", "rsa-signing", "x509-support", "yubikey-support", - "fido-support-mozilla", + "fido-support", ] -all-gebo = [ +all-mozilla = [ "encrypted-keys", "rsa-signing", "x509-support", "yubikey-support", - "fido-support", + "fido-support-mozilla", ] all-but-fido = [