about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-30 17:28:33 -0400
committerJune McEnroe <june@causal.agency>2019-10-30 17:28:33 -0400
commit39bf65ea0ce965fb542451000857594d0a051ead (patch)
treeeb4fd28dd10e457a7cf845536a1f0f4463fd41b2 /Makefile
parentWarn when consumers drop messages (diff)
downloadpounce-39bf65ea0ce965fb542451000857594d0a051ead.tar.gz
pounce-39bf65ea0ce965fb542451000857594d0a051ead.zip
Add make target for localhost.crt
Adapted from <https://letsencrypt.org/docs/certificates-for-localhost/>.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
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