From 0156b3fe036ec0ba1c8e4462cdfbbd484ee19f26 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 3 Nov 2021 14:44:05 +0100 Subject: [PATCH] proxmox-tfa: add version field to u2f::AuthChallenge Signed-off-by: Wolfgang Bumiller --- proxmox-tfa/src/u2f.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxmox-tfa/src/u2f.rs b/proxmox-tfa/src/u2f.rs index 95aa41a1..84fea41c 100644 --- a/proxmox-tfa/src/u2f.rs +++ b/proxmox-tfa/src/u2f.rs @@ -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(), }) }