diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/libwebrtc/rtc_base/openssl_adapter.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/rtc_base/openssl_adapter.cc')
-rw-r--r-- | third_party/libwebrtc/rtc_base/openssl_adapter.cc | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/third_party/libwebrtc/rtc_base/openssl_adapter.cc b/third_party/libwebrtc/rtc_base/openssl_adapter.cc index c68eb22f5c..e48cdf43bd 100644 --- a/third_party/libwebrtc/rtc_base/openssl_adapter.cc +++ b/third_party/libwebrtc/rtc_base/openssl_adapter.cc @@ -44,6 +44,7 @@ #include "rtc_base/openssl_identity.h" #endif #include "rtc_base/openssl_utility.h" +#include "rtc_base/strings/str_join.h" #include "rtc_base/strings/string_builder.h" #include "rtc_base/thread.h" @@ -168,23 +169,6 @@ namespace rtc { using ::webrtc::TimeDelta; -namespace webrtc_openssl_adapter_internal { - -// Simple O(n^2) implementation is sufficient for current use case. -std::string StrJoin(const std::vector<std::string>& list, char delimiter) { - RTC_CHECK(!list.empty()); - StringBuilder sb; - sb << list[0]; - for (size_t i = 1; i < list.size(); i++) { - sb.AppendFormat("%c", delimiter); - sb << list[i]; - } - return sb.Release(); -} -} // namespace webrtc_openssl_adapter_internal - -using webrtc_openssl_adapter_internal::StrJoin; - bool OpenSSLAdapter::InitializeSSL() { if (!SSL_library_init()) return false; @@ -373,7 +357,7 @@ int OpenSSLAdapter::BeginSSL() { } if (!elliptic_curves_.empty()) { - SSL_set1_curves_list(ssl_, StrJoin(elliptic_curves_, ':').c_str()); + SSL_set1_curves_list(ssl_, webrtc::StrJoin(elliptic_curves_, ":").c_str()); } // Now that the initial config is done, transfer ownership of `bio` to the |