| Date: Sun, 7 Jun 2020 19:02:49 +0200
Add script to generate a self-signed certificate and key for testing.
Diffstat:
A tls-gen-selfsign-cert.sh | 14 ++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)
--- |
| @@ -0,0 +1,14 @@
+#!/bin/sh
+
+keyfile="geomyidae.key"
+csrfile="geomyidae.csr"
+certfile="geomyidae.crt"
+
+# Generate the private key.
+openssl genrsa -out "${keyfile}" 4096
+# Generate signing request.
+openssl req -new -key "${keyfile}" -out "${csrfile}"
+# Sign the request ourself.
+openssl x509 -sha256 -req -days 365 -in "${csrfile}" \
+ -signkey "${keyfile}" -out "${certfile}"
+ |