Skip to content

Commit c8554ea

Browse files
committed
modify ssl version
1 parent 91e7107 commit c8554ea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/cn/jpush/api/common/connection/NativeHttpClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ protected void initSSL() {
261261
TrustManager[] tmCerts = new javax.net.ssl.TrustManager[1];
262262
tmCerts[0] = new SimpleTrustManager();
263263
try {
264-
SSLContext sslContext = SSLContext.getInstance("SSL");
264+
// SSLContext sslContext = SSLContext.getInstance("SSL");
265+
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
265266
sslContext.init(null, tmCerts, null);
266267
HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
267268

src/test/java/cn/jpush/api/BaseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
public abstract class BaseTest {
66

77
protected static final String APP_KEY ="dd1066407b044738b6479275";
8-
protected static final String MASTER_SECRET = "6b135be0037a5c1e693c3dfa";
8+
protected static final String MASTER_SECRET = "e8cc9a76d5b7a580859bcfa7";
99

1010
public static final String ALERT = "JPush Test - alert";
1111
public static final String MSG_CONTENT = "JPush Test - msgContent";

0 commit comments

Comments
 (0)