Skip to content

Commit

Permalink
Merge pull request #110 from CleverTap/force_tls
Browse files Browse the repository at this point in the history
Force TLSv1.3
  • Loading branch information
smghacker authored Nov 28, 2024
2 parents 6a7b74f + c60e683 commit 42a24c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.clevertap.apns</groupId>
<artifactId>apns-http2</artifactId>
<version>3.0.2</version>
<version>4.0.0</version>

<name>apns-http2</name>
<description>A library for communicating with the Apple Push Gateway in HTTP/2.</description>
Expand Down Expand Up @@ -213,6 +213,7 @@
</snapshotRepository>
</distributionManagement>


<scm>
<connection>scm:git:git://github.com/CleverTap/apns-http2.git</connection>
<developerConnection>scm:git:ssh://github.com:CleverTap/apns-http2.git</developerConnection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
/**
* A wrapper around OkHttp's http client to send out notifications using Apple's HTTP/2 API.
*/
public class SyncOkHttpApnsClient implements ApnsClient {
// NOSONAR
public class SyncOkHttpApnsClient implements ApnsClient { // NOSONAR

private final String defaultTopic;
private final String apnsAuthKey;
Expand Down Expand Up @@ -264,7 +265,7 @@ public SyncOkHttpApnsClient(InputStream certificate, String password, boolean pr
KeyManagerFactory.getDefaultAlgorithm());
kmf.init(ks, password.toCharArray());
KeyManager[] keyManagers = kmf.getKeyManagers();
SSLContext sslContext = SSLContext.getInstance("TLS");
SSLContext sslContext = SSLContext.getInstance("TLSv1.3");

final TrustManagerFactory tmf = TrustManagerFactory.getInstance(
TrustManagerFactory.getDefaultAlgorithm());
Expand Down

0 comments on commit 42a24c8

Please sign in to comment.