-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (17 loc) · 754 Bytes
/
Makefile
File metadata and controls
22 lines (17 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
all: ca.key ca.pem wildcard.bt.pem localhost.pem
wildcard.bt.pem: ca.key ca.pem
# Due to https://bugzilla.mozilla.org/show_bug.cgi?id=1728009 we need to put the least specific
# wildcards last.
go run -race . gencert '*.ih.bt' '*.pk.bt' '*.ih.bt' '*.bt' > $@
ca.key:
openssl genrsa -out $@
ca.pem: ca.key
openssl req -x509 -new -key $< -out $@ -subj '/CN=btlink root CA' \
# Firefox doesn't like name constraints
# -addext 'nameConstraints=critical, permitted;DNS:bt,permitted;DNS:localhost'
.PHONY: add-trusted-cert
add-trusted-cert: ca.pem
sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" ca.pem
# Generates a certificate for an arbitrary domain
%.pem: ca.key ca.pem
godo -race . gencert $* $* > $@