Project

General

Profile

Download (479 Bytes) Statistics
| Branch: | Tag: | Revision:

haketilo / test / init.sh @ b1444d9c

1
#!/bin/sh
2
#
3
# Copyright (C) 2021 jahoti <jahoti@tilde.team>
4
# Licensing information is collated in the `copyright` file
5

    
6
# Initialize the root certificate for the tests proxy server
7
# Make sure this is run in the directory where they will be put!
8

    
9
gen_keys () {
10
    while [ -n "$1" ]; do
11
	openssl genrsa -out "${1}".key 4096
12
    done
13
}
14

    
15
if [ -n "$1" ]; then
16
    cd "$1"
17
fi
18
gen_keys ca cert
19
openssl req -new -x509 -days ${2:-183} -key ca.key -out ca.crt -subj "/CN=Hachette Test"
(2-2/6)