Skip to content

Commit

Permalink
fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Juwon Lee committed Jan 20, 2016
1 parent d254fba commit 969ce9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/braintreegateway/util/Http.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,11 @@ private SSLSocketFactory getSSLSocketFactory() {
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init(keyStore);

SSLContext sslContext = null;
try {
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
sslContext = SSLContext.getInstance("TLSv1.2");
} catch (Exception e) {
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext = SSLContext.getInstance("TLS");
}
sslContext.init((KeyManager[]) kmf.getKeyManagers(), tmf.getTrustManagers(), SecureRandom.getInstance("SHA1PRNG"));

Expand Down

0 comments on commit 969ce9e

Please sign in to comment.