Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: webrtc/api/peerconnectioninterface.h

Issue 2594623002: Add disabled certificate check support to IceServer PeerConnection API. (Closed)
Patch Set: Support deprecated OPT_SSLTCP name to prevent API breakage. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/peerconnection_unittest.cc ('k') | webrtc/p2p/base/basicpacketsocketfactory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectioninterface.h
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index d4daf2435e3ac7de78092579413fbc4aa41bd7dc..078db8a2ba045e22529bc350862094cd53386eb2 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -209,15 +209,28 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
kIceConnectionMax,
};
+ // TLS certificate policy.
+ enum TlsCertPolicy {
+ // For TLS based protocols, ensure the connection is secure by not
+ // circumventing certificate validation.
+ kTlsCertPolicySecure,
+ // For TLS based protocols, disregard security completely by skipping
+ // certificate validation. This is insecure and should never be used unless
+ // security is irrelevant in that particular context.
+ kTlsCertPolicyInsecureNoCheck,
+ };
+
struct IceServer {
// TODO(jbauch): Remove uri when all code using it has switched to urls.
std::string uri;
std::vector<std::string> urls;
std::string username;
std::string password;
+ TlsCertPolicy tls_cert_policy = kTlsCertPolicySecure;
+
bool operator==(const IceServer& o) const {
return uri == o.uri && urls == o.urls && username == o.username &&
- password == o.password;
+ password == o.password && tls_cert_policy == o.tls_cert_policy;
}
bool operator!=(const IceServer& o) const { return !(*this == o); }
};
« no previous file with comments | « webrtc/api/peerconnection_unittest.cc ('k') | webrtc/p2p/base/basicpacketsocketfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698