Repository navigation
Expand file tree
/
Copy pathMakefile.am
More file actions
300 lines (269 loc) · 10.8 KB
/
Copy pathMakefile.am
File metadata and controls
300 lines (269 loc) · 10.8 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
## SPDX-License-Identifier: GPL-3.0-or-later
ACLOCAL_AMFLAGS = -I m4
# -I$(top_builddir) picks up the generated wolfcert/options.h.
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(WOLFSSL_CFLAGS) \
$(WOLFCERT_USER_SETTINGS_CPPFLAGS)
AM_CFLAGS = -Wall -Wextra -Wshadow $(WOLFCERT_OPT_CFLAGS)
lib_LTLIBRARIES = libwolfcert.la
libwolfcert_la_SOURCES = \
src/wolfcert.c \
src/version.c \
src/errors.c \
src/internal.c \
src/internal.h \
src/key_algs.c \
src/key_algs.h \
src/keygen.c \
src/csr.c \
src/store.c \
src/http.c \
src/client.c
if WOLFCERT_HAVE_BUILTIN_TRANSPORT
libwolfcert_la_SOURCES += src/net_posix.c
endif
if WOLFCERT_BUILD_TESTS
AM_CPPFLAGS += -DWOLFCERT_BUILD_TESTING=1
endif
if WOLFCERT_HAVE_EST
libwolfcert_la_SOURCES += src/pkcs7_util.c src/est/est_client.c src/est/csr_attrs.c
endif
if WOLFCERT_HAVE_SCEP
libwolfcert_la_SOURCES += src/scep/scep_client.c src/scep/scep_msg.c
if !WOLFCERT_HAVE_EST
libwolfcert_la_SOURCES += src/pkcs7_util.c
endif
endif
if WOLFCERT_HAVE_SERVER
libwolfcert_la_SOURCES += src/server.c src/ca_issue.c
if WOLFCERT_HAVE_EST
libwolfcert_la_SOURCES += src/est/est_server.c
endif
if WOLFCERT_HAVE_SCEP
libwolfcert_la_SOURCES += src/scep/scep_server.c
endif
endif
libwolfcert_la_LIBADD = $(WOLFSSL_LIBS)
libwolfcert_la_LDFLAGS = -version-info 0:0:0 -no-undefined
wolfcertincludedir = $(includedir)/wolfcert
wolfcertinclude_HEADERS = \
wolfcert/wolfcert.h \
wolfcert/api.h \
wolfcert/check_config.h \
wolfcert/version.h \
wolfcert/errors.h \
wolfcert/status.h \
wolfcert/log.h \
wolfcert/memory.h \
wolfcert/types.h \
wolfcert/keygen.h \
wolfcert/csr.h \
wolfcert/store.h \
wolfcert/http.h \
wolfcert/est.h \
wolfcert/scep.h \
wolfcert/client.h \
wolfcert/server.h
if !WOLFCERT_USER_SETTINGS
nodist_wolfcertinclude_HEADERS = wolfcert/options.h
endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = wolfcert.pc
# CMake package-config files for find_package(wolfCert).
if CMAKE_INSTALL
cmakedir = $(libdir)/cmake/wolfCert
cmake_DATA = cmake/wolfCertConfig.cmake \
cmake/wolfCertConfigVersion.cmake \
cmake/wolfCertTargets.cmake
endif
bin_PROGRAMS =
if WOLFCERT_BUILD_CLI
bin_PROGRAMS += wolfcert-client
wolfcert_client_SOURCES = cli/wolfcert_client.c
wolfcert_client_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
if WOLFCERT_HAVE_SERVER
bin_PROGRAMS += wolfcert-server
wolfcert_server_SOURCES = cli/wolfcert_server.c
wolfcert_server_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
WOLFCERT_TEST_SERVER = $(abs_builddir)/wolfcert-server
endif
endif
if WOLFCERT_BUILD_TESTS
check_PROGRAMS = \
test_smoke test_keygen test_csr test_store test_http test_transport \
test_parse_negative test_tls_http
if WOLFCERT_HAVE_BUILTIN_TRANSPORT
check_PROGRAMS += test_net
endif
test_smoke_SOURCES = tests/unit/test_smoke.c
test_smoke_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_keygen_SOURCES = tests/unit/test_keygen.c
test_keygen_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
test_csr_SOURCES = tests/unit/test_csr.c
test_csr_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_csr_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
test_store_SOURCES = tests/unit/test_store.c
test_store_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
test_transport_SOURCES = tests/unit/test_transport.c
test_transport_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_transport_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
test_net_SOURCES = tests/unit/test_net.c
test_net_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_net_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
test_http_SOURCES = tests/unit/test_http.c
test_http_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_http_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_parse_negative_SOURCES = tests/unit/test_parse_negative.c
test_parse_negative_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_parse_negative_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
test_tls_http_SOURCES = tests/integration/test_tls_http.c
test_tls_http_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
if WOLFCERT_HAVE_EST
check_PROGRAMS += test_est test_csr_attrs
test_est_SOURCES = tests/unit/test_est.c
test_est_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_est_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_csr_attrs_SOURCES = tests/unit/test_csr_attrs.c
test_csr_attrs_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
if WOLFCERT_HAVE_SERVER
check_PROGRAMS += test_est_roundtrip test_est_tls_roundtrip test_est_mtls_roundtrip \
test_est_pha_roundtrip test_est_async_roundtrip \
test_est_csr_attrs_roundtrip test_est_csr_attrs_apply_roundtrip \
test_est_csr_attrs_enforce test_est_chunked_robustness \
test_est_pending_roundtrip test_est_mldsa_roundtrip
test_est_roundtrip_SOURCES = tests/integration/test_est_roundtrip.c
test_est_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_tls_roundtrip_SOURCES = tests/integration/test_est_tls_roundtrip.c
test_est_tls_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_mtls_roundtrip_SOURCES = tests/integration/test_est_mtls_roundtrip.c
test_est_mtls_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_mldsa_roundtrip_SOURCES = tests/integration/test_est_mldsa_roundtrip.c
test_est_mldsa_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_pha_roundtrip_SOURCES = tests/integration/test_est_pha_roundtrip.c
test_est_pha_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_async_roundtrip_SOURCES = tests/integration/test_est_async_roundtrip.c
test_est_async_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_csr_attrs_roundtrip_SOURCES = tests/integration/test_est_csr_attrs_roundtrip.c
test_est_csr_attrs_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_csr_attrs_apply_roundtrip_SOURCES = tests/integration/test_est_csr_attrs_apply_roundtrip.c
test_est_csr_attrs_apply_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_csr_attrs_enforce_SOURCES = tests/integration/test_est_csr_attrs_enforce.c
test_est_csr_attrs_enforce_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_chunked_robustness_SOURCES = tests/integration/test_est_chunked_robustness.c
test_est_chunked_robustness_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_est_pending_roundtrip_SOURCES = tests/integration/test_est_pending_roundtrip.c
test_est_pending_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
endif
endif
if WOLFCERT_HAVE_SCEP
check_PROGRAMS += test_scep_msg
test_scep_msg_SOURCES = tests/unit/test_scep_msg.c
test_scep_msg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_scep_msg_LDADD = libwolfcert.la $(WOLFSSL_LIBS)
if WOLFCERT_HAVE_SERVER
check_PROGRAMS += test_scep_roundtrip test_scep_poll_roundtrip test_scep_async_roundtrip \
test_scep_get_cert
test_scep_roundtrip_SOURCES = tests/integration/test_scep_roundtrip.c
test_scep_roundtrip_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_scep_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_scep_poll_roundtrip_SOURCES = tests/integration/test_scep_poll_roundtrip.c
test_scep_poll_roundtrip_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_scep_poll_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_scep_async_roundtrip_SOURCES = tests/integration/test_scep_async_roundtrip.c
test_scep_async_roundtrip_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_scep_get_cert_SOURCES = tests/integration/test_scep_get_cert.c
test_scep_get_cert_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_scep_get_cert_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
endif
endif
# Protocol-agnostic server tests.
if WOLFCERT_HAVE_SERVER
check_PROGRAMS += test_server_stop_idle test_server_ca_store
test_server_stop_idle_SOURCES = tests/integration/test_server_stop_idle.c
test_server_stop_idle_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_server_stop_idle_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
test_server_ca_store_SOURCES = tests/unit/test_server_ca_store.c
test_server_ca_store_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
test_server_ca_store_LDADD = libwolfcert.la $(WOLFSSL_LIBS) -lpthread
endif
TESTS = $(check_PROGRAMS)
if WOLFCERT_BUILD_CLI
if WOLFCERT_HAVE_EST
if WOLFCERT_HAVE_SCEP
TESTS += tests/integration/cli_proto_scoping.sh
endif
endif
endif
endif
# Must sit outside any conditional.
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_TESTS_ENVIRONMENT = WOLFCERT_CLI=$(abs_builddir)/wolfcert-client; \
export WOLFCERT_CLI; \
WOLFCERT_SERVER=$(WOLFCERT_TEST_SERVER); \
export WOLFCERT_SERVER;
EXTRA_DIST = \
README.md \
AGENTS.md \
CLAUDE.md \
CONTRIBUTING.md \
LICENSE \
docs/ARCHITECTURE.md \
docs/CI.md \
docs/EMBEDDED.md \
docs/INTEROP.md \
docs/MIGRATING-FROM-WOLFSCEP.md \
docs/SBOM.md \
autogen.sh \
CMakeLists.txt \
wolfcert/options.h.in \
examples/user_settings.h.example \
cmake/wolfCertConfig.cmake.in \
cmake/Config.cmake.in \
cmake/wolfCertConfigVersion.cmake.in \
cmake/wolfCertTargets.cmake.in \
cmake/wolfcert.pc.in \
tests/integration/tls_test_util.h \
tests/integration/est_client_cases.h \
tests/integration/cli_proto_scoping.sh
# Zephyr module port
include zephyr/include.am
# SBOM generation, vendored from wolfssl-compliance-tooling
CLEANFILES =
SBOM_PKGNAME = wolfcert
SBOM_LICENSE_FILE = $(srcdir)/LICENSE
SBOM_LICENSE_OVERRIDE = GPL-3.0-or-later
SBOM_DEP_WOLFSSL = yes
SBOM_WOLFSSL_VERSION = $(WOLFCERT_WOLFSSL_VERSION)
if WOLFCERT_USER_SETTINGS
SBOM_OPTIONS_H = $(abs_builddir)/sbom-options.h
SBOM_PREREQS = sbom-options.h
CLEANFILES += sbom-options.h
sbom-options.h:
$(AM_V_GEN)$(PYTHON3) $(srcdir)/scripts/sbom-user-settings.py $@ $(COMPILE)
else
SBOM_OPTIONS_H = $(abs_builddir)/wolfcert/options.h
SBOM_PREREQS =
endif
include tools/sbom/sbom.am
sbom-wolfssl-version:
@test -n "$(SBOM_WOLFSSL_VERSION)" || { \
echo "ERROR: configure could not read the wolfSSL version."; \
echo " Run make sbom SBOM_WOLFSSL_VERSION=X.Y.Z"; \
exit 1; }
.PHONY: sbom-options.h sbom-wolfssl-version
sbom: sbom-wolfssl-version $(SBOM_PREREQS)
EXTRA_DIST += \
scripts/sbom-user-settings.py \
tools/sbom/.wolfssl-compliance-tooling-rev \
tools/sbom/VERSION \
tools/sbom/README.md \
tools/sbom/gen-sbom \
tools/sbom/sbom-driver \
tools/sbom/sbom-driver.py \
tools/sbom/sbom.am \
tools/sbom/validate_sbom.py \
tools/sbom/build/sbom.cmake \
tools/sbom/build/sbom.mk \
tools/sbom/frontends/compdb_sbom.py \
tools/sbom/frontends/iar_sbom.py \
tools/sbom/frontends/zephyr_sbom.py