Modify makefile to create 2 separate client certs.
This commit is contained in:
parent
bf7eecd29b
commit
5a08a023dd
1 changed files with 17 additions and 4 deletions
21
Makefile
21
Makefile
|
|
@ -2,7 +2,7 @@ CONFIG_PATH=${HOME}/.proglog/
|
|||
|
||||
.PHONY: init
|
||||
init:
|
||||
mkdir -p ${CONFIG_PATH}
|
||||
mkdir -p $(CONFIG_PATH)
|
||||
|
||||
.PHONY: gencert
|
||||
gencert:
|
||||
|
|
@ -21,9 +21,16 @@ gencert:
|
|||
-ca-key=ca-key.pem \
|
||||
-config=certs/ca-config.json \
|
||||
-profile=client \
|
||||
certs/client-csr.json | cfssljson -bare client
|
||||
certs/client-csr.json | cfssljson -bare root-client
|
||||
|
||||
mv *.pem *.csr ${CONFIG_PATH}
|
||||
cfssl gencert \
|
||||
-ca=ca.pem \
|
||||
-ca-key=ca-key.pem \
|
||||
-config=certs/ca-config.json \
|
||||
-profile=client \
|
||||
certs/client-csr.json | cfssljson -bare nobody-client
|
||||
|
||||
mv *.pem *.csr $(CONFIG_PATH)
|
||||
|
||||
.PHONY: compile
|
||||
compile:
|
||||
|
|
@ -34,6 +41,12 @@ compile:
|
|||
--go-grpc_opt=paths=source_relative \
|
||||
--proto_path=.
|
||||
|
||||
$(CONFIG_PATH)/model.conf: test/model.conf
|
||||
cp test/model.conf $(CONFIG_PATH)/model.conf
|
||||
|
||||
$(CONFIG_PATH)/policy.csv: test/policy.csv
|
||||
cp test/policy.csv $(CONFIG_PATH)/policy.csv
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
test: $(CONFIG_PATH)/model.conf $(CONFIG_PATH)/policy.csv
|
||||
go test -race ./...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue