From 073e4274e6711d6237280958419eaf9211fc0464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Wed, 29 Sep 2021 13:54:49 +0300 Subject: [PATCH] Move WebCrypto parameters under separate dict --- pinecrypt/server/api/bootstrap.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pinecrypt/server/api/bootstrap.py b/pinecrypt/server/api/bootstrap.py index 013ffb2..77d109a 100644 --- a/pinecrypt/server/api/bootstrap.py +++ b/pinecrypt/server/api/bootstrap.py @@ -41,11 +41,15 @@ class BootstrapResource(object): ike=config.get("Globals", "STRONGSWAN_IKE")["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( key_size=const.KEY_SIZE, curve=const.CURVE_NAME, - hash_algorithm=HASH_ALGO_MAPPING[authority.certificate.hash_algo], - signature_algorithm=SIGNATURE_ALGO_MAPPING[authority.certificate.signature_algo], + hash_algorithm=authority.certificate.hash_algo, + signature_algorithm=authority.certificate.signature_algo, algorithm=authority.public_key.algorithm, common_name=authority.certificate.subject.native["common_name"], distinguished_name=cert_to_dn(authority.certificate),