1#***************************************************************************
2#                                  _   _ ____  _
3#  Project                     ___| | | |  _ \| |
4#                             / __| | | | |_) | |
5#                            | (__| |_| |  _ <| |___
6#                             \___|\___/|_| \_\_____|
7#
8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21# SPDX-License-Identifier: curl
22#
23###########################################################################
24AUTOMAKE_OPTIONS = foreign
25
26SUBDIRS = scripts
27
28CERTCONFIGS = \
29  EdelCurlRoot-ca.prm \
30  EdelCurlRoot-ca.cnf \
31  Server-localhost-sv.prm \
32  Server-localhost.nn-sv.prm \
33  Server-localhost0h-sv.prm \
34  Server-localhost-firstSAN-sv.prm \
35  Server-localhost-lastSAN-sv.prm \
36  stunnel-sv.prm
37
38GENERATEDCERTS = \
39  EdelCurlRoot-ca.cacert \
40  EdelCurlRoot-ca.crt \
41  EdelCurlRoot-ca.csr \
42  EdelCurlRoot-ca.der \
43  EdelCurlRoot-ca.key \
44  Server-localhost-sv.crl \
45  Server-localhost-sv.crt \
46  Server-localhost-sv.csr \
47  Server-localhost-sv.der \
48  Server-localhost-sv.dhp \
49  Server-localhost-sv.key \
50  Server-localhost-sv.pem \
51  Server-localhost-sv.pub.der \
52  Server-localhost-sv.pub.pem \
53  Server-localhost.nn-sv.crl \
54  Server-localhost.nn-sv.crt \
55  Server-localhost.nn-sv.csr \
56  Server-localhost.nn-sv.der \
57  Server-localhost.nn-sv.dhp \
58  Server-localhost.nn-sv.key \
59  Server-localhost.nn-sv.pem \
60  Server-localhost.nn-sv.pub.der \
61  Server-localhost.nn-sv.pub.pem \
62  Server-localhost0h-sv.crl \
63  Server-localhost0h-sv.crt \
64  Server-localhost0h-sv.csr \
65  Server-localhost0h-sv.der \
66  Server-localhost0h-sv.dhp \
67  Server-localhost0h-sv.key \
68  Server-localhost0h-sv.pem \
69  Server-localhost0h-sv.pub.der \
70  Server-localhost0h-sv.pub.pem \
71  Server-localhost-firstSAN-sv.crl \
72  Server-localhost-firstSAN-sv.crt \
73  Server-localhost-firstSAN-sv.csr \
74  Server-localhost-firstSAN-sv.der \
75  Server-localhost-firstSAN-sv.dhp \
76  Server-localhost-firstSAN-sv.key \
77  Server-localhost-firstSAN-sv.pem \
78  Server-localhost-firstSAN-sv.pub.der \
79  Server-localhost-firstSAN-sv.pub.pem \
80  Server-localhost-lastSAN-sv.crl \
81  Server-localhost-lastSAN-sv.crt \
82  Server-localhost-lastSAN-sv.csr \
83  Server-localhost-lastSAN-sv.der \
84  Server-localhost-lastSAN-sv.dhp \
85  Server-localhost-lastSAN-sv.key \
86  Server-localhost-lastSAN-sv.pem \
87  Server-localhost-lastSAN-sv.pub.der \
88  Server-localhost-lastSAN-sv.pub.pem \
89  stunnel-sv.crl \
90  stunnel-sv.crt \
91  stunnel-sv.csr \
92  stunnel-sv.der \
93  stunnel-sv.dhp \
94  stunnel-sv.key \
95  stunnel-sv.pem \
96  stunnel-sv.der \
97  stunnel-sv.pub.pem
98
99SRPFILES = \
100  srp-verifier-conf \
101  srp-verifier-db
102
103EXTRA_DIST = $(CERTCONFIGS) $(GENERATEDCERTS) $(SRPFILES)
104
105# Rebuild the certificates
106
107clean-certs:
108	cd $(srcdir); rm -f $(GENERATEDCERTS)
109
110build-certs: $(srcdir)/EdelCurlRoot-ca.cacert $(srcdir)/Server-localhost-sv.pem \
111	$(srcdir)/Server-localhost.nn-sv.pem $(srcdir)/Server-localhost0h-sv.pem \
112	$(srcdir)/Server-localhost-firstSAN-sv.pem $(srcdir)/Server-localhost-lastSAN-sv.pem \
113	$(srcdir)/stunnel-sv.pem ../stunnel.pem
114
115$(srcdir)/EdelCurlRoot-ca.cacert:
116	cd $(srcdir); scripts/genroot.sh EdelCurlRoot
117
118$(srcdir)/Server-localhost-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
119	cd $(srcdir); scripts/genserv.sh Server-localhost EdelCurlRoot
120
121$(srcdir)/Server-localhost.nn-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
122	cd $(srcdir); scripts/genserv.sh Server-localhost.nn EdelCurlRoot
123
124$(srcdir)/Server-localhost0h-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
125	cd $(srcdir); scripts/genserv.sh Server-localhost0h EdelCurlRoot
126
127$(srcdir)/Server-localhost-firstSAN-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
128	cd $(srcdir); scripts/genserv.sh Server-localhost-firstSAN EdelCurlRoot
129
130$(srcdir)/Server-localhost-lastSAN-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
131	cd $(srcdir); scripts/genserv.sh Server-localhost-lastSAN EdelCurlRoot
132
133$(srcdir)/stunnel-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
134	cd $(srcdir); scripts/genserv.sh stunnel EdelCurlRoot
135
136../stunnel.pem: $(srcdir)/stunnel-sv.pem
137	cp $< $@
138