This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
67 lines (53 loc) · 1.73 KB
/
Makefile
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
61
62
63
64
65
66
67
# SPDX-FileCopyrightText: 2024 Jomco B.V.
# SPDX-FileCopyrightText: 2024 Topsector Logistiek
# SPDX-FileContributor: Joost Diepenmaat <joost@jomco.nl
# SPDX-FileContributor: Remco van 't Veer <remco@jomco.nl>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
.PHONY: all lint test check clean test-certs jar
test/pem/ca.cert.pem:
mkdir -p test/pem
openssl req \
-x509 -newkey rsa:4096 -sha256 -days 365 -noenc \
-subj "/CN=TEST-CA" \
-keyout test/pem/ca.key.pem \
-out test/pem/ca.cert.pem
test/pem/aa.cert.pem: test/pem/ca.cert.pem
openssl req \
-x509 -newkey rsa:4096 -sha256 -days 365 -noenc \
-subj "/CN=Satellite/serialNumber=EU.EORI.AA" \
-keyout test/pem/aa.key.pem \
-out test/pem/aa.cert.pem \
-CA test/pem/ca.cert.pem \
-CAkey test/pem/ca.key.pem
test/pem/ar.cert.pem: test/pem/ca.cert.pem
openssl req \
-x509 -newkey rsa:4096 -sha256 -days 365 -noenc \
-subj "/CN=Satellite/serialNumber=EU.EORI.AR" \
-keyout test/pem/ar.key.pem \
-out test/pem/ar.cert.pem \
-CA test/pem/ca.cert.pem \
-CAkey test/pem/ca.key.pem
test/pem/client.cert.pem: test/pem/ca.cert.pem
openssl req \
-x509 -newkey rsa:4096 -sha256 -days 365 -noenc \
-keyout test/pem/client.key.pem \
-out test/pem/client.cert.pem \
-subj "/CN=Satellite/serialNumber=EU.EORI.CLIENT" \
-CA test/pem/ca.cert.pem \
-CAkey test/pem/ca.key.pem
test/pem/client.x5c.pem: test/pem/client.cert.pem test/pem/ca.cert.pem
cat $^ >$@
test-certs: test/pem/ca.cert.pem test/pem/aa.cert.pem test/pem/client.cert.pem test/pem/client.x5c.pem test/pem/ar.cert.pem
lint:
reuse lint
clojure -M:lint
test: test-certs
clojure -M:test
clean:
rm -rf classes target test/pem
jar: clean
clj -T:build jar
check: test lint outdated
outdated:
clojure -M:outdated