Use fido2luks as rp_id instead if default hmac, consider making
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
credenials device specific
This commit is contained in:
parent
5d1c7beb4d
commit
e7049a281a
@ -1,8 +1,10 @@
|
|||||||
use crate::error::*;
|
use crate::error::*;
|
||||||
|
|
||||||
use ctap;
|
use ctap::{
|
||||||
use ctap::extensions::hmac::{FidoHmacCredential, HmacExtension};
|
self,
|
||||||
use ctap::{FidoDevice, FidoError, FidoErrorKind};
|
extensions::hmac::{FidoHmacCredential, HmacExtension},
|
||||||
|
FidoDevice, FidoError, FidoErrorKind,
|
||||||
|
};
|
||||||
|
|
||||||
pub fn make_credential_id() -> Fido2LuksResult<FidoHmacCredential> {
|
pub fn make_credential_id() -> Fido2LuksResult<FidoHmacCredential> {
|
||||||
let mut errs = Vec::new();
|
let mut errs = Vec::new();
|
||||||
@ -10,7 +12,11 @@ pub fn make_credential_id() -> Fido2LuksResult<FidoHmacCredential> {
|
|||||||
ref devs if devs.is_empty() => Err(Fido2LuksError::NoAuthenticatorError)?,
|
ref devs if devs.is_empty() => Err(Fido2LuksError::NoAuthenticatorError)?,
|
||||||
devs => {
|
devs => {
|
||||||
for mut dev in devs.into_iter() {
|
for mut dev in devs.into_iter() {
|
||||||
match dev.make_hmac_credential() {
|
match dev
|
||||||
|
.make_credential("fido2luks", &[0u8], "", &[0u8; 32])
|
||||||
|
.map(|cred| cred.into())
|
||||||
|
{
|
||||||
|
//TODO: make credentials device specific
|
||||||
Ok(cred) => {
|
Ok(cred) => {
|
||||||
return Ok(cred);
|
return Ok(cred);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user