add test script
This commit is contained in:
parent
bb9f73a4ea
commit
1b62158977
10
README.md
10
README.md
@ -51,3 +51,13 @@ self-signed CA.
|
||||
- The CA cert will be valid for 3650 days (10 years).
|
||||
- The server cert will be valid for 365 days (1 year).
|
||||
- The x509 certs are ECDSA with prime256v1 curve and SHA256 signatures.
|
||||
|
||||
## Testing
|
||||
|
||||
I have added a simplistic script [testme.sh](testme.sh) that helps to test this
|
||||
script in the following Linux distributions:
|
||||
|
||||
- Alpine 3.7
|
||||
- Ubuntu Bionic
|
||||
- Debian Stretch
|
||||
- CentOS 7
|
||||
|
18
testme.sh
Executable file
18
testme.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
TMPDIR="$(mktemp -d)"
|
||||
cp -v gencert.sh "${TMPDIR}/"
|
||||
pushd "${TMPDIR}"
|
||||
|
||||
for DISTRO in alpine:3.7 ubuntu:bionic debian:stretch centos:7; do
|
||||
printf "\n\n\nTesting the script with ${DISTRO} ...\n\n\n"
|
||||
rm -vf openssl.cnf private.key public.crt ca.crt ca.key ca.srl
|
||||
docker run --rm -ti -v ${PWD}:/w -w /w ${DISTRO} sh gencert.sh --cn test.example.com
|
||||
printf "\n\n\n"
|
||||
done
|
||||
|
||||
popd
|
||||
echo "WARNING, I am going to remove ${TMPDIR} entirely in 5 seconds!"
|
||||
sleep 5
|
||||
rm -rf "${TMPDIR}"
|
Loading…
Reference in New Issue
Block a user