|
|
@ -5,6 +5,7 @@ use crate::{
|
|
|
|
use fido_common::{attestation, credential::public_key};
|
|
|
|
use fido_common::{attestation, credential::public_key};
|
|
|
|
use std::collections::BTreeMap;
|
|
|
|
use std::collections::BTreeMap;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum Error {
|
|
|
|
pub enum Error {
|
|
|
|
OperationDenied,
|
|
|
|
OperationDenied,
|
|
|
|
PinNotSet,
|
|
|
|
PinNotSet,
|
|
|
@ -24,7 +25,7 @@ pub enum Error {
|
|
|
|
|
|
|
|
|
|
|
|
/// > The following option keys are defined for use in
|
|
|
|
/// > The following option keys are defined for use in
|
|
|
|
/// > `authenticatorMakeCredential`'s `options` parameter.
|
|
|
|
/// > `authenticatorMakeCredential`'s `options` parameter.
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
|
|
|
pub enum OptionKey {
|
|
|
|
pub enum OptionKey {
|
|
|
|
/// > Specifies whether this credential is to be discoverable or
|
|
|
|
/// > Specifies whether this credential is to be discoverable or
|
|
|
|
/// > not.
|
|
|
|
/// > not.
|
|
|
@ -40,7 +41,7 @@ pub enum OptionKey {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Input parameters for [`Ctap2Device::make_credential`] operation.
|
|
|
|
/// Input parameters for [`Ctap2Device::make_credential`] operation.
|
|
|
|
#[derive(Clone, Copy)]
|
|
|
|
#[derive(Debug, Clone, Copy)]
|
|
|
|
pub struct Request<'a> {
|
|
|
|
pub struct Request<'a> {
|
|
|
|
/// > Hash of the ClientData contextual binding specified by host.
|
|
|
|
/// > Hash of the ClientData contextual binding specified by host.
|
|
|
|
pub client_data_hash: &'a Sha256Hash,
|
|
|
|
pub client_data_hash: &'a Sha256Hash,
|
|
|
@ -84,6 +85,7 @@ pub struct Request<'a> {
|
|
|
|
pub enterprise_attestation: Option<attestation::enterprise::Kind>,
|
|
|
|
pub enterprise_attestation: Option<attestation::enterprise::Kind>,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct Response {
|
|
|
|
pub struct Response {
|
|
|
|
pub format: fido_common::attestation::FormatIdentifier,
|
|
|
|
pub format: fido_common::attestation::FormatIdentifier,
|
|
|
|
pub authenticator_data: authenticator::Data,
|
|
|
|
pub authenticator_data: authenticator::Data,
|
|
|
|