From 789a54a0c47e00cf3a5aaddd40a6d26d2cc46409 Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Mon, 30 Sep 2024 21:50:15 +0000 Subject: [PATCH] Remove ValidateMessageIntegrity standalone functions These functions have been deprecated since October 2022. Bug: None Change-Id: I74f51c9d0e8ee340a2043bf43f7a1b0d8b79726e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364280 Reviewed-by: Mirko Bonadei Commit-Queue: Harald Alvestrand Cr-Commit-Position: refs/heads/main@{#43118} --- api/transport/stun.cc | 18 ------------------ api/transport/stun.h | 13 ------------- 2 files changed, 31 deletions(-) diff --git a/api/transport/stun.cc b/api/transport/stun.cc index 6550182384..6f89028573 100644 --- a/api/transport/stun.cc +++ b/api/transport/stun.cc @@ -366,24 +366,6 @@ bool StunMessage::ValidateMessageIntegrity32ForTesting( password); } -// Deprecated -bool StunMessage::ValidateMessageIntegrity(const char* data, - size_t size, - const std::string& password) { - return ValidateMessageIntegrityOfType(STUN_ATTR_MESSAGE_INTEGRITY, - kStunMessageIntegritySize, data, size, - password); -} - -// Deprecated -bool StunMessage::ValidateMessageIntegrity32(const char* data, - size_t size, - const std::string& password) { - return ValidateMessageIntegrityOfType(STUN_ATTR_GOOG_MESSAGE_INTEGRITY_32, - kStunMessageIntegrity32Size, data, size, - password); -} - // Verifies a STUN message has a valid MESSAGE-INTEGRITY attribute, using the // procedure outlined in RFC 5389, section 15.4. bool StunMessage::ValidateMessageIntegrityOfType(int mi_attr_type, diff --git a/api/transport/stun.h b/api/transport/stun.h index ef95cb716d..cfe8cbcd05 100644 --- a/api/transport/stun.h +++ b/api/transport/stun.h @@ -294,19 +294,6 @@ class StunMessage { bool EqualAttributes(const StunMessage* other, std::function attribute_type_mask) const; - // Validates that a STUN message in byte buffer form - // has a correct MESSAGE-INTEGRITY value. - // These functions are not recommended and will be deprecated; use - // ValidateMessageIntegrity(password) on the parsed form instead. - [[deprecated("Use member function")]] static bool ValidateMessageIntegrity( - const char* data, - size_t size, - const std::string& password); - [[deprecated("Use member function")]] static bool ValidateMessageIntegrity32( - const char* data, - size_t size, - const std::string& password); - // Expose raw-buffer ValidateMessageIntegrity function for testing. static bool ValidateMessageIntegrityForTesting(const char* data, size_t size,