mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Lets use strict wildcard matching.
This commit is contained in:
parent
320cc84392
commit
f10d6a7b0b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user