summaryrefslogtreecommitdiff
path: root/src/org/noreply/fancydress/type3/mmtp/MMTP.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/noreply/fancydress/type3/mmtp/MMTP.java')
-rw-r--r--src/org/noreply/fancydress/type3/mmtp/MMTP.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/noreply/fancydress/type3/mmtp/MMTP.java b/src/org/noreply/fancydress/type3/mmtp/MMTP.java
index 63f1f6f..3695c52 100644
--- a/src/org/noreply/fancydress/type3/mmtp/MMTP.java
+++ b/src/org/noreply/fancydress/type3/mmtp/MMTP.java
@@ -29,7 +29,9 @@ public class MMTP {
context.init(null, trustManagers, null);
SSLSocketFactory socketFactory = context.getSocketFactory();
- SSLSocket socket = (SSLSocket) socketFactory.createSocket("127.0.0.1", 48099);
+ RoutingForward route = packet.getRoute();
+System.err.println("Connecting to "+route.getHostname()+":"+route.getPort());
+ SSLSocket socket = (SSLSocket) socketFactory.createSocket(route.getHostname(), route.getPort());
String[] supportedProtocols = socket.getSupportedProtocols();
@@ -49,11 +51,13 @@ public class MMTP {
socket.setEnabledProtocols( new String[] { TLS_PROTO } );
socket.setEnabledCipherSuites( new String[] { TLS_DHE_RSA_WITH_AES_128_CBC_SHA } );
acceptableFound = true;
+System.err.println("Using TLS_DHE_RSA_WITH_AES_128_CBC_SHA");
break;
} else if (haveSSLv3 && supportedCipherSuits[i].equals(SSL3_RSA_DES_192_CBC3_SHA)) {
socket.setEnabledProtocols( new String[] { SSL_PROTO } );
socket.setEnabledCipherSuites( new String[] { SSL3_RSA_DES_192_CBC3_SHA } );
acceptableFound = true;
+System.err.println("Using SSL3_RSA_DES_192_CBC3_SHA");
break;
}
}