diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-12-23 12:52:56 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-12-23 12:52:56 +0100 |
commit | 652d3f9252d66b6cfb8c7f8e15c38a048a3a25bc (patch) | |
tree | f389673ccf7f03ab59462ea5fa558dd98cf2eae8 /cpp | |
parent | More edits for release notes (diff) | |
download | ice-652d3f9252d66b6cfb8c7f8e15c38a048a3a25bc.tar.bz2 ice-652d3f9252d66b6cfb8c7f8e15c38a048a3a25bc.tar.xz ice-652d3f9252d66b6cfb8c7f8e15c38a048a3a25bc.zip |
Fixed bug 4537 - IceGrid/secure demoscript failure
Diffstat (limited to 'cpp')
-rwxr-xr-x | cpp/demo/IceGrid/secure/expect.py | 12 | ||||
-rwxr-xr-x | cpp/demo/IceGrid/secure/makecerts.py | 9 | ||||
-rwxr-xr-x | cpp/src/ca/iceca | 9 | ||||
-rwxr-xr-x | cpp/src/ca/iceca.bat | 2 |
4 files changed, 11 insertions, 21 deletions
diff --git a/cpp/demo/IceGrid/secure/expect.py b/cpp/demo/IceGrid/secure/expect.py index 7c0426f45f6..c643599226e 100755 --- a/cpp/demo/IceGrid/secure/expect.py +++ b/cpp/demo/IceGrid/secure/expect.py @@ -34,19 +34,9 @@ if Util.defaultHost: else: args = '' -icecaPath = "" -if os.environ.get("ICE_HOME", "") != "": - icecaPath = os.environ["ICE_HOME"] -elif os.path.isdir(os.path.join(path[0], "cpp")): - icecaPath = os.path.join(path[0], "cpp") - -command = 'python -u makecerts.py' -if icecaPath != "": - command += ' --iceca="%s"' % os.path.join(icecaPath, "bin", "iceca") - print "creating certificates...", sys.stdout.flush() -makecerts = Util.spawn(command) +makecerts = Util.spawn("python -u makecerts.py") makecerts.expect("Do you want to keep this as the CA subject name?") makecerts.sendline("y") makecerts.expect("Enter the email address of the CA:") diff --git a/cpp/demo/IceGrid/secure/makecerts.py b/cpp/demo/IceGrid/secure/makecerts.py index d7d969a8f94..14c1749b84b 100755 --- a/cpp/demo/IceGrid/secure/makecerts.py +++ b/cpp/demo/IceGrid/secure/makecerts.py @@ -10,11 +10,9 @@ import os, sys, shutil, glob -iceca = "iceca" - def runIceca(args): os.environ['PYTHONUNBUFFERED'] = '1' - command = 'python "%s" %s' % (iceca, args) + command = 'iceca %s' % args if os.system(command): sys.exit(1) @@ -29,12 +27,7 @@ def createCertificate(filename, cn): print print -for x in sys.argv[1:]: - if x[0:7] == "--iceca": - iceca = x[8:] - cwd = os.getcwd() - if not os.path.exists("certs") or os.path.basename(cwd) != "secure": print "You must run this script from the secure demo directory" sys.exit(1) diff --git a/cpp/src/ca/iceca b/cpp/src/ca/iceca index aab8e3121cd..808e5f63f2d 100755 --- a/cpp/src/ca/iceca +++ b/cpp/src/ca/iceca @@ -34,8 +34,15 @@ os.putenv("ICE_CA_HOME", home) opensslCmd = "openssl" if sys.platform == "win32" or sys.platform[:6] == "cygwin": + + # Add the directory containing this script to the PATH, this is + # also where the openssl.exe is located. if os.path.exists(os.path.join(os.path.dirname(sys.argv[0]), "openssl.exe")): - opensslCmd = os.path.join(os.path.dirname(sys.argv[0]), "openssl.exe") + os.environ["PATH"] = os.path.dirname(sys.argv[0]) + os.pathsep + os.getenv("PATH", "") + + # Setup RANDFILE to avoid errors on Vista about openssl not being + # able to write 'Random State' + os.environ["RANDFILE"] = os.path.join(os.getenv("ICE_CA_HOME"), "randfile") caroot = os.path.join(home, "ca") cadb = os.path.join(caroot, "db") diff --git a/cpp/src/ca/iceca.bat b/cpp/src/ca/iceca.bat index 2370d1f041c..cd21e88ce60 100755 --- a/cpp/src/ca/iceca.bat +++ b/cpp/src/ca/iceca.bat @@ -10,4 +10,4 @@ REM ********************************************************************** REM .bat wrapper for iceca python script. Assumes python is in your PATH.
-@python %~dp0iceca %*
+@python "%~dp0iceca" %*
|