Only requires enabling EP when the command exists (#630)
This commit is contained in:
@@ -440,6 +440,17 @@ pub fn force_pin_change(env: &mut impl Env) -> Result<(), Ctap2StatusCode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns whether enterprise attestation is enabled.
|
/// Returns whether enterprise attestation is enabled.
|
||||||
|
///
|
||||||
|
/// Without the AuthenticatorConfig command, customization determines the result.
|
||||||
|
#[cfg(not(feature = "config_command"))]
|
||||||
|
pub fn enterprise_attestation(env: &mut impl Env) -> Result<bool, Ctap2StatusCode> {
|
||||||
|
Ok(env.customization().enterprise_attestation_mode().is_some())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns whether enterprise attestation is enabled.
|
||||||
|
///
|
||||||
|
/// Use the AuthenticatorConfig command to turn it on.
|
||||||
|
#[cfg(feature = "config_command")]
|
||||||
pub fn enterprise_attestation(env: &mut impl Env) -> Result<bool, Ctap2StatusCode> {
|
pub fn enterprise_attestation(env: &mut impl Env) -> Result<bool, Ctap2StatusCode> {
|
||||||
match env.store().find(key::ENTERPRISE_ATTESTATION)? {
|
match env.store().find(key::ENTERPRISE_ATTESTATION)? {
|
||||||
None => Ok(false),
|
None => Ok(false),
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ make_partition! {
|
|||||||
ALWAYS_UV = 2038;
|
ALWAYS_UV = 2038;
|
||||||
|
|
||||||
/// If this entry exists and is empty, enterprise attestation is enabled.
|
/// If this entry exists and is empty, enterprise attestation is enabled.
|
||||||
|
#[cfg(feature = "config_command")]
|
||||||
ENTERPRISE_ATTESTATION = 2039;
|
ENTERPRISE_ATTESTATION = 2039;
|
||||||
|
|
||||||
/// If this entry exists and is empty, the PIN needs to be changed.
|
/// If this entry exists and is empty, the PIN needs to be changed.
|
||||||
|
|||||||
Reference in New Issue
Block a user