From e941073a3157520dcf653679a824f45c08d17519 Mon Sep 17 00:00:00 2001 From: Fabian Kaczmarczyck Date: Mon, 8 Feb 2021 13:10:18 +0100 Subject: [PATCH] new test for attestation configuration --- src/ctap/mod.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ctap/mod.rs b/src/ctap/mod.rs index e89b15b..da6ba72 100644 --- a/src/ctap/mod.rs +++ b/src/ctap/mod.rs @@ -2764,4 +2764,19 @@ mod test { )) ); } + + #[test] + #[allow(clippy::assertions_on_constants)] + /// Make sure that privacy guarantees are uphold. + /// + /// The current enterprise attestation implementation reuses batch + /// attestation. Enterprise attestation would imply a batch size of 1, but + /// batch attestation needs a batch size of at least 100k. To prevent + /// accidential misconfiguration, this test allows only one of the constants + /// to be set. If you implement your own enterprise attestation mechanism, + /// and you want batch attestation at the same time, feel free to proceed + /// carefully and remove this test. + fn check_attestation_privacy() { + assert!(!USE_BATCH_ATTESTATION || ENTERPRISE_ATTESTATION_MODE.is_none()); + } }