1 include $(top_srcdir)/Makefile.am.common
3 lib_LTLIBRARIES = libhx509.la
4 libhx509_la_LDFLAGS = -version-info 5:0:0
8 $(gen_files_ocsp:.x=.c) \
9 $(gen_files_pkcs10:.x=.c) \
14 asn1_OCSPBasicOCSPResponse.x \
16 asn1_OCSPCertStatus.x \
17 asn1_OCSPInnerRequest.x \
20 asn1_OCSPResponderID.x \
22 asn1_OCSPResponseBytes.x \
23 asn1_OCSPResponseData.x \
24 asn1_OCSPResponseStatus.x \
25 asn1_OCSPSignature.x \
26 asn1_OCSPSingleResponse.x \
27 asn1_OCSPTBSRequest.x \
30 asn1_id_pkix_ocsp_basic.x \
31 asn1_id_pkix_ocsp_nonce.x
34 asn1_CertificationRequestInfo.x \
35 asn1_CertificationRequest.x
38 asn1_CRMFRDNSequence.x \
39 asn1_CertReqMessages.x \
47 asn1_POPOSigningKey.x \
48 asn1_POPOSigningKeyInput.x \
49 asn1_ProofOfPossession.x \
50 asn1_SubsequentMessage.x
54 dist_libhx509_la_SOURCES = \
90 libhx509_la_DEPENDENCIES = version-script.map
92 libhx509_la_LIBADD = \
95 $(top_builddir)/lib/asn1/libasn1.la \
96 $(top_builddir)/lib/wind/libwind.la \
97 $(top_builddir)/lib/base/libheimbase.la \
101 if FRAMEWORK_SECURITY
102 libhx509_la_LDFLAGS += -framework Security -framework CoreFoundation
106 libhx509_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
108 $(libhx509_la_OBJECTS): $(srcdir)/version-script.map $(nodist_include_HEADERS) $(priv_headers)
110 libhx509_la_CPPFLAGS = -I$(srcdir)/ref $(INCLUDE_hcrypto)
111 nodist_libhx509_la_SOURCES = $(BUILT_SOURCES)
113 $(gen_files_ocsp) ocsp_asn1.hx ocsp_asn1-priv.hx: ocsp_asn1_files
114 $(gen_files_pkcs10) pkcs10_asn1.hx pkcs10_asn1-priv.hx: pkcs10_asn1_files
115 $(gen_files_crmf) crmf_asn1.hx crmf_asn1-priv.hx: crmf_asn1_files
117 dist_include_HEADERS = hx509.h $(srcdir)/hx509-protos.h
119 noinst_HEADERS = $(srcdir)/hx509-private.h
121 nodist_include_HEADERS = hx509_err.h
122 nodist_include_HEADERS += ocsp_asn1.h
123 nodist_include_HEADERS += pkcs10_asn1.h
124 nodist_include_HEADERS += crmf_asn1.h
126 priv_headers = ocsp_asn1-priv.h
127 priv_headers += pkcs10_asn1-priv.h
128 priv_headers += crmf_asn1-priv.h
131 ocsp_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/ocsp.asn1 $(srcdir)/ocsp.opt
132 $(heim_verbose)$(ASN1_COMPILE) --option-file=$(srcdir)/ocsp.opt $(srcdir)/ocsp.asn1 ocsp_asn1 || (rm -f ocsp_asn1_files ; exit 1)
134 pkcs10_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/pkcs10.asn1 $(srcdir)/pkcs10.opt
135 $(heim_verbose)$(ASN1_COMPILE) --option-file=$(srcdir)/pkcs10.opt $(srcdir)/pkcs10.asn1 pkcs10_asn1 || (rm -f pkcs10_asn1_files ; exit 1)
137 crmf_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/crmf.asn1
138 $(heim_verbose)$(ASN1_COMPILE) $(srcdir)/crmf.asn1 crmf_asn1 || (rm -f crmf_asn1_files ; exit 1)
140 ALL_OBJECTS = $(libhx509_la_OBJECTS)
141 ALL_OBJECTS += $(hxtool_OBJECTS)
143 HX509_PROTOS = $(srcdir)/hx509-protos.h $(srcdir)/hx509-private.h
145 $(ALL_OBJECTS): $(HX509_PROTOS)
147 $(libhx509_la_OBJECTS): $(srcdir)/hx_locl.h
148 $(libhx509_la_OBJECTS): ocsp_asn1.h pkcs10_asn1.h
150 $(srcdir)/hx509-protos.h: $(dist_libhx509_la_SOURCES)
151 $(heim_verbose)cd $(srcdir) && perl ../../cf/make-proto.pl -R '^(_|^C)' -E HX509_LIB -q -P comment -o hx509-protos.h $(dist_libhx509_la_SOURCES) || rm -f hx509-protos.h
153 $(srcdir)/hx509-private.h: $(dist_libhx509_la_SOURCES)
154 $(heim_verbose)cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p hx509-private.h $(dist_libhx509_la_SOURCES) || rm -f hx509-private.h
156 bin_PROGRAMS = hxtool
158 hxtool-commands.c hxtool-commands.h: hxtool-commands.in $(SLC)
159 $(heim_verbose)$(SLC) $(srcdir)/hxtool-commands.in
161 dist_hxtool_SOURCES = hxtool.c
162 nodist_hxtool_SOURCES = hxtool-commands.c hxtool-commands.h
164 $(hxtool_OBJECTS): hxtool-commands.h hx509_err.h
166 hxtool_CPPFLAGS = $(INCLUDE_hcrypto)
169 $(top_builddir)/lib/asn1/libasn1.la \
172 $(top_builddir)/lib/sl/libsl.la
174 CLEANFILES = $(BUILT_SOURCES) sel-gram.c sel-lex.c \
175 $(gen_files_ocsp) ocsp_asn1_files ocsp_asn1{,-priv}.h* \
176 ocsp_asn1-template.[chx]* \
177 $(gen_files_pkcs10) pkcs10_asn1_files pkcs10_asn1{,-priv}.h* \
178 pkcs10_asn1-template.[chx]* \
179 $(gen_files_crmf) crmf_asn1_files crmf_asn1{,-priv}.h* \
180 crmf_asn1-template.[chx]* \
182 hxtool-commands.c hxtool-commands.h *.tmp \
186 sd.data sd.data.out \
187 ev.data ev.data.out \
188 cert-null.pem cert-sub-ca2.pem \
189 cert-ee.pem cert-ca.pem \
190 cert-sub-ee.pem cert-sub-ca.pem \
191 cert-proxy.der cert-ca.der cert-ee.der pkcs10-request.der \
192 wca.pem wuser.pem wdc.pem wcrl.crl \
193 random-data statfile crl.crl \
194 test p11dbg.log pkcs11.cfg \
198 @echo "cleaning PKITS" ; rm -rf PKITS_data
204 check_SCRIPTS = $(SCRIPT_TESTS)
205 check_PROGRAMS = $(PROGRAM_TESTS) test_soft_pkcs11
209 test_soft_pkcs11_LDADD = libhx509.la
210 test_soft_pkcs11_CPPFLAGS = $(INCLUDE_hcrypto) -I$(srcdir)/ref
212 test_name_CPPFLAGS = $(INCLUDE_hcrypto)
213 test_name_LDADD = libhx509.la $(LIB_roken)
214 test_expr_CPPFLAGS = $(INCLUDE_hcrypto)
215 test_expr_LDADD = libhx509.la $(LIB_roken)
217 TESTS = $(SCRIPT_TESTS) $(PROGRAM_TESTS)
239 do_subst = $(heim_verbose)sed -e 's,[@]srcdir[@],$(srcdir),g' \
240 -e 's,[@]objdir[@],$(top_builddir)/lib/hx509,g' \
241 -e 's,[@]egrep[@],$(EGREP),g'
243 test_ca: test_ca.in Makefile
244 $(do_subst) < $(srcdir)/test_ca.in > test_ca.tmp
245 $(heim_verbose)chmod +x test_ca.tmp
246 mv test_ca.tmp test_ca
248 test_cert: test_cert.in Makefile
249 $(do_subst) < $(srcdir)/test_cert.in > test_cert.tmp
250 $(heim_verbose)chmod +x test_cert.tmp
251 mv test_cert.tmp test_cert
253 test_chain: test_chain.in Makefile
254 $(do_subst) < $(srcdir)/test_chain.in > test_chain.tmp
255 $(heim_verbose)chmod +x test_chain.tmp
256 mv test_chain.tmp test_chain
258 test_cms: test_cms.in Makefile
259 $(do_subst) < $(srcdir)/test_cms.in > test_cms.tmp
260 $(heim_verbose)chmod +x test_cms.tmp
261 mv test_cms.tmp test_cms
263 test_crypto: test_crypto.in Makefile
264 $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
265 $(heim_verbose)chmod +x test_crypto.tmp
266 mv test_crypto.tmp test_crypto
268 test_nist: test_nist.in Makefile
269 $(do_subst) < $(srcdir)/test_nist.in > test_nist.tmp
270 $(heim_verbose)chmod +x test_nist.tmp
271 mv test_nist.tmp test_nist
273 test_nist2: test_nist2.in Makefile
274 $(do_subst) < $(srcdir)/test_nist2.in > test_nist2.tmp
275 $(heim_verbose)chmod +x test_nist2.tmp
276 mv test_nist2.tmp test_nist2
278 test_pkcs11: test_pkcs11.in Makefile
279 $(do_subst) < $(srcdir)/test_pkcs11.in > test_pkcs11.tmp
280 $(heim_verbose)chmod +x test_pkcs11.tmp
281 mv test_pkcs11.tmp test_pkcs11
283 test_java_pkcs11: test_java_pkcs11.in Makefile
284 $(do_subst) < $(srcdir)/test_java_pkcs11.in > test_java_pkcs11.tmp
285 $(heim_verbose)chmod +x test_java_pkcs11.tmp
286 mv test_java_pkcs11.tmp test_java_pkcs11
288 test_nist_cert: test_nist_cert.in Makefile
289 $(do_subst) < $(srcdir)/test_nist_cert.in > test_nist_cert.tmp
290 $(heim_verbose)chmod +x test_nist_cert.tmp
291 mv test_nist_cert.tmp test_nist_cert
293 test_nist_pkcs12: test_nist_pkcs12.in Makefile
294 $(do_subst) < $(srcdir)/test_nist_pkcs12.in > test_nist_pkcs12.tmp
295 $(heim_verbose)chmod +x test_nist_pkcs12.tmp
296 mv test_nist_pkcs12.tmp test_nist_pkcs12
298 test_req: test_req.in Makefile
299 $(do_subst) < $(srcdir)/test_req.in > test_req.tmp
300 $(heim_verbose)chmod +x test_req.tmp
301 mv test_req.tmp test_req
303 test_windows: test_windows.in Makefile
304 $(do_subst) < $(srcdir)/test_windows.in > test_windows.tmp
305 $(heim_verbose)chmod +x test_windows.tmp
306 mv test_windows.tmp test_windows
308 test_query: test_query.in Makefile
309 $(do_subst) < $(srcdir)/test_query.in > test_query.tmp
310 $(heim_verbose)chmod +x test_query.tmp
311 mv test_query.tmp test_query
316 libhx509-exports.def \
334 test_nist_pkcs12.in \
336 test_java_pkcs11.in \
340 tst-crypto-available1 \
341 tst-crypto-available2 \
342 tst-crypto-available3 \
352 data/secp256r1TestCA.cert.pem \
353 data/secp256r1TestCA.key.pem \
354 data/secp256r1TestCA.pem \
355 data/secp256r2TestClient.cert.pem \
356 data/secp256r2TestClient.key.pem \
357 data/secp256r2TestClient.pem \
358 data/secp256r2TestServer.cert.pem \
359 data/secp256r2TestServer.key.pem \
360 data/secp256r2TestServer.pem \
361 data/bleichenbacher-bad.pem \
362 data/bleichenbacher-good.pem \
363 data/bleichenbacher-sf-pad-correct.pem \
376 data/no-proxy-test.crt \
377 data/no-proxy-test.key \
380 data/ocsp-resp1-2.der \
381 data/ocsp-resp1-3.der \
382 data/ocsp-resp1-ca.der \
383 data/ocsp-resp1-keyhash.der \
384 data/ocsp-resp1-ocsp-no-cert.der \
385 data/ocsp-resp1-ocsp.der \
386 data/ocsp-resp1.der \
387 data/ocsp-resp2.der \
388 data/ocsp-responder.crt \
389 data/ocsp-responder.key \
391 data/pkinit-proxy-chain.crt \
392 data/pkinit-proxy.crt \
393 data/pkinit-proxy.key \
399 data/proxy-level-test.crt \
400 data/proxy-level-test.key \
401 data/proxy-test.crt \
402 data/proxy-test.key \
403 data/proxy10-child-test.crt \
404 data/proxy10-child-test.key \
405 data/proxy10-child-child-test.crt \
406 data/proxy10-child-child-test.key \
407 data/proxy10-test.crt \
408 data/proxy10-test.key \
411 data/sf-class2-root.pem \
418 data/test-ds-only.crt \
419 data/test-ds-only.key \
420 data/test-enveloped-aes-128 \
421 data/test-enveloped-aes-256 \
422 data/test-enveloped-des \
423 data/test-enveloped-des-ede3 \
424 data/test-enveloped-rc2-128 \
425 data/test-enveloped-rc2-40 \
426 data/test-enveloped-rc2-64 \
427 data/test-ke-only.crt \
428 data/test-ke-only.key \
431 data/test-signed-data \
432 data/test-signed-data-noattr \
433 data/test-signed-data-noattr-nocerts \
434 data/test-signed-sha-1 \
435 data/test-signed-sha-256 \
436 data/test-signed-sha-512 \
437 data/test.combined.crt \
441 data/win-u16-in-printablestring.der \
442 data/yutaka-pad-broken-ca.pem \
443 data/yutaka-pad-broken-cert.pem \
444 data/yutaka-pad-ok-ca.pem \
445 data/yutaka-pad-ok-cert.pem \