25 lines
426 B
Makefile
25 lines
426 B
Makefile
ca:
|
|
openssl-3.0 req -x509 -new -nodes \
|
|
-newkey rsa:4096 -keyout pki/ca.key \
|
|
-sha256 -days 3650 -out pki/ca.crt \
|
|
-subj "/CN=MTLS TEST Root CA"
|
|
cp pki/ca.crt pkg/castore/ca.crt
|
|
|
|
server: server-cert
|
|
go build mtls/cmd/server
|
|
|
|
server-cert: ca
|
|
./cert.sh server
|
|
|
|
client: client-cert
|
|
go build mtls/cmd/client
|
|
|
|
client-cert: ca
|
|
./cert.sh client
|
|
|
|
|
|
all: server client
|
|
|
|
clean:
|
|
rm -r pki/* client server pkg/castore/ca.crt
|