diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-03-15 00:31:17 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-03-15 00:31:17 +0000 |
commit | d500b15fc1d4c73e26d1a97488bbbfc15315fe28 (patch) | |
tree | 6047e42236a4578d3baaea297d34702624c8564e /cs/config/TestUtil.py | |
parent | rethrow a LocalException (diff) | |
download | ice-d500b15fc1d4c73e26d1a97488bbbfc15315fe28.tar.bz2 ice-d500b15fc1d4c73e26d1a97488bbbfc15315fe28.tar.xz ice-d500b15fc1d4c73e26d1a97488bbbfc15315fe28.zip |
adding SSL support
Diffstat (limited to 'cs/config/TestUtil.py')
-rw-r--r-- | cs/config/TestUtil.py | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/cs/config/TestUtil.py b/cs/config/TestUtil.py index 7192ca045c4..387a208d933 100644 --- a/cs/config/TestUtil.py +++ b/cs/config/TestUtil.py @@ -14,7 +14,7 @@ # protocol = "" -#protocol = "ssl" // TODO: Not implemented yet +#protocol = "ssl" # # Set compressed to 1 in case you want to run the tests with @@ -32,6 +32,9 @@ compress = 1 threadPerConnection = 0 #threadPerConnection = 1 +if protocol == "ssl": + threadPerConnection = 1 + # # If you don't set "host" below, then the Ice library will try to find # out the IP address of this host. For the Ice test suite, it's best @@ -155,18 +158,17 @@ if isWin32(): os.environ["PATH"] = os.path.join(toplevel, "bin") + ";" + os.getenv("PATH", "") if protocol == "ssl": - plugin = " --Ice.Plugin.IceSSL=IceSSL:create" - clientProtocol = plugin + " --Ice.Default.Protocol=ssl" + \ - " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "certs") + \ - " --IceSSL.Client.Config=client_sslconfig.xml" + plugin = " --Ice.Plugin.IceSSL=" + os.path.join(toplevel, "bin", "icesslcs.dll") + \ + ":IceSSL.PluginFactory" + clientProtocol = plugin + " --Ice.Default.Protocol=ssl" serverProtocol = plugin + " --Ice.Default.Protocol=ssl" + \ - " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "certs") + \ - " --IceSSL.Server.Config=server_sslconfig.xml" + " --IceSSL.ImportCert.LocalMachine.Root=" + \ + os.path.join(toplevel, "certs", "cacert.pem") + \ + " --IceSSL.Server.Cert.File=" + os.path.join(toplevel, "certs", "s_rsa1024.pfx") + \ + " --IceSSL.Server.Cert.Password=password" clientServerProtocol = plugin + " --Ice.Default.Protocol=ssl" + \ - " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "certs") + \ - " --IceSSL.Client.Config=sslconfig.xml" + \ - " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "certs") + \ - " --IceSSL.Server.Config=sslconfig.xml" + " --IceSSL.Server.Cert.File=" + os.path.join(toplevel, "certs", "s_rsa1024.pfx") + \ + " --IceSSL.Server.Cert.Password=password" cppPlugin = " --Ice.Plugin.IceSSL=IceSSL:create" cppClientProtocol = cppPlugin + " --Ice.Default.Protocol=ssl" + \ " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "certs") + \ @@ -175,10 +177,10 @@ if protocol == "ssl": " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "certs") + \ " --IceSSL.Server.Config=server_sslconfig.xml" cppClientServerProtocol = cppPlugin + " --Ice.Default.Protocol=ssl" + \ - " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "certs") + \ - " --IceSSL.Client.Config=sslconfig.xml" + \ - " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "certs") + \ - " --IceSSL.Server.Config=sslconfig.xml" + " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "certs") + \ + " --IceSSL.Client.Config=sslconfig.xml" + \ + " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "certs") + \ + " --IceSSL.Server.Config=sslconfig.xml" else: clientProtocol = "" serverProtocol = "" @@ -199,9 +201,6 @@ if threadPerConnection: clientProtocol += " --Ice.ThreadPerConnection" serverProtocol += " --Ice.ThreadPerConnection" clientServerProtocol += " --Ice.ThreadPerConnection" - cppClientProtocol += " --Ice.ThreadPerConnection" - cppServerProtocol += " --Ice.ThreadPerConnection" - cppClientServerProtocol += " --Ice.ThreadPerConnection" if host != "": defaultHost = " --Ice.Default.Host=" + host @@ -258,14 +257,17 @@ def clientServerTestWithOptionsAndNames(mono, name, additionalServerOptions, add client = os.path.join(testdir, clientName) print createMsg(mono, serverName), - - serverPipe = os.popen(createCmd(mono, server) + serverOptions + " " + additionalServerOptions) + serverCmd = createCmd(mono, server) + serverOptions + " " + additionalServerOptions + #print "serverCmd=" + serverCmd + serverPipe = os.popen(serverCmd) getServerPid(serverPipe) getAdapterReady(serverPipe) print "ok" print createMsg(mono, clientName), - clientPipe = os.popen(createCmd(mono, client) + clientOptions + " " + additionalClientOptions) + clientCmd = createCmd(mono, client) + clientOptions + " " + additionalClientOptions + #print "clientCmd=" + clientCmd + clientPipe = os.popen(clientCmd) print "ok" printOutputFromPipe(clientPipe) |