catch error from gsskrb5_register_acceptor_identity
[heimdal.git] / lib / hx509 / Makefile.am
blobb0d311ee039b484f78ad07805b5c96790928d877
1 include $(top_srcdir)/Makefile.am.common
3 lib_LTLIBRARIES = libhx509.la
4 libhx509_la_LDFLAGS = -version-info 5:0:0
6 BUILT_SOURCES =                         \
7         sel-gram.h                      \
8         $(gen_files_ocsp:.x=.c)         \
9         $(gen_files_pkcs10:.x=.c)       \
10         hx509_err.c                     \
11         hx509_err.h
13 gen_files_ocsp =                        \
14         asn1_OCSPBasicOCSPResponse.x    \
15         asn1_OCSPCertID.x               \
16         asn1_OCSPCertStatus.x           \
17         asn1_OCSPInnerRequest.x         \
18         asn1_OCSPKeyHash.x              \
19         asn1_OCSPRequest.x              \
20         asn1_OCSPResponderID.x          \
21         asn1_OCSPResponse.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           \
28         asn1_OCSPVersion.x              \
29         asn1_id_pkix_ocsp.x             \
30         asn1_id_pkix_ocsp_basic.x       \
31         asn1_id_pkix_ocsp_nonce.x
33 gen_files_pkcs10 =                      \
34         asn1_CertificationRequestInfo.x \
35         asn1_CertificationRequest.x
37 gen_files_crmf =                        \
38         asn1_CRMFRDNSequence.x          \
39         asn1_CertReqMessages.x          \
40         asn1_CertReqMsg.x               \
41         asn1_CertRequest.x              \
42         asn1_CertTemplate.x             \
43         asn1_Controls.x                 \
44         asn1_PBMParameter.x             \
45         asn1_PKMACValue.x               \
46         asn1_POPOPrivKey.x              \
47         asn1_POPOSigningKey.x           \
48         asn1_POPOSigningKeyInput.x      \
49         asn1_ProofOfPossession.x        \
50         asn1_SubsequentMessage.x        
52 AM_YFLAGS = -d
54 dist_libhx509_la_SOURCES = \
55         ca.c \
56         cert.c \
57         char_map.h \
58         cms.c \
59         collector.c \
60         crypto.c \
61         doxygen.c \
62         error.c \
63         env.c \
64         file.c \
65         hx509-private.h \
66         hx509-protos.h \
67         hx509.h \
68         hx_locl.h \
69         sel.c \
70         sel.h \
71         sel-gram.y \
72         sel-lex.l \
73         keyset.c \
74         ks_dir.c \
75         ks_file.c \
76         ks_mem.c \
77         ks_null.c \
78         ks_p11.c \
79         ks_p12.c \
80         ks_keychain.c \
81         lock.c \
82         name.c \
83         peer.c \
84         print.c \
85         softp11.c \
86         ref/pkcs11.h \
87         req.c \
88         revoke.c
90 sel-lex.c: sel-gram.h
92 libhx509_la_LIBADD = \
93         $(LIB_com_err) \
94         $(LIB_hcrypto) \
95         $(top_builddir)/lib/asn1/libasn1.la \
96         $(top_builddir)/lib/wind/libwind.la \
97         $(LIBADD_roken) \
98         $(LIB_dlopen)
100 if FRAMEWORK_SECURITY
101 libhx509_la_LDFLAGS += -framework Security -framework CoreFoundation
102 endif
104 if versionscript
105 libhx509_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
106 endif
107 $(libhx509_la_OBJECTS): $(srcdir)/version-script.map $(nodist_include_HEADERS) $(priv_headers)
109 libhx509_la_CPPFLAGS = -I$(srcdir)/ref $(INCLUDE_hcrypto)
110 nodist_libhx509_la_SOURCES = $(BUILT_SOURCES)
112 $(gen_files_ocsp) ocsp_asn1.hx ocsp_asn1-priv.hx: ocsp_asn1_files
113 $(gen_files_pkcs10) pkcs10_asn1.hx pkcs10_asn1-priv.hx: pkcs10_asn1_files
114 $(gen_files_crmf) crmf_asn1.hx crmf_asn1-priv.hx: crmf_asn1_files
116 dist_include_HEADERS = hx509.h hx509-protos.h
118 nodist_include_HEADERS = hx509_err.h
119 nodist_include_HEADERS += ocsp_asn1.h
120 nodist_include_HEADERS += pkcs10_asn1.h
121 nodist_include_HEADERS += crmf_asn1.h
123 priv_headers  = ocsp_asn1-priv.h
124 priv_headers += pkcs10_asn1-priv.h
125 priv_headers += crmf_asn1-priv.h
128 ocsp_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/ocsp.asn1 $(srcdir)/ocsp.opt
129         $(ASN1_COMPILE) --option-file=$(srcdir)/ocsp.opt $(srcdir)/ocsp.asn1 ocsp_asn1 || (rm -f ocsp_asn1_files ; exit 1)
131 pkcs10_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/pkcs10.asn1 $(srcdir)/pkcs10.opt
132         $(ASN1_COMPILE) --option-file=$(srcdir)/pkcs10.opt $(srcdir)/pkcs10.asn1 pkcs10_asn1 || (rm -f pkcs10_asn1_files ; exit 1)
134 crmf_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/crmf.asn1
135         $(ASN1_COMPILE) $(srcdir)/crmf.asn1 crmf_asn1 || (rm -f crmf_asn1_files ; exit 1)
137 $(libhx509_la_OBJECTS): $(srcdir)/hx509-protos.h $(srcdir)/hx509-private.h $(srcdir)/hx_locl.h
138 $(libhx509_la_OBJECTS): ocsp_asn1.h pkcs10_asn1.h
140 $(srcdir)/hx509-protos.h:
141         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
143 $(srcdir)/hx509-private.h:
144         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p hx509-private.h $(dist_libhx509_la_SOURCES) || rm -f hx509-private.h
146 bin_PROGRAMS = hxtool
148 hxtool-commands.c hxtool-commands.h: hxtool-commands.in $(SLC)
149         $(SLC) $(srcdir)/hxtool-commands.in
151 dist_hxtool_SOURCES = hxtool.c
152 nodist_hxtool_SOURCES = hxtool-commands.c hxtool-commands.h
154 $(hxtool_OBJECTS): hxtool-commands.h
156 hxtool_CPPFLAGS = $(INCLUDE_hcrypto)
157 hxtool_LDADD = \
158         libhx509.la \
159         $(top_builddir)/lib/asn1/libasn1.la \
160         $(LIB_hcrypto) \
161         $(LIB_roken) \
162         $(top_builddir)/lib/sl/libsl.la
164 CLEANFILES = $(BUILT_SOURCES) sel-gram.c sel-lex.c \
165         $(gen_files_ocsp) ocsp_asn1_files ocsp_asn1{,-priv}.h* \
166         ocsp_asn1-template.[ch]* \
167         $(gen_files_pkcs10) pkcs10_asn1_files pkcs10_asn1{,-priv}.h* \
168         pkcs10_asn1-template.[ch]* \
169         $(gen_files_crmf) crmf_asn1_files crmf_asn1{,-priv}.h* \
170         crmf_asn1-template.[ch]* \
171         $(TESTS) \
172         hxtool-commands.c hxtool-commands.h *.tmp \
173         request.out \
174         out.pem out2.pem \
175         sd sd.pem \
176         sd.data sd.data.out \
177         ev.data ev.data.out \
178         cert-null.pem cert-sub-ca2.pem \
179         cert-ee.pem cert-ca.pem \
180         cert-sub-ee.pem cert-sub-ca.pem \
181         cert-proxy.der cert-ca.der cert-ee.der pkcs10-request.der \
182         wca.pem wuser.pem wdc.pem wcrl.crl \
183         random-data statfile crl.crl \
184         test p11dbg.log pkcs11.cfg \
185         test-rc-file.rc
187 clean-local:
188         @echo "cleaning PKITS" ; rm -rf PKITS_data
191 # regression tests
194 check_SCRIPTS = $(SCRIPT_TESTS)
195 check_PROGRAMS = $(PROGRAM_TESTS) test_soft_pkcs11
197 LDADD = libhx509.la
199 test_soft_pkcs11_LDADD = libhx509.la
200 test_soft_pkcs11_CPPFLAGS = -I$(srcdir)/ref
202 TESTS = $(SCRIPT_TESTS) $(PROGRAM_TESTS)
204 PROGRAM_TESTS =                 \
205         test_name               \
206         test_expr
208 SCRIPT_TESTS =                  \
209         test_ca                 \
210         test_cert               \
211         test_chain              \
212         test_cms                \
213         test_crypto             \
214         test_nist               \
215         test_nist2              \
216         test_pkcs11             \
217         test_java_pkcs11        \
218         test_nist_cert          \
219         test_nist_pkcs12        \
220         test_req                \
221         test_windows            \
222         test_query
224 do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \
225         -e 's,[@]objdir[@],$(top_builddir)/lib/hx509,g' \
226         -e 's,[@]egrep[@],$(EGREP),g'
228 test_ca: test_ca.in Makefile
229         $(do_subst) < $(srcdir)/test_ca.in > test_ca.tmp
230         chmod +x test_ca.tmp
231         mv test_ca.tmp test_ca
233 test_cert: test_cert.in Makefile
234         $(do_subst) < $(srcdir)/test_cert.in > test_cert.tmp
235         chmod +x test_cert.tmp
236         mv test_cert.tmp test_cert
238 test_chain: test_chain.in Makefile
239         $(do_subst) < $(srcdir)/test_chain.in > test_chain.tmp
240         chmod +x test_chain.tmp
241         mv test_chain.tmp test_chain
243 test_cms: test_cms.in Makefile
244         $(do_subst) < $(srcdir)/test_cms.in > test_cms.tmp
245         chmod +x test_cms.tmp
246         mv test_cms.tmp test_cms
248 test_crypto: test_crypto.in Makefile
249         $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
250         chmod +x test_crypto.tmp
251         mv test_crypto.tmp test_crypto
253 test_nist: test_nist.in Makefile
254         $(do_subst) < $(srcdir)/test_nist.in > test_nist.tmp
255         chmod +x test_nist.tmp
256         mv test_nist.tmp test_nist
258 test_nist2: test_nist2.in Makefile
259         $(do_subst) < $(srcdir)/test_nist2.in > test_nist2.tmp
260         chmod +x test_nist2.tmp
261         mv test_nist2.tmp test_nist2
263 test_pkcs11: test_pkcs11.in Makefile
264         $(do_subst) < $(srcdir)/test_pkcs11.in > test_pkcs11.tmp
265         chmod +x test_pkcs11.tmp
266         mv test_pkcs11.tmp test_pkcs11
268 test_java_pkcs11: test_java_pkcs11.in Makefile
269         $(do_subst) < $(srcdir)/test_java_pkcs11.in > test_java_pkcs11.tmp
270         chmod +x test_java_pkcs11.tmp
271         mv test_java_pkcs11.tmp test_java_pkcs11
273 test_nist_cert: test_nist_cert.in Makefile
274         $(do_subst) < $(srcdir)/test_nist_cert.in > test_nist_cert.tmp
275         chmod +x test_nist_cert.tmp
276         mv test_nist_cert.tmp test_nist_cert
278 test_nist_pkcs12: test_nist_pkcs12.in Makefile
279         $(do_subst) < $(srcdir)/test_nist_pkcs12.in > test_nist_pkcs12.tmp
280         chmod +x test_nist_pkcs12.tmp
281         mv test_nist_pkcs12.tmp test_nist_pkcs12
283 test_req: test_req.in Makefile
284         $(do_subst) < $(srcdir)/test_req.in > test_req.tmp
285         chmod +x test_req.tmp
286         mv test_req.tmp test_req
288 test_windows: test_windows.in Makefile
289         $(do_subst) < $(srcdir)/test_windows.in > test_windows.tmp
290         chmod +x test_windows.tmp
291         mv test_windows.tmp test_windows
293 test_query: test_query.in Makefile
294         $(do_subst) < $(srcdir)/test_query.in > test_query.tmp
295         chmod +x test_query.tmp
296         mv test_query.tmp test_query
298 EXTRA_DIST = \
299         version-script.map \
300         crmf.asn1 \
301         hx509_err.et \
302         hxtool-commands.in \
303         quote.py \
304         ocsp.asn1 \
305         ocsp.opt \
306         pkcs10.asn1 \
307         pkcs10.opt \
308         test_ca.in \
309         test_chain.in \
310         test_cert.in \
311         test_cms.in \
312         test_crypto.in \
313         test_nist.in \
314         test_nist2.in \
315         test_nist_cert.in \
316         test_nist_pkcs12.in \
317         test_pkcs11.in \
318         test_java_pkcs11.in \
319         test_query.in \
320         test_req.in \
321         test_windows.in \
322         tst-crypto-available1 \
323         tst-crypto-available2 \
324         tst-crypto-available3 \
325         tst-crypto-select \
326         tst-crypto-select1 \
327         tst-crypto-select2 \
328         tst-crypto-select3 \
329         tst-crypto-select4 \
330         tst-crypto-select5 \
331         tst-crypto-select6 \
332         tst-crypto-select7 \
333         data/n0ll.pem \
334         data/secp160r1TestCA.cert.pem \
335         data/secp160r1TestCA.key.pem \
336         data/secp160r1TestCA.pem \
337         data/secp160r2TestClient.cert.pem \
338         data/secp160r2TestClient.key.pem \
339         data/secp160r2TestClient.pem \
340         data/secp160r2TestServer.cert.pem \
341         data/secp160r2TestServer.key.pem \
342         data/secp160r2TestServer.pem \
343         data/bleichenbacher-bad.pem \
344         data/bleichenbacher-good.pem \
345         data/bleichenbacher-sf-pad-correct.pem \
346         data/ca.crt \
347         data/ca.key \
348         data/crl1.crl \
349         data/crl1.der \
350         data/gen-req.sh \
351         data/j.pem \
352         data/kdc.crt \
353         data/kdc.key \
354         data/key.der \
355         data/key2.der \
356         data/nist-data \
357         data/nist-data2 \
358         data/no-proxy-test.crt \
359         data/no-proxy-test.key \
360         data/ocsp-req1.der \
361         data/ocsp-req2.der \
362         data/ocsp-resp1-2.der \
363         data/ocsp-resp1-3.der \
364         data/ocsp-resp1-ca.der \
365         data/ocsp-resp1-keyhash.der \
366         data/ocsp-resp1-ocsp-no-cert.der \
367         data/ocsp-resp1-ocsp.der \
368         data/ocsp-resp1.der \
369         data/ocsp-resp2.der \
370         data/ocsp-responder.crt \
371         data/ocsp-responder.key \
372         data/openssl.cnf \
373         data/pkinit-proxy-chain.crt \
374         data/pkinit-proxy.crt \
375         data/pkinit-proxy.key \
376         data/pkinit-pw.key \
377         data/pkinit.crt \
378         data/pkinit.key \
379         data/pkinit-ec.crt \
380         data/pkinit-ec.key \
381         data/proxy-level-test.crt \
382         data/proxy-level-test.key \
383         data/proxy-test.crt \
384         data/proxy-test.key \
385         data/proxy10-child-test.crt \
386         data/proxy10-child-test.key \
387         data/proxy10-child-child-test.crt \
388         data/proxy10-child-child-test.key \
389         data/proxy10-test.crt \
390         data/proxy10-test.key \
391         data/revoke.crt \
392         data/revoke.key \
393         data/sf-class2-root.pem \
394         data/static-file \
395         data/sub-ca.crt \
396         data/sub-ca.key \
397         data/sub-cert.crt \
398         data/sub-cert.key \
399         data/sub-cert.p12 \
400         data/test-ds-only.crt \
401         data/test-ds-only.key \
402         data/test-enveloped-aes-128 \
403         data/test-enveloped-aes-256 \
404         data/test-enveloped-des \
405         data/test-enveloped-des-ede3 \
406         data/test-enveloped-rc2-128 \
407         data/test-enveloped-rc2-40 \
408         data/test-enveloped-rc2-64 \
409         data/test-ke-only.crt \
410         data/test-ke-only.key \
411         data/test-nopw.p12 \
412         data/test-pw.key \
413         data/test-signed-data \
414         data/test-signed-data-noattr \
415         data/test-signed-data-noattr-nocerts \
416         data/test-signed-sha-1 \
417         data/test-signed-sha-256 \
418         data/test-signed-sha-512 \
419         data/test.combined.crt \
420         data/test.crt \
421         data/test.key \
422         data/test.p12 \
423         data/win-u16-in-printablestring.der \
424         data/yutaka-pad-broken-ca.pem \
425         data/yutaka-pad-broken-cert.pem \
426         data/yutaka-pad-ok-ca.pem \
427         data/yutaka-pad-ok-cert.pem \
428         data/yutaka-pad.key