From 4718a88bfe7df431789ac1f5cc40089081f47d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 14 Feb 2023 22:06:37 +0100 Subject: [PATCH] fixup! events: Deprecate MessageAuthenticationCode::HkdfHmacSha256 --- crates/ruma-common/src/events/key/verification/accept.rs | 2 +- crates/ruma-common/src/events/key/verification/start.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ruma-common/src/events/key/verification/accept.rs b/crates/ruma-common/src/events/key/verification/accept.rs index 0cacc78f..65895ffc 100644 --- a/crates/ruma-common/src/events/key/verification/accept.rs +++ b/crates/ruma-common/src/events/key/verification/accept.rs @@ -287,7 +287,7 @@ mod tests { "method": "m.sas.v1", "key_agreement_protocol": "curve25519", "hash": "sha256", - "message_authentication_code": "hkdf-hmac-sha256", + "message_authentication_code": "hkdf-hmac-sha256.v2", "short_authentication_string": ["decimal"] }, "type": "m.key.verification.accept", diff --git a/crates/ruma-common/src/events/key/verification/start.rs b/crates/ruma-common/src/events/key/verification/start.rs index be7eba9d..374063d6 100644 --- a/crates/ruma-common/src/events/key/verification/start.rs +++ b/crates/ruma-common/src/events/key/verification/start.rs @@ -152,8 +152,8 @@ pub struct SasV1Content { /// The message authentication codes that the sending device understands. /// /// Must include at least `hkdf-hmac-sha256.v2`. Should also include `hkdf-hmac-sha256` for - /// compatibility with older clients, though this identifier is deprecated and will be - /// removed in a future version of the spec. + /// compatibility with older clients, though this MAC is deprecated and will be removed in a + /// future version of the spec. pub message_authentication_codes: Vec, /// The SAS methods the sending device (and the sending device's user) understands. @@ -355,7 +355,7 @@ mod tests { "method": "m.sas.v1", "hashes": ["sha256"], "key_agreement_protocols": ["curve25519"], - "message_authentication_codes": ["hkdf-hmac-sha256"], + "message_authentication_codes": ["hkdf-hmac-sha256.v2"], "short_authentication_string": ["decimal"] });