changeset 1206:6dfaf4e9ce71

use many anonymous cipher_suites
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 06 Mar 2018 20:23:50 -0700
parents 8f14426f8ada
children 59289af20d9a
files src/luan/modules/Rpc.luan
diffstat 1 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/modules/Rpc.luan	Tue Mar 06 20:15:02 2018 -0700
+++ b/src/luan/modules/Rpc.luan	Tue Mar 06 20:23:50 2018 -0700
@@ -31,7 +31,19 @@
 
 Rpc.port = 9101
 
-Rpc.cipher_suite = "SSL_DH_anon_WITH_DES_CBC_SHA"
+Rpc.cipher_suites = {
+	"TLS_DH_anon_WITH_AES_128_GCM_SHA256"
+	"TLS_DH_anon_WITH_AES_128_CBC_SHA256"
+	"TLS_ECDH_anon_WITH_AES_128_CBC_SHA"
+	"TLS_DH_anon_WITH_AES_128_CBC_SHA"
+	"TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA"
+	"SSL_DH_anon_WITH_3DES_EDE_CBC_SHA"
+	"TLS_ECDH_anon_WITH_RC4_128_SHA"
+	"SSL_DH_anon_WITH_RC4_128_MD5"
+	"SSL_DH_anon_WITH_DES_CBC_SHA"
+	"SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA"
+	"SSL_DH_anon_EXPORT_WITH_RC4_40_MD5"
+}
 
 local function java_args(list)
 	for i,v in ipairs(list) do
@@ -161,11 +173,11 @@
 
 function Rpc.remote(domain)
 	local socket
-	if Rpc.cipher_suite == nil then
+	if Rpc.cipher_suites == nil then
 		socket = Socket.new(domain,Rpc.port)
 	else
 		socket = SSLSocketFactory.getDefault().createSocket(domain,Rpc.port)
-		socket.setEnabledCipherSuites{Rpc.cipher_suite}
+		socket.setEnabledCipherSuites(Rpc.cipher_suites)
 	end
 	local call = rpc_caller(socket)
 	local mt = {}
@@ -183,11 +195,11 @@
 	port = port or Rpc.port
 	fns = fns or Rpc.functions
 	local socket_server
-	if Rpc.cipher_suite == nil then
+	if Rpc.cipher_suites == nil then
 		socket_server = ServerSocket.new(port)
 	else
 		socket_server = SSLServerSocketFactory.getDefault().createServerSocket(port)
-		socket_server.setEnabledCipherSuites{Rpc.cipher_suite}
+		socket_server.setEnabledCipherSuites(Rpc.cipher_suites)
 	end
 	while true do
 		try {