Merge pull request #42457 from carlpett/patch-3

win_pki: Don't fail on certs without DnsNames
This commit is contained in:
Mike Place 2017-07-25 13:45:26 -05:00 committed by GitHub
commit c5cd5ee01e

View File

@ -155,7 +155,7 @@ def get_certs(context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE):
if key not in blacklist_keys:
cert_info[key.lower()] = item[key]
cert_info['dnsnames'] = [name['Unicode'] for name in item['DnsNameList']]
cert_info['dnsnames'] = [name.get('Unicode') for name in item.get('DnsNameList', {})]
ret[item['Thumbprint']] = cert_info
return ret