aacs: rustfmt verify-gate files + correct cert/unit-key test fixtures to libaacs-strict layout; 1.1.0-beta.1 changelog

This commit is contained in:
Matthew Jackson
2026-06-28 16:49:16 -07:00
parent f23338b5dd
commit fb8405385e
6 changed files with 110 additions and 34 deletions
+4 -3
View File
@@ -547,11 +547,12 @@ mod tests {
}
/// A content certificate: type byte@0 (0x00 = V10, else V20),
/// bus_encryption bit0@1, cc_id@2..8 (aacs/keys.rs parse_content_cert).
/// bus_encryption bit7@1, cc_id@14..20 (aacs/keys.rs parse_content_cert,
/// which requires ≥20 bytes and reads the bus flag from `data[1] >> 7`).
fn build_content_cert(cert_type: u8, bus_encryption: bool) -> Vec<u8> {
let mut v = vec![0u8; 8];
let mut v = vec![0u8; 20];
v[0] = cert_type;
v[1] = if bus_encryption { 0x01 } else { 0x00 };
v[1] = if bus_encryption { 0x80 } else { 0x00 };
v
}