commit
8eba97fd14
|
@ -93,9 +93,11 @@ class Authority(db.Model):
|
||||||
if not self.options:
|
if not self.options:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
for option in json.loads(self.options):
|
options_array = json.loads(self.options)
|
||||||
if "name" in option and option["name"] == 'cab_compliant':
|
if isinstance(options_array, list):
|
||||||
return option["value"]
|
for option in options_array:
|
||||||
|
if "name" in option and option["name"] == 'cab_compliant':
|
||||||
|
return option["value"]
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@ def downgrade():
|
||||||
"update certificates set key_type=null where not_after > CURRENT_DATE - 32"
|
"update certificates set key_type=null where not_after > CURRENT_DATE - 32"
|
||||||
)
|
)
|
||||||
op.execute(stmt)
|
op.execute(stmt)
|
||||||
|
commit()
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -21,13 +21,7 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<select class="form-control" ng-model="authority.keyType"
|
<select class="form-control" ng-model="authority.keyType"
|
||||||
ng-options="option.value as option.name for option in [
|
ng-options="option for option in ['RSA2048', 'RSA4096', 'ECCPRIME256V1', 'ECCSECP384R1', 'ECCSECP521R1']"
|
||||||
{'name': 'RSA-2048', 'value': 'RSA2048'},
|
|
||||||
{'name': 'RSA-4096', 'value': 'RSA4096'},
|
|
||||||
{'name': 'ECC-PRIME256V1', 'value': 'ECCPRIME256V1'},
|
|
||||||
{'name': 'ECC-SECP384R1', 'value': 'ECCSECP384R1'},
|
|
||||||
{'name': 'ECC-SECP521R1', 'value': 'ECCSECP521R1'}]"
|
|
||||||
|
|
||||||
ng-init="authority.keyType = 'RSA2048'">
|
ng-init="authority.keyType = 'RSA2048'">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,12 +32,7 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<select class="form-control" ng-model="certificate.keyType"
|
<select class="form-control" ng-model="certificate.keyType"
|
||||||
ng-options="option.value as option.name for option in [
|
ng-options="option for option in ['RSA2048', 'RSA4096', 'ECCPRIME256V1', 'ECCSECP384R1']"
|
||||||
{'name': 'RSA-2048', 'value': 'RSA2048'},
|
|
||||||
{'name': 'RSA-4096', 'value': 'RSA4096'},
|
|
||||||
{'name': 'ECC-PRIME256V1', 'value': 'ECCPRIME256V1'},
|
|
||||||
{'name': 'ECC-SECP384R1', 'value': 'ECCSECP384R1'}]"
|
|
||||||
|
|
||||||
ng-init="certificate.keyType = 'RSA2048'"></select>
|
ng-init="certificate.keyType = 'RSA2048'"></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue