mirror of
https://git.proxmox.com/git/proxmox
synced 2025-06-06 08:30:03 +00:00
proxmox-tfa: add version field to u2f::AuthChallenge
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
83934e59e6
commit
0156b3fe03
@ -1,7 +1,7 @@
|
|||||||
//! U2F implementation.
|
//! U2F implementation.
|
||||||
|
|
||||||
use std::mem::MaybeUninit;
|
|
||||||
use std::io;
|
use std::io;
|
||||||
|
use std::mem::MaybeUninit;
|
||||||
|
|
||||||
use anyhow::{bail, format_err, Error};
|
use anyhow::{bail, format_err, Error};
|
||||||
use openssl::ec::{EcGroup, EcKey, EcPoint};
|
use openssl::ec::{EcGroup, EcKey, EcPoint};
|
||||||
@ -109,6 +109,7 @@ pub struct RegistrationResponse {
|
|||||||
pub struct AuthChallenge {
|
pub struct AuthChallenge {
|
||||||
pub challenge: String,
|
pub challenge: String,
|
||||||
pub app_id: String,
|
pub app_id: String,
|
||||||
|
pub version: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The response we get from a successful call to the `u2f.sign` function in the browser.
|
/// The response we get from a successful call to the `u2f.sign` function in the browser.
|
||||||
@ -224,6 +225,7 @@ impl U2f {
|
|||||||
Ok(AuthChallenge {
|
Ok(AuthChallenge {
|
||||||
challenge: challenge()?,
|
challenge: challenge()?,
|
||||||
app_id: self.app_id.clone(),
|
app_id: self.app_id.clone(),
|
||||||
|
version: U2F_VERSION.to_owned(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user