diff options
author | jaypipes@gmail.com <> | 2010-12-22 15:52:55 +0000 |
---|---|---|
committer | Tarmac <> | 2010-12-22 15:52:55 +0000 |
commit | d9b37f9a3b6cc7dbf6026ceb94b9e4c585e59e01 (patch) | |
tree | 9d824a51f7a613024c7db3f1f08dfc092c79aabc /nova/crypto.py | |
parent | 41b5e4a12d23308f2143dfb5a059c43a931370e2 (diff) | |
parent | 46c4d44affb289209dd6024cbb289b265d9c89c7 (diff) | |
download | nova-d9b37f9a3b6cc7dbf6026ceb94b9e4c585e59e01.tar.gz nova-d9b37f9a3b6cc7dbf6026ceb94b9e4c585e59e01.tar.xz nova-d9b37f9a3b6cc7dbf6026ceb94b9e4c585e59e01.zip |
All merged with trunk and let's see if a new merge prop (with no pre-req) works..
Diffstat (limited to 'nova/crypto.py')
-rw-r--r-- | nova/crypto.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nova/crypto.py b/nova/crypto.py index aacc50b17..af4a06a0c 100644 --- a/nova/crypto.py +++ b/nova/crypto.py @@ -39,13 +39,13 @@ from nova import flags FLAGS = flags.FLAGS -flags.DEFINE_string('ca_file', 'cacert.pem', 'Filename of root CA') +flags.DEFINE_string('ca_file', 'cacert.pem', _('Filename of root CA')) flags.DEFINE_string('keys_path', '$state_path/keys', - 'Where we keep our keys') + _('Where we keep our keys')) flags.DEFINE_string('ca_path', '$state_path/CA', - 'Where we keep our root CA') + _('Where we keep our root CA')) flags.DEFINE_boolean('use_intermediate_ca', False, - 'Should we use intermediate CAs for each project?') + _('Should we use intermediate CAs for each project?')) def ca_path(project_id): @@ -111,9 +111,9 @@ def generate_x509_cert(subject, bits=1024): keyfile = os.path.abspath(os.path.join(tmpdir, 'temp.key')) csrfile = os.path.join(tmpdir, 'temp.csr') logging.debug("openssl genrsa -out %s %s" % (keyfile, bits)) - utils.runthis("Generating private key: %s", + utils.runthis(_("Generating private key: %s"), "openssl genrsa -out %s %s" % (keyfile, bits)) - utils.runthis("Generating CSR: %s", + utils.runthis(_("Generating CSR: %s"), "openssl req -new -key %s -out %s -batch -subj %s" % (keyfile, csrfile, subject)) private_key = open(keyfile).read() @@ -131,7 +131,7 @@ def sign_csr(csr_text, intermediate=None): if not os.path.exists(user_ca): start = os.getcwd() os.chdir(FLAGS.ca_path) - utils.runthis("Generating intermediate CA: %s", + utils.runthis(_("Generating intermediate CA: %s"), "sh geninter.sh %s" % (intermediate)) os.chdir(start) return _sign_csr(csr_text, user_ca) @@ -142,11 +142,11 @@ def _sign_csr(csr_text, ca_folder): csrfile = open("%s/inbound.csr" % (tmpfolder), "w") csrfile.write(csr_text) csrfile.close() - logging.debug("Flags path: %s" % ca_folder) + logging.debug(_("Flags path: %s") % ca_folder) start = os.getcwd() # Change working dir to CA os.chdir(ca_folder) - utils.runthis("Signing cert: %s", + utils.runthis(_("Signing cert: %s"), "openssl ca -batch -out %s/outbound.crt " "-config ./openssl.cnf -infiles %s/inbound.csr" % (tmpfolder, tmpfolder)) |