Last active
February 15, 2016 15:39
-
-
Save yrcjaya/f6b99e1ed8ac0a7e2160 to your computer and use it in GitHub Desktop.
Make CSR
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
DOMAIN=example.com | |
.PHONY: help csr | |
$(DOMAIN).key: | |
openssl genrsa -out $(DOMAIN).key 2048 | |
@echo "Generated SSL key, keep this safe for future use" | |
$(DOMAIN).csr: $(DOMAIN).key | |
openssl req -new -key $(DOMAIN).key -out $(DOMAIN).csr | |
csr: $(DOMAIN).csr | |
selfsign: | |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfsign.key -out selfsign.crt | |
help: | |
@echo "Generate Certificate Signing Request for SSL certificate: " | |
@echo "make csr - Create Signing Request for $(DOMAIN)." | |
@echo "make selfsign - Create self signed cert(for testing only)." | |
# Default target is help | |
.DEFAULT_GOAL := help |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment