From b1444d9c9ea065d7c97d5809c3ec5259cb01a1da Mon Sep 17 00:00:00 2001 From: jahoti Date: Mon, 6 Sep 2021 00:00:00 +0000 Subject: Incorporate test suite from jahoti branch --- test/init.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 test/init.sh (limited to 'test/init.sh') 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 +# 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" -- cgit v1.2.3