Skip to content

Commit afa5c79

Browse files
committed
Merge pull request #32 from Liuchy1/master
modify ssl version
2 parents fa4ea58 + c8554ea commit afa5c79

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>cn.jpush.api</groupId>
55
<artifactId>jpush-client</artifactId>
6-
<version>3.2.7-SNAPSHOT</version>
6+
<version>3.2.8-SNAPSHOT</version>
77
<packaging>jar</packaging>
88
<url>https://github.com/jpush/jpush-api-java-client</url>
99
<name>JPush API Java Client</name>

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)