Merge branch 'hainish-take2' into 'master'
usar hainish See merge request sutty/sutty.local!1
This commit is contained in:
commit
a853008628
14
Makefile
14
Makefile
@ -11,6 +11,8 @@ ca_key ?= ca/key.key
|
||||
ca_crt ?= ca/crt.crt
|
||||
ca_tpl ?= templates/ca.tpl
|
||||
|
||||
hainish ?= ../haini.sh/haini.sh
|
||||
|
||||
domain_key ?= domain/$(domain).key
|
||||
domain_csr ?= domain/$(domain).csr
|
||||
domain_crt ?= domain/$(domain).crt
|
||||
@ -29,27 +31,27 @@ templates/%.tpl: templates/%.tpl.in
|
||||
# Generate private keys
|
||||
%.key:
|
||||
mkdir -p $(dir $@)
|
||||
certtool --generate-privkey --ask-pass --sec-param medium --outfile $@
|
||||
$(hainish) "cd /Sutty/sutty.local && certtool --generate-privkey --ask-pass --sec-param medium --outfile $@"
|
||||
chmod 600 $@
|
||||
|
||||
# Generates a self-signed key for the CA
|
||||
$(ca_crt): $(ca_key)
|
||||
certtool --generate-self-signed \
|
||||
$(hainish) "cd /Sutty/sutty.local && certtool --generate-self-signed \
|
||||
--load-privkey $< \
|
||||
--template $(ca_tpl) \
|
||||
--outfile $@
|
||||
--outfile $@"
|
||||
|
||||
# Generates a certificate signing request
|
||||
domain/%.csr: $(domain_tpl)
|
||||
certtool --generate-request --load-privkey $(domain_key) --outfile $@ --template $<
|
||||
$(hainish) "cd /Sutty/sutty.local && certtool --generate-request --load-privkey $(domain_key) --outfile $@ --template $<"
|
||||
|
||||
# Generates a site certificate
|
||||
domain/%.crt:
|
||||
certtool --generate-certificate --load-request $(domain_csr) \
|
||||
$(hainish) "cd /Sutty/sutty.local && certtool --generate-certificate --load-request $(domain_csr) \
|
||||
--load-ca-certificate $(ca_crt) \
|
||||
--load-ca-privkey $(ca_key) \
|
||||
--template $(domain_tpl) \
|
||||
--outfile $@
|
||||
--outfile $@"
|
||||
|
||||
ca: $(ca_key) $(ca_crt) ## Generate the CA keypair
|
||||
install-ca: $(ca_crt) ## Install the CA on system
|
||||
|
Loading…
x
Reference in New Issue
Block a user