-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild
More file actions
executable file
·60 lines (44 loc) · 1.34 KB
/
build
File metadata and controls
executable file
·60 lines (44 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
set -o pipefail
set -eu
rm -rf certs proxy-certs
mkdir -p bin certs proxy-certs
go build -o bin/client ./cmd/client
go build -o bin/server ./cmd/server
go build -o bin/client-proxy ./cmd/client-proxy
go build -o bin/server-proxy ./cmd/server-proxy
go build -o bin/certstrap github.com/square/certstrap
## set up certs for endpoints
bin/certstrap --depot-path=certs init \
--common-name "ca" \
--passphrase '' \
--key-bits 2048
bin/certstrap --depot-path=certs request-cert \
--common-name "client" \
--passphrase '' \
--key-bits 2048 \
--ip 127.0.0.11
bin/certstrap --depot-path=certs sign client --CA ca
bin/certstrap --depot-path=certs request-cert \
--common-name "server" \
--passphrase '' \
--key-bits 2048 \
--ip 127.0.0.12
bin/certstrap --depot-path=certs sign server --CA ca
## set up certs for proxies
bin/certstrap --depot-path=certs init \
--common-name "proxy-ca" \
--passphrase '' \
--key-bits 2048
bin/certstrap --depot-path=certs request-cert \
--common-name "client-proxy" \
--passphrase '' \
--key-bits 2048 \
--ip 127.0.0.21
bin/certstrap --depot-path=certs sign client-proxy --CA proxy-ca
bin/certstrap --depot-path=certs request-cert \
--common-name "server-proxy" \
--passphrase '' \
--key-bits 2048 \
--ip 127.0.0.22
bin/certstrap --depot-path=certs sign server-proxy --CA proxy-ca