From 39bf65ea0ce965fb542451000857594d0a051ead Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 30 Oct 2019 17:28:33 -0400 Subject: Add make target for localhost.crt Adapted from . --- .gitignore | 3 ++- Makefile | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c8c6546..ab1ddcf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.conf *.o -*.pem config.mk +localhost.crt +localhost.key pounce tags diff --git a/Makefile b/Makefile index 6af3477..c0b8323 100644 --- a/Makefile +++ b/Makefile @@ -39,3 +39,9 @@ install: pounce pounce.1 rc.pounce uninstall: rm -f ${PREFIX}/bin/pounce ${MANDIR}/man1/pounce.1 ${ETCDIR}/rc.d/pounce + +localhost.crt: + printf "[dn]\nCN=localhost\n[req]\ndistinguished_name=dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth" \ + | openssl req -x509 -out localhost.crt -keyout localhost.key \ + -newkey rsa:2048 -nodes -sha256 \ + -subj '/CN=localhost' -extensions EXT -config /dev/fd/0 -- cgit 1.4.1