Prevent potential NoneType not subscriptable
Fix when data['extensions']['subAltNames']['names'] is none
This commit is contained in:
parent
900ae10764
commit
58dd424de8
|
@ -123,7 +123,7 @@ class CertificateInputSchema(CertificateCreationSchema):
|
|||
data['extensions']['subAltNames'] = {
|
||||
'names': []
|
||||
}
|
||||
elif not data['extensions']['subAltNames']['names']:
|
||||
elif not data['extensions']['subAltNames'].get('names'):
|
||||
data['extensions']['subAltNames']['names'] = []
|
||||
data['extensions']['subAltNames']['names'] += csr_sans
|
||||
return missing.convert_validity_years(data)
|
||||
|
|
Loading…
Reference in New Issue