From 47bb956040db02f06046d847fba8d63f7ef13fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20=C3=85berg?= Date: Thu, 10 Jul 2025 13:28:55 +0200 Subject: [PATCH] Added hybrid transport format --- .../src/com_registration.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/desktop/desktop_native/windows_plugin_authenticator/src/com_registration.rs b/apps/desktop/desktop_native/windows_plugin_authenticator/src/com_registration.rs index a26ad1034cb..2b0ab414aac 100644 --- a/apps/desktop/desktop_native/windows_plugin_authenticator/src/com_registration.rs +++ b/apps/desktop/desktop_native/windows_plugin_authenticator/src/com_registration.rs @@ -10,7 +10,7 @@ use crate::webauthn::*; use ciborium::value::Value; use hex; -const AUTHENTICATOR_NAME: &str = "Bitwarden Desktop Authenticator"; +const AUTHENTICATOR_NAME: &str = "Bitwarden Desktop"; const CLSID: &str = "0f7dc5d9-69ce-4652-8572-6877fd695062"; const RPID: &str = "bitwarden.com"; const AAGUID: &str = "d548826e-79b4-db40-a3d8-11116f7e8349"; @@ -85,13 +85,19 @@ fn generate_cbor_authenticator_info() -> Result, String> { // 9: transports - Array of supported transports authenticator_info.push(( Value::Integer(9.into()), - Value::Array(vec![Value::Text("internal".to_string())]), + Value::Array(vec![ + Value::Text("internal".to_string()), + Value::Text("hybrid".to_string()), + ]), )); // 10: algorithms - Array of supported algorithms let algorithm = vec![ (Value::Text("alg".to_string()), Value::Integer((-7).into())), // ES256 - (Value::Text("type".to_string()), Value::Text("public-key".to_string())), + ( + Value::Text("type".to_string()), + Value::Text("public-key".to_string()), + ), ]; authenticator_info.push(( Value::Integer(10.into()), @@ -285,7 +291,7 @@ mod tests { fn test_aaguid_parsing() { let result = parse_uuid_to_bytes(AAGUID); assert!(result.is_ok(), "AAGUID parsing should succeed"); - + let aaguid_bytes = result.unwrap(); assert_eq!(aaguid_bytes.len(), 16, "AAGUID should be 16 bytes"); assert_eq!(aaguid_bytes[0], 0xd5, "First byte should be 0xd5"); @@ -299,7 +305,7 @@ mod tests { "AAGUID should match expected value" ); } - + #[test] fn test_parse_clsid_to_guid() { let result = parse_clsid_to_guid();