-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4f989a
commit 1ce2944
Showing
4 changed files
with
78 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/src/main/java/net/harimurti/tv/extra/HttpsTrustManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package net.harimurti.tv.extra; | ||
|
||
import android.annotation.SuppressLint; | ||
|
||
import java.security.cert.X509Certificate; | ||
import javax.net.ssl.X509TrustManager; | ||
|
||
public class HttpsTrustManager implements X509TrustManager { | ||
|
||
private static final X509Certificate[] _AcceptedIssuers = new X509Certificate[] { }; | ||
|
||
@SuppressLint("TrustAllX509TrustManager") | ||
@Override | ||
public void checkClientTrusted(java.security.cert.X509Certificate[] x509Certificates, String s) { } | ||
|
||
@SuppressLint("TrustAllX509TrustManager") | ||
@Override | ||
public void checkServerTrusted(java.security.cert.X509Certificate[] x509Certificates, String s) { } | ||
|
||
public boolean isClientTrusted(X509Certificate[] chain) { | ||
return true; | ||
} | ||
|
||
public boolean isServerTrusted(X509Certificate[] chain) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public X509Certificate[] getAcceptedIssuers() { | ||
return _AcceptedIssuers; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters