Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Commit 1ca80ce

Browse files
author
Checkium
committed
Fixed error caused by vhack.com certeficate change.
1 parent 8de4418 commit 1ca80ce

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/me/checkium/vhackapi/Utils.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
import java.io.Reader;
88
import java.net.URL;
99
import java.nio.charset.Charset;
10-
import java.security.GeneralSecurityException;
1110
import java.security.MessageDigest;
1211
import java.security.NoSuchAlgorithmException;
1312
import java.security.cert.X509Certificate;
1413

15-
import javax.net.ssl.HttpsURLConnection;
16-
import javax.net.ssl.SSLContext;
1714
import javax.net.ssl.TrustManager;
1815
import javax.net.ssl.X509TrustManager;
1916

@@ -45,12 +42,14 @@ public static String readJson(Reader rd) throws IOException {
4542
}
4643

4744
public static JSONObject JSONRequest(String format, String data, String php){
48-
try {
45+
System.setProperty("http.agent", "Chrome");
46+
/* try {
4947
SSLContext sc = SSLContext.getInstance("SSL");
5048
sc.init(null, Utils.trustAllCerts, new java.security.SecureRandom());
5149
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
5250
} catch (GeneralSecurityException e) {
5351
}
52+
*/
5453
JSONObject json = null;
5554
InputStream is;
5655
try {

0 commit comments

Comments
 (0)