Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
use TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
globalworming committed Jun 29, 2015
1 parent 00decc4 commit 84c45f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class RemoteRequestProcessor {

static {
try {
SSLContext sslContext = SSLContext.getInstance("SSLv3");
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(SSLHelper.getInstance().getKeyManagerFactoryForRemoteFetch().getKeyManagers(), SSLHelper.getAllTrustingManager(), new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
HostnameVerifier hostnameVerifier = new HostnameVerifier() {
Expand Down
2 changes: 1 addition & 1 deletion sahi-core/src/main/java/net/sf/sahi/ssl/SSLHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ protected KeyStore getKeyStore() {
private SSLSocketFactory createSocketFactory(String domain) throws Exception {
SSLSocketFactory factory;
KeyManagerFactory keyManagerFactory = getKeyManagerFactory(keystore, KEYSTORE_PASSWORD);
SSLContext sslContext = SSLContext.getInstance("SSLv3");
SSLContext sslContext = SSLContext.getInstance("TLS");
KeyManager[] keyManagers = keyManagerFactory.getKeyManagers();
keyManagers = wrapKeyManagers(keyManagers, domain);
sslContext.init(keyManagers, getAllTrustingManager(), secureRandom);
Expand Down
8 changes: 3 additions & 5 deletions sahi-core/src/main/resources/net/sf/sahi/workspace/linux.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,17 @@
<displayName>PhantomJS</displayName>
<icon>safari.png</icon>
<path>phantomjs</path>
<options>--proxy=localhost:9999 --ssl-certificates-path=$userDir/certs $userDir/phantomscript/phantom.js</options>
<options> --ssl-protocol=tlsv1 --proxy=localhost:9999 --ssl-certificates-path=$userDir/certs $userDir/phantomscript/phantom.js</options>
<processName>phantomjs</processName>
<capacity>100</capacity>
<useSystemProxy>false</useSystemProxy>
</browserType>
</browserTypes>

<browserType>
<browserType>
<name>phantomjs-small</name>
<displayName>PhantomJS small</displayName>
<icon>safari.png</icon>
<path>phantomjs</path>
<options>--proxy=localhost:9999 --ssl-certificates-path=$userDir/certs $userDir/phantomscript/phantom-small.js</options>
<options>--ssl-protocol=tlsv1 --proxy=localhost:9999 --ssl-certificates-path=$userDir/certs $userDir/phantomscript/phantom-small.js</options>
<processName>phantomjs</processName>
<capacity>100</capacity>
<useSystemProxy>false</useSystemProxy>
Expand Down

0 comments on commit 84c45f9

Please sign in to comment.