Move WebCrypto parameters under separate dict

This commit is contained in:
Lauri Võsandi 2021-09-29 13:54:49 +03:00
parent 9e3c43588a
commit 073e4274e6

View File

@ -41,11 +41,15 @@ class BootstrapResource(object):
ike=config.get("Globals", "STRONGSWAN_IKE")["value"], ike=config.get("Globals", "STRONGSWAN_IKE")["value"],
esp=config.get("Globals", "STRONGSWAN_ESP")["value"], esp=config.get("Globals", "STRONGSWAN_ESP")["value"],
), ),
webcrypto=dict(
hash_algorithm=HASH_ALGO_MAPPING[authority.certificate.hash_algo],
signature_algorithm=SIGNATURE_ALGO_MAPPING[authority.certificate.signature_algo],
),
certificate=dict( certificate=dict(
key_size=const.KEY_SIZE, key_size=const.KEY_SIZE,
curve=const.CURVE_NAME, curve=const.CURVE_NAME,
hash_algorithm=HASH_ALGO_MAPPING[authority.certificate.hash_algo], hash_algorithm=authority.certificate.hash_algo,
signature_algorithm=SIGNATURE_ALGO_MAPPING[authority.certificate.signature_algo], signature_algorithm=authority.certificate.signature_algo,
algorithm=authority.public_key.algorithm, algorithm=authority.public_key.algorithm,
common_name=authority.certificate.subject.native["common_name"], common_name=authority.certificate.subject.native["common_name"],
distinguished_name=cert_to_dn(authority.certificate), distinguished_name=cert_to_dn(authority.certificate),