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.
This commit is contained in:
Robin Krahl
2023-11-29 11:18:28 +01:00
parent 85eb70969d
commit 3b849e5948
+1 -4
View File
@@ -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;