mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -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
|
# FIXME, this relies on NSS never changing the formatting of certutil
|
||||||
certlist = []
|
certlist = []
|
||||||
for cert in certs:
|
for cert in certs:
|
||||||
nickname = cert[0:61]
|
match = re.match(r'^(.+?)\s+(\w*,\w*,\w*)\s*$', cert)
|
||||||
trust = cert[61:]
|
if match:
|
||||||
if re.match(r'\w*,\w*,\w*', trust):
|
certlist.append(match.groups())
|
||||||
certlist.append((nickname.strip(), trust.strip()))
|
|
||||||
|
|
||||||
return tuple(certlist)
|
return tuple(certlist)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user