diff options
author | Matthew Newhook <matthew@zeroc.com> | 2015-03-18 12:58:16 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2015-03-18 12:58:16 -0230 |
commit | 9b7668c7c92cf9cb311fe444cdddb489cd2a219d (patch) | |
tree | 5016567c58c81f5654e9d01935e199c6bf4761d2 /cpp/demo/IceGrid/secure/makecerts.py | |
parent | VS add-in & build updates: (diff) | |
download | ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.bz2 ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.xz ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.zip |
Removed demos.
Moved demoscript to distribution.
Diffstat (limited to 'cpp/demo/IceGrid/secure/makecerts.py')
-rwxr-xr-x | cpp/demo/IceGrid/secure/makecerts.py | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/cpp/demo/IceGrid/secure/makecerts.py b/cpp/demo/IceGrid/secure/makecerts.py deleted file mode 100755 index 8da61063183..00000000000 --- a/cpp/demo/IceGrid/secure/makecerts.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python -# ********************************************************************** -# -# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -import os, sys, shutil, glob - -def runIceca(args): - os.environ['PYTHONUNBUFFERED'] = '1' - command = 'iceca %s' % args - - # Look for iceca in the PATH, if found, execute it with the - # current python executable. - for path in os.environ.get("PATH", "").split(os.pathsep): - if os.path.exists(os.path.join(path, "iceca")): - command = '%s "%s" %s' % (sys.executable, os.path.join(path, "iceca"), args) - - if os.system(command): - sys.exit(1) - -def createCertificate(filename, cn): - - print("======= Creating " + filename + " certificate =======") - - runIceca('request --no-password --overwrite "%s" "%s"' % (filename, cn)) - runIceca('sign --in %s_req.pem --out %s_cert.pem --dns="localhost" --ip="127.0.0.1"' % (filename, filename)) - os.remove("%s_req.pem" % filename) - - print("") - print("") - -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) - -os.environ["ICE_CA_HOME"] = os.path.abspath("certs") - -os.chdir("certs") - -# -# First, create the certificate authority. -# -print("======= Creating Certificate Authority =======") -runIceca("init --overwrite --no-password") -print("") -print("") - -createCertificate("master", "Master") -createCertificate("slave", "Slave") -createCertificate("node", "Node") -createCertificate("glacier2", "Glacier2") -createCertificate("server", "Server") - -print("======= Creating Java Key Store =======") - -try: - os.remove("certs.jks") -except OSError: - pass - -runIceca("import --key-pass password --store-pass password --java ca_cert ca/db/ca_cert.pem ca/db/ca_key.pem certs.jks") - -os.chdir("..") |