forked from italia/spid-compliant-certificates-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
94 lines (77 loc) · 2.29 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
REPO=local/spid-compliant-certificates
GIT_COMMIT=$(shell git log --pretty=format:'%h' -1)
default: install
flake8:
flake8 bin/* spid_compliant_certificates/*.py setup.py
isort-diff:
isort bin/* spid_compliant_certificates/*.py setup.py --diff
isort:
isort bin/* spid_compliant_certificates/*.py setup.py
cleanup:
rm -fr *.pem
install:
pip install .
public: install cleanup
spid-compliant-certificates generator \
--key-size 3072 \
--common-name "AgID" \
--days 365 \
--entity-id https://spid.agid.gov.it \
--locality-name Roma \
--org-id "PA:IT-c_h501" \
--org-name "Agenzia per l'Italia Digitale" \
--sector public
private: install cleanup
spid-compliant-certificates generator \
--key-size 3072 \
--common-name "AgID" \
--days 365 \
--entity-id https://spid.agid.gov.it \
--locality-name Roma \
--org-id "VATIT-12345678901" \
--org-name "Agenzia per l'Italia Digitale" \
--sector private
validate-public:
spid-compliant-certificates validator --out-file report.json
validate-private:
spid-compliant-certificates validator --sector private --out-file report.json
docker-build:
docker build --tag $(REPO):$(GIT_COMMIT) .
docker-prepare:
mkdir -pv certs
docker-gpub: docker-build docker-prepare
docker run -ti --rm -v "$(shell pwd)/certs:/certs" \
$(REPO):$(GIT_COMMIT) \
generator \
--key-size 3072 \
--common-name "A.C.M.E" \
--days 365 \
--entity-id "https://spid.acme.it" \
--locality-name "Roma" \
--org-id "PA:IT-c_h501" \
--org-name "A Company Making Everything" \
--sector public
docker-vpub: docker-build docker-prepare
docker run -ti --rm -v "$(shell pwd)/certs:/certs" \
$(REPO):$(GIT_COMMIT) \
validator \
--sector public
docker-gpriv: docker-build docker-prepare
docker run -ti --rm -v "$(shell pwd)/certs:/certs" \
$(REPO):$(GIT_COMMIT) \
generator \
--key-size 3072 \
--common-name "A.C.M.E" \
--days 365 \
--entity-id "https://spid.acme.it" \
--locality-name "Roma" \
--org-id "VATIT-12345678901" \
--org-name "A Company Making Everything" \
--sector private
docker-vpriv: docker-build docker-prepare
docker run -ti --rm -v "$(shell pwd)/certs:/certs" \
$(REPO):$(GIT_COMMIT) \
validator \
--sector private
docker-lint:
docker run --rm -i hadolint/hadolint < Dockerfile