Replace shell script with a python3 script.

Updated the shell script that generates the certificates and the
documentation accordingly.
Caveat: now installation is a 2-step procedure, installing OS and
application are split into 2 commands.
This commit is contained in:
Jean-Michel Picod
2020-02-19 11:34:43 +01:00
parent 51f201653c
commit 7d421d3ae0
5 changed files with 576 additions and 418 deletions

8
tools/gen_key_materials.sh Normal file → Executable file
View File

@@ -23,9 +23,6 @@ generate_crypto_materials () {
local opensk_key=crypto_data/opensk.key
local opensk_cert_name=crypto_data/opensk_cert
# Rust file that we will generate will all cryptographic data.
local rust_file=src/ctap/key_material.rs
# Allow invoker to override the command with a full path.
local openssl=${OPENSSL:-$(which openssl)}
@@ -36,6 +33,9 @@ generate_crypto_materials () {
exit 1
fi
# Exit on first error
set -e
force_generate="$1"
mkdir -p crypto_data
if [ ! -f "${ca_priv_key}" ]
@@ -85,3 +85,5 @@ generate_crypto_materials () {
-sha256
fi
}
generate_crypto_materials "$1"