]> git.proxmox.com Git - proxmox.git/commitdiff
proxmox-tfa: add version field to u2f::AuthChallenge
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 3 Nov 2021 13:44:05 +0000 (14:44 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 9 Nov 2021 12:27:59 +0000 (13:27 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-tfa/src/u2f.rs

index 95aa41a113d7cc1faf70ef7c9d9dda46b7b080af..84fea41cd62b532e637f0426c3daa852b19fd5a4 100644 (file)
@@ -1,7 +1,7 @@
 //! U2F implementation.
 
-use std::mem::MaybeUninit;
 use std::io;
+use std::mem::MaybeUninit;
 
 use anyhow::{bail, format_err, Error};
 use openssl::ec::{EcGroup, EcKey, EcPoint};
@@ -109,6 +109,7 @@ pub struct RegistrationResponse {
 pub struct AuthChallenge {
     pub challenge: String,
     pub app_id: String,
+    pub version: String,
 }
 
 /// The response we get from a successful call to the `u2f.sign` function in the browser.
@@ -224,6 +225,7 @@ impl U2f {
         Ok(AuthChallenge {
             challenge: challenge()?,
             app_id: self.app_id.clone(),
+            version: U2F_VERSION.to_owned(),
         })
     }