Skip to content
This repository was archived by the owner on Jan 15, 2020. It is now read-only.

Commit 0d74d7b

Browse files
committed
use a preferable protocol that works on most infra
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> (cherry picked from commit f5f6c2d) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> Conflicts: services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapperImpl.java (cherry picked from commit 1bab1d0) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent fa76b3c commit 0d74d7b

3 files changed

Lines changed: 4 additions & 6 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
@@ -59,7 +59,7 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus {
5959
private static Integer port;
6060
private static String username;
6161
private static String password;
62-
private static String secureProtocol = "TLSv1.2";
62+
private static String secureProtocol = "TLSv1";
6363

6464
public synchronized static void setVirtualHost(String virtualHost) {
6565
RabbitMQEventBus.virtualHost = virtualHost;

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

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

4949
protected SSLSocket sslSocket;
5050

51-
protected String sslVersionToUse = "TLSv1.2";
52-
5351
protected SSLState sslState;
5452

5553
public SocketWrapperImpl(String id, SSLState sslState) {
@@ -134,7 +132,7 @@ public void upgradeToSsl() {
134132
// Use most secure implementation of SSL available now.
135133
// JVM will try to negotiate TLS1.2, then will fallback to TLS1.0, if
136134
// TLS1.2 is not supported.
137-
SSLContext sslContext = SSLContext.getInstance(sslVersionToUse);
135+
SSLContext sslContext = SSLUtils.getSSLContext();
138136

139137
// Trust all certificates (FIXME: insecure)
140138
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)