Fixing an assumption that 'subAltNames' are always passed to the API.

This commit is contained in:
kevgliss 2016-01-10 17:22:50 -08:00
parent 4a952d867b
commit 0a4f5ad64d
1 changed files with 5 additions and 3 deletions

View File

@ -78,6 +78,8 @@ def get_domains_from_options(options):
:return: :return:
""" """
domains = [options['commonName']] domains = [options['commonName']]
if options.get('extensions'):
if options['extensions'].get('subAltNames'):
for k, v in options['extensions']['subAltNames']['names']: for k, v in options['extensions']['subAltNames']['names']:
if k == 'DNSName': if k == 'DNSName':
domains.append(v) domains.append(v)