summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2014-08-04 11:13:25 +0200
committerPetr Viktorin <pviktori@redhat.com>2014-08-07 15:07:39 +0200
commit6bb240fa2cf6ce257376241d0a779ca5cc96078e (patch)
treef0e0afe6d5a2e48a019a04b6e92c547895c24403 /ipaserver
parent6bb4eea348f9c90351987e20a49bbaca265291f4 (diff)
downloadfreeipa-6bb240fa2cf6ce257376241d0a779ca5cc96078e.tar.gz
freeipa-6bb240fa2cf6ce257376241d0a779ca5cc96078e.tar.xz
freeipa-6bb240fa2cf6ce257376241d0a779ca5cc96078e.zip
Fix parsing of long nicknames in certutil -L output.
https://fedorahosted.org/freeipa/ticket/4453 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/certs.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py
index f958e366e..6569f5144 100644
--- a/ipaserver/install/certs.py
+++ b/ipaserver/install/certs.py
@@ -137,10 +137,9 @@ class NSSDatabase(object):
# FIXME, this relies on NSS never changing the formatting of certutil
certlist = []
for cert in certs:
- nickname = cert[0:61]
- trust = cert[61:]
- if re.match(r'\w*,\w*,\w*', trust):
- certlist.append((nickname.strip(), trust.strip()))
+ match = re.match(r'^(.+?)\s+(\w*,\w*,\w*)\s*$', cert)
+ if match:
+ certlist.append(match.groups())
return tuple(certlist)