Add support for changing the TLS elliptic curve set.
This CL is almost identical to http://chromium-review.googlesource.com/c/611150
Bug: webrtc:8213
Change-Id: I21a8a0041a73b3171ed66b687dc47a579d45fe19
Reviewed-on: https://chromium-review.googlesource.com/653205
Commit-Queue: Diogo Real <diogor@google.com>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Emad Omara <emadomara@webrtc.org>
Reviewed-by: Zeke Chin <tkchin@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19755}
diff --git a/webrtc/rtc_base/stringencode.cc b/webrtc/rtc_base/stringencode.cc
index 93470b6..a4d594d 100644
--- a/webrtc/rtc_base/stringencode.cc
+++ b/webrtc/rtc_base/stringencode.cc
@@ -645,6 +645,28 @@
return true;
}
+std::string join(const std::vector<std::string>& source, char delimiter) {
+ if (source.size() == 0) {
+ return std::string();
+ }
+ // Find length of the string to be returned to pre-allocate memory.
+ size_t source_string_length = 0;
+ for (size_t i = 0; i < source.size(); ++i) {
+ source_string_length += source[i].length();
+ }
+
+ // Build the joined string.
+ std::string joined_string;
+ joined_string.reserve(source_string_length + source.size() - 1);
+ for (size_t i = 0; i < source.size(); ++i) {
+ if (i != 0) {
+ joined_string += delimiter;
+ }
+ joined_string += source[i];
+ }
+ return joined_string;
+}
+
size_t split(const std::string& source, char delimiter,
std::vector<std::string>* fields) {
RTC_DCHECK(fields);