mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-28 01:41:14 -06: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:
parent
6bb4eea348
commit
6bb240fa2c
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user