feat: add tls
This commit is contained in:
22
Makefile
22
Makefile
@@ -44,3 +44,25 @@ openapi:
|
||||
--openapiv2_out ./gen/openapi2 \
|
||||
--openapiv2_opt logtostderr=true \
|
||||
/protos/echo/v1/echo.proto
|
||||
|
||||
certs:
|
||||
openssl genrsa -out ca.key 2048
|
||||
openssl req -new -x509 -days 3650 \
|
||||
-subj "/C=GB/L=China/O=gobook/CN=github.com" \
|
||||
-key ca.key -out ca.crt
|
||||
openssl req -new \
|
||||
-subj "/C=GB/L=China/O=server/CN=server.io" \
|
||||
-key server.key \
|
||||
-out server.csr
|
||||
openssl x509 -req -sha256 \
|
||||
-CA ca.crt -CAkey ca.key -CAcreateserial -days 3650 \
|
||||
-in server.csr \
|
||||
-out server.crt
|
||||
openssl req -new \
|
||||
-subj "/C=GB/L=China/O=client/CN=client.io" \
|
||||
-key client.key \
|
||||
-out client.csr
|
||||
openssl x509 -req -sha256 \
|
||||
-CA ca.crt -CAkey ca.key -CAcreateserial -days 3650 \
|
||||
-in client.csr \
|
||||
-out client.crt
|
Reference in New Issue
Block a user