mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 04:47:44 +00:00
Lets use strict wildcard matching.
This commit is contained in:
@@ -6,6 +6,7 @@ import android.util.Pair;
|
||||
|
||||
import com.google.thoughtcrimegson.Gson;
|
||||
|
||||
import org.apache.http.conn.ssl.StrictHostnameVerifier;
|
||||
import org.whispersystems.textsecure.R;
|
||||
import org.whispersystems.textsecure.Release;
|
||||
import org.whispersystems.textsecure.crypto.IdentityKey;
|
||||
@@ -32,6 +33,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManagerFactory;
|
||||
@@ -341,6 +343,7 @@ public class PushServiceSocket {
|
||||
|
||||
if (Release.ENFORCE_SSL) {
|
||||
((HttpsURLConnection)connection).setSSLSocketFactory(context.getSocketFactory());
|
||||
((HttpsURLConnection)connection).setHostnameVerifier(new StrictHostnameVerifier());
|
||||
}
|
||||
|
||||
connection.setRequestMethod(method);
|
||||
|
Reference in New Issue
Block a user