From 3b849e59488d06496add49db1e81e6dbedc44b08 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 28 Nov 2023 20:12:49 +0100 Subject: [PATCH] Remove REALISTIC_MAX_MESSAGE_SIZE This patch removes the unused REALISTIC_MAX_MESSAGE_SIZE constant. Its value has no inherent meaning, and applications should not rely on it. In fact, implementations in the Trussed ecosystem typically use a max message size of 3072, see usbd-ctaphid. --- src/sizes.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/sizes.rs b/src/sizes.rs index d8b73e4..06b1419 100644 --- a/src/sizes.rs +++ b/src/sizes.rs @@ -21,10 +21,7 @@ pub const PACKET_SIZE: usize = 64; /// The theoretical maximal message size, which however is far /// too large for most platforms. pub const THEORETICAL_MAX_MESSAGE_SIZE: usize = PACKET_SIZE - 7 + 128 * (PACKET_SIZE - 5); -/// The size used by Yubico, which means that no platforms will -/// realistically expect a larger size. -pub const REALISTIC_MAX_MESSAGE_SIZE: usize = 1200; /// Max length for a large blob fragment, according to /// https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#largeBlobsRW -pub const LARGE_BLOB_MAX_FRAGMENT_LENGTH: usize = REALISTIC_MAX_MESSAGE_SIZE - 64; +pub const LARGE_BLOB_MAX_FRAGMENT_LENGTH: usize = 1200 - 64;