diff options
author | jahoti <jahoti@tilde.team> | 2021-09-06 00:00:00 +0000 |
---|---|---|
committer | jahoti <jahoti@tilde.team> | 2021-09-06 00:00:00 +0000 |
commit | b1444d9c9ea065d7c97d5809c3ec5259cb01a1da (patch) | |
tree | 0ebd245fb1ffa77a3488a9445869c8d773cacd88 /test/init.sh | |
parent | 5dab077b9bb7564f2c556b197c5c416c41783112 (diff) | |
download | browser-extension-b1444d9c9ea065d7c97d5809c3ec5259cb01a1da.tar.gz browser-extension-b1444d9c9ea065d7c97d5809c3ec5259cb01a1da.zip |
Incorporate test suite from jahoti branch
Diffstat (limited to 'test/init.sh')
-rwxr-xr-x | test/init.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/init.sh b/test/init.sh new file mode 100755 index 0000000..5a8d198 --- /dev/null +++ b/test/init.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Copyright (C) 2021 jahoti <jahoti@tilde.team> +# Licensing information is collated in the `copyright` file + +# Initialize the root certificate for the tests proxy server +# Make sure this is run in the directory where they will be put! + +gen_keys () { + while [ -n "$1" ]; do + openssl genrsa -out "${1}".key 4096 + done +} + +if [ -n "$1" ]; then + cd "$1" +fi +gen_keys ca cert +openssl req -new -x509 -days ${2:-183} -key ca.key -out ca.crt -subj "/CN=Hachette Test" |