From d4a3002b9bd0947a19ecb1bcb6df45ce884b7be6 Mon Sep 17 00:00:00 2001 From: Elad Alon Date: Thu, 26 Sep 2024 14:31:35 -0700 Subject: [PATCH] srtp: remove deprecated non-span versions of key setters BUG=webrtc:357776213 Change-Id: Idca7defe99b6d3dafb538a8a7599fe7edf2bff43 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363141 Commit-Queue: Philipp Hancke Reviewed-by: Elad Alon Reviewed-by: Florent Castelli Cr-Commit-Position: refs/heads/main@{#43397} --- pc/srtp_session.cc | 28 ---------------------------- pc/srtp_session.h | 20 -------------------- 2 files changed, 48 deletions(-) diff --git a/pc/srtp_session.cc b/pc/srtp_session.cc index 193298400c..509c2c9124 100644 --- a/pc/srtp_session.cc +++ b/pc/srtp_session.cc @@ -168,52 +168,24 @@ SrtpSession::~SrtpSession() { } } -bool SrtpSession::SetSend(int crypto_suite, - const uint8_t* key, - size_t len, - const std::vector& extension_ids) { - return SetSend(crypto_suite, {key, len}, extension_ids); -} - bool SrtpSession::SetSend(int crypto_suite, const rtc::ZeroOnFreeBuffer& key, const std::vector& extension_ids) { return SetKey(ssrc_any_outbound, crypto_suite, key, extension_ids); } -bool SrtpSession::UpdateSend(int crypto_suite, - const uint8_t* key, - size_t len, - const std::vector& extension_ids) { - return UpdateSend(crypto_suite, {key, len}, extension_ids); -} - bool SrtpSession::UpdateSend(int crypto_suite, const rtc::ZeroOnFreeBuffer& key, const std::vector& extension_ids) { return UpdateKey(ssrc_any_outbound, crypto_suite, key, extension_ids); } -bool SrtpSession::SetRecv(int crypto_suite, - const uint8_t* key, - size_t len, - const std::vector& extension_ids) { - return SetReceive(crypto_suite, {key, len}, extension_ids); -} - bool SrtpSession::SetReceive(int crypto_suite, const rtc::ZeroOnFreeBuffer& key, const std::vector& extension_ids) { return SetKey(ssrc_any_inbound, crypto_suite, key, extension_ids); } -bool SrtpSession::UpdateRecv(int crypto_suite, - const uint8_t* key, - size_t len, - const std::vector& extension_ids) { - return UpdateReceive(crypto_suite, {key, len}, extension_ids); -} - bool SrtpSession::UpdateReceive(int crypto_suite, const rtc::ZeroOnFreeBuffer& key, const std::vector& extension_ids) { diff --git a/pc/srtp_session.h b/pc/srtp_session.h index 3bee25abdb..f9e7ae5d40 100644 --- a/pc/srtp_session.h +++ b/pc/srtp_session.h @@ -44,38 +44,18 @@ class SrtpSession { // Configures the session for sending data using the specified // crypto suite and key. Receiving must be done by a separate session. - [[deprecated("Pass ZeroOnFreeBuffer to SetSend")]] bool SetSend( - int crypto_suite, - const uint8_t* key, - size_t len, - const std::vector& extension_ids); bool SetSend(int crypto_suite, const rtc::ZeroOnFreeBuffer& key, const std::vector& extension_ids); - [[deprecated("Pass ZeroOnFreeBuffer to UpdateSend")]] bool UpdateSend( - int crypto_suite, - const uint8_t* key, - size_t len, - const std::vector& extension_ids); bool UpdateSend(int crypto_suite, const rtc::ZeroOnFreeBuffer& key, const std::vector& extension_ids); // Configures the session for receiving data using the specified // crypto suite and key. Sending must be done by a separate session. - [[deprecated("Pass ZeroOnFreeBuffer to SetReceive")]] bool SetRecv( - int crypto_suite, - const uint8_t* key, - size_t len, - const std::vector& extension_ids); bool SetReceive(int crypto_suite, const rtc::ZeroOnFreeBuffer& key, const std::vector& extension_ids); - [[deprecated("Pass ZeroOnFreeBuffer to UpdateReceive")]] bool UpdateRecv( - int crypto_suite, - const uint8_t* key, - size_t len, - const std::vector& extension_ids); bool UpdateReceive(int crypto_suite, const rtc::ZeroOnFreeBuffer& key, const std::vector& extension_ids);