mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-26 07:00:07 -05:00
Fix parsing of long nicknames in certutil -L output.
https://fedorahosted.org/freeipa/ticket/4453 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
This commit is contained in:
1 parent
6bb4eea348
commit
6bb240fa2c
1 file changed
+3
-4
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user