Last active
August 29, 2015 13:57
-
-
Save bentglasstube/9417688 to your computer and use it in GitHub Desktop.
Makefile for making certificates with openssl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BITSIZE=4096 | |
FILE=server | |
$(FILE).crt: $(FILE).csr | |
@echo "Copy and paste the following into your CA:" | |
@cat $(FILE).csr | |
@echo "Paste the certificate from your CA here (^D to finish):" | |
@cat >$(FILE).crt | |
rm $(FILE).csr | |
$(FILE).csr: $(FILE).key | |
openssl req -new -key $(FILE).key -out $(FILE).csr | |
$(FILE).key: | |
openssl genrsa -des3 -passout pass:x -out $(FILE).pass.key $(BITSIZE) | |
openssl rsa -passin pass:x -in $(FILE).pass.key -out $(FILE).key | |
rm $(FILE).pass.key | |
clean: | |
rm $(FILE).* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment