Skip to content

Commit f5f6c2d

Browse files
committed
use a preferable protocol that works on jvm 1.6
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 1ef12f4 commit f5f6c2d

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus {
4747
private static Integer port;
4848
private static String username;
4949
private static String password;
50-
private static String secureProtocol = "TLSv1.2";
50+
private static String secureProtocol = "TLSv1";
5151

5252
public static void setVirtualHost(String virtualHost) {
5353
RabbitMQEventBus.virtualHost = virtualHost;

services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapperImpl.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public class SocketWrapperImpl extends PipelineImpl implements SocketWrapper {
4848

4949
protected SSLSocket sslSocket;
5050

51-
protected String SSL_VERSION_TO_USE = "TLSv1.2";
52-
//protected String SSL_VERSION_TO_USE = "SSLv3";
53-
5451
protected SSLState sslState;
5552

5653
public SocketWrapperImpl(String id, SSLState sslState) {
@@ -135,7 +132,7 @@ public void upgradeToSsl() {
135132
// Use most secure implementation of SSL available now.
136133
// JVM will try to negotiate TLS1.2, then will fallback to TLS1.0, if
137134
// TLS1.2 is not supported.
138-
SSLContext sslContext = SSLContext.getInstance(SSL_VERSION_TO_USE);
135+
SSLContext sslContext = SSLUtils.getSSLContext();
139136

140137
// Trust all certificates (FIXME: insecure)
141138
sslContext.init(null, new TrustManager[] {new TrustAllX509TrustManager(sslState)}, null);

utils/src/org/apache/cloudstack/utils/security/SSLUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public static String[] getSupportedProtocols(String[] protocols) {
4242
}
4343

4444
public static SSLContext getSSLContext() throws NoSuchAlgorithmException {
45-
return SSLContext.getInstance("TLSv1.2");
45+
return SSLContext.getInstance("TLSv1");
4646
}
4747

4848
public static SSLContext getSSLContext(String provider) throws NoSuchAlgorithmException, NoSuchProviderException {
49-
return SSLContext.getInstance("TLSv1.2", provider);
49+
return SSLContext.getInstance("TLSv1", provider);
5050
}
5151
}

0 commit comments

Comments
 (0)