summaryrefslogtreecommitdiff
path: root/nova/crypto.py
diff options
context:
space:
mode:
authorDavid Ripton <dripton@redhat.com>2013-05-28 10:32:47 -0400
committerDavid Ripton <dripton@redhat.com>2013-05-29 09:54:30 -0400
commit2cd1783bd5604937d5fbfa23ebd87b9009e95138 (patch)
tree344608365e928e64ddf791fba4e8e81345970cf1 /nova/crypto.py
parentb0aa0c122c3e439b79bf245df1f85f913d9c7f47 (diff)
downloadnova-2cd1783bd5604937d5fbfa23ebd87b9009e95138.tar.gz
Add missing os.path.abspath around csrfile.
We need to make sure paths are absolute before passing them to openssl. Fixes bug 1185052 Change-Id: I3ba9dd0a01d0078f830c33ac3173259985790060
Diffstat (limited to 'nova/crypto.py')
-rw-r--r--nova/crypto.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/crypto.py b/nova/crypto.py
index 0447bd9b8d..b312aca2df 100644
--- a/nova/crypto.py
+++ b/nova/crypto.py
@@ -324,7 +324,7 @@ def generate_x509_cert(user_id, project_id, bits=1024):
with utils.tempdir() as tmpdir:
keyfile = os.path.abspath(os.path.join(tmpdir, 'temp.key'))
- csrfile = os.path.join(tmpdir, 'temp.csr')
+ csrfile = os.path.abspath(os.path.join(tmpdir, 'temp.csr'))
utils.execute('openssl', 'genrsa', '-out', keyfile, str(bits))
utils.execute('openssl', 'req', '-new', '-key', keyfile, '-out',
csrfile, '-batch', '-subj', subject)