Merge pull request #210 from kevgliss/hotfix
Fixes an assumption that 'subAltNames' are always passed to the API.
This commit is contained in:
commit
7c2862c958
|
@ -78,9 +78,11 @@ def get_domains_from_options(options):
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
domains = [options['commonName']]
|
domains = [options['commonName']]
|
||||||
for k, v in options['extensions']['subAltNames']['names']:
|
if options.get('extensions'):
|
||||||
if k == 'DNSName':
|
if options['extensions'].get('subAltNames'):
|
||||||
domains.append(v)
|
for k, v in options['extensions']['subAltNames']['names']:
|
||||||
|
if k == 'DNSName':
|
||||||
|
domains.append(v)
|
||||||
return domains
|
return domains
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue