#!/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"