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

Unified Diff: webrtc/sdk/android/api/org/webrtc/PeerConnection.java

Issue 2557803002: Add disabled certificate check support to IceServer PeerConnection API. (Closed)
Patch Set: Add disabled certificate check support to IceServer PeerConnection API. 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
Index: webrtc/sdk/android/api/org/webrtc/PeerConnection.java
diff --git a/webrtc/sdk/android/api/org/webrtc/PeerConnection.java b/webrtc/sdk/android/api/org/webrtc/PeerConnection.java
index ab085985195acf34f0c96ab9c4e769d2dfecee1b..2b04e49f7ceb50e83bf1c0b6926f76027fddedb0 100644
--- a/webrtc/sdk/android/api/org/webrtc/PeerConnection.java
+++ b/webrtc/sdk/android/api/org/webrtc/PeerConnection.java
@@ -39,6 +39,12 @@ public class PeerConnection {
CLOSED
}
+ /** Tracks PeerConnectionInterface::TlsCertificatePolicy */
+ public enum TlsCertificatePolicy {
+ TLS_CERT_POLICY_SECURE,
+ TLS_CERT_POLICY_INSECURE_NO_CHECK,
+ }
+
/** Tracks PeerConnectionInterface::SignalingState */
public enum SignalingState {
STABLE,
@@ -87,6 +93,7 @@ public class PeerConnection {
public final String uri;
public final String username;
public final String password;
+ public final TlsCertificatePolicy tlsCertificatePolicy;
/** Convenience constructor for STUN servers. */
public IceServer(String uri) {
@@ -94,13 +101,19 @@ public class PeerConnection {
}
public IceServer(String uri, String username, String password) {
+ this(uri, username, password, TlsCertificatePolicy.TLS_CERT_POLICY_SECURE);
+ }
+
+ public IceServer(
+ String uri, String username, String password, TlsCertificatePolicy tlsCertificatePolicy) {
this.uri = uri;
this.username = username;
this.password = password;
+ this.tlsCertificatePolicy = tlsCertificatePolicy;
}
public String toString() {
- return uri + "[" + username + ":" + password + "]";
+ return uri + " [" + username + ":" + password + "] [" + tlsCertificatePolicy + "]";
}
}

Powered by Google App Engine
This is Rietveld 408576698