aboutsummaryrefslogtreecommitdiff
path: root/p2p/client
diff options
context:
space:
mode:
authorBenjamin Wright <benwright@webrtc.org>2018-05-08 13:12:25 -0700
committerCommit Bot <commit-bot@chromium.org>2018-05-09 00:24:05 +0000
commitd6f86e8fca212e0f1b9b390dd31ef7579b66cc3e (patch)
treebb8719e1b374259ca20fa2355715ed627b2950cd /p2p/client
parent7c682e0c3512485bda285670e5a88f9bc41809be (diff)
downloadwebrtc-d6f86e8fca212e0f1b9b390dd31ef7579b66cc3e.tar.gz
This changeset adds dependency injection support for SSL Root Certs.
This extends the API surface so that custom certificates can be provided by an API user in both the standalone and factory creation paths for the OpenSSLAdapter. Prior to this change the SSL roots were hardcoded in a header file and directly included into openssladapter.cc. This forces the 100 kilobytes of certificates to always be compiled into the library. This is undesirable in certain linking cases where these certificates can be shared from another binary that already has an equivalent set of trusted roots hard coded into the binary. Support for removing the hard coded SSL roots has also been added through a new build flag. By default the hard coded SSL roots will be included and will be used if no other trusted root certificates are provided. The main goal of this CL is to reduce total binary size requirements of WebRTC by about 100kb in certain applications where adding these certificates is redundant. Change-Id: Ifd36d92b5cb32d1b3098a61ddfc244d76df8f30f Bug: chromium:526260 Change-Id: Ifd36d92b5cb32d1b3098a61ddfc244d76df8f30f Reviewed-on: https://webrtc-review.googlesource.com/64841 Commit-Queue: Benjamin Wright <benwright@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23180}
Diffstat (limited to 'p2p/client')
-rw-r--r--p2p/client/turnportfactory.cc20
1 files changed, 5 insertions, 15 deletions
diff --git a/p2p/client/turnportfactory.cc b/p2p/client/turnportfactory.cc
index 9f24f5f4b6..fc4f9d31e8 100644
--- a/p2p/client/turnportfactory.cc
+++ b/p2p/client/turnportfactory.cc
@@ -43,22 +43,12 @@ std::unique_ptr<Port> TurnPortFactory::Create(
const CreateRelayPortArgs& args,
int min_port,
int max_port) {
-
TurnPort* port = TurnPort::Create(
- args.network_thread,
- args.socket_factory,
- args.network,
- min_port,
- max_port,
- args.username,
- args.password,
- *args.server_address,
- args.config->credentials,
- args.config->priority,
- args.origin,
- args.config->tls_alpn_protocols,
- args.config->tls_elliptic_curves,
- args.turn_customizer);
+ args.network_thread, args.socket_factory, args.network, min_port,
+ max_port, args.username, args.password, *args.server_address,
+ args.config->credentials, args.config->priority, args.origin,
+ args.config->tls_alpn_protocols, args.config->tls_elliptic_curves,
+ args.turn_customizer, args.config->tls_cert_verifier);
port->SetTlsCertPolicy(args.config->tls_cert_policy);
return std::unique_ptr<Port>(port);
}