summaryrefslogtreecommitdiff
path: root/nova/crypto.py
diff options
context:
space:
mode:
authorTodd Willey <todd@ansolabs.com>2011-03-23 00:31:50 -0400
committerTodd Willey <todd@ansolabs.com>2011-03-23 00:31:50 -0400
commit3796b5a8fc2baa9a35ebbc721735f22e952e6aa3 (patch)
tree5b4e899fc15477f9ee9a01519a8f4fba976ddf4a /nova/crypto.py
parent83e2424e1c2721dd0ba42ca279de80b6c881ec21 (diff)
downloadnova-3796b5a8fc2baa9a35ebbc721735f22e952e6aa3.tar.gz
Fix some crypto strangeness (\n in file_name field of certificates, wrong IMPL method for certificate_update).
Diffstat (limited to 'nova/crypto.py')
-rw-r--r--nova/crypto.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/crypto.py b/nova/crypto.py
index 2a8d4abca6..b112e5b924 100644
--- a/nova/crypto.py
+++ b/nova/crypto.py
@@ -26,6 +26,7 @@ import gettext
import hashlib
import os
import shutil
+import string
import struct
import tempfile
import time
@@ -267,7 +268,7 @@ def _sign_csr(csr_text, ca_folder):
'./openssl.cnf', '-infiles', inbound)
out, _err = utils.execute('openssl', 'x509', '-in', outbound,
'-serial', '-noout')
- serial = out.rpartition("=")[2]
+ serial = string.strip(out.rpartition("=")[2])
os.chdir(start)
with open(outbound, "r") as crtfile:
return (serial, crtfile.read())