include hx509-private.h
[heimdal.git] / lib / hx509 / Makefile.am
blobd3ce3de498c39ce6e6a6a7aa63d23dbbd26b5858
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.h \
66         hx_locl.h \
67         sel.c \
68         sel.h \
69         sel-gram.y \
70         sel-lex.l \
71         keyset.c \
72         ks_dir.c \
73         ks_file.c \
74         ks_mem.c \
75         ks_null.c \
76         ks_p11.c \
77         ks_p12.c \
78         ks_keychain.c \
79         lock.c \
80         name.c \
81         peer.c \
82         print.c \
83         softp11.c \
84         ref/pkcs11.h \
85         req.c \
86         revoke.c
88 sel-lex.c: sel-gram.h
90 libhx509_la_DEPENDENCIES = version-script.map
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         $(top_builddir)/lib/base/libheimbase.la \
98         $(LIBADD_roken) \
99         $(LIB_dlopen)
101 if FRAMEWORK_SECURITY
102 libhx509_la_LDFLAGS += -framework Security -framework CoreFoundation
103 endif
105 if versionscript
106 libhx509_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
107 endif
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 HX509_PROTOS = $(srcdir)/hx509-protos.h $(srcdir)/hx509-private.h
119 dist_include_HEADERS = hx509.h $(HX509_PROTOS)
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 $(ALL_OBJECTS): $(HX509_PROTOS)
145 $(libhx509_la_OBJECTS): $(srcdir)/hx_locl.h
146 $(libhx509_la_OBJECTS): ocsp_asn1.h pkcs10_asn1.h
148 $(srcdir)/hx509-protos.h: $(dist_libhx509_la_SOURCES)
149         $(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
151 $(srcdir)/hx509-private.h: $(dist_libhx509_la_SOURCES)
152         $(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
154 bin_PROGRAMS = hxtool
156 hxtool-commands.c hxtool-commands.h: hxtool-commands.in $(SLC)
157         $(heim_verbose)$(SLC) $(srcdir)/hxtool-commands.in
159 dist_hxtool_SOURCES = hxtool.c
160 nodist_hxtool_SOURCES = hxtool-commands.c hxtool-commands.h
162 $(hxtool_OBJECTS): hxtool-commands.h hx509_err.h
164 hxtool_CPPFLAGS = $(INCLUDE_hcrypto)
165 hxtool_LDADD = \
166         libhx509.la \
167         $(top_builddir)/lib/asn1/libasn1.la \
168         $(LIB_hcrypto) \
169         $(LIB_roken) \
170         $(top_builddir)/lib/sl/libsl.la
172 CLEANFILES = $(BUILT_SOURCES) sel-gram.c sel-lex.c \
173         $(gen_files_ocsp) ocsp_asn1_files ocsp_asn1{,-priv}.h* \
174         ocsp_asn1-template.[ch]* \
175         $(gen_files_pkcs10) pkcs10_asn1_files pkcs10_asn1{,-priv}.h* \
176         pkcs10_asn1-template.[ch]* \
177         $(gen_files_crmf) crmf_asn1_files crmf_asn1{,-priv}.h* \
178         crmf_asn1-template.[ch]* \
179         $(TESTS) \
180         hxtool-commands.c hxtool-commands.h *.tmp \
181         request.out \
182         out.pem out2.pem \
183         sd sd.pem \
184         sd.data sd.data.out \
185         ev.data ev.data.out \
186         cert-null.pem cert-sub-ca2.pem \
187         cert-ee.pem cert-ca.pem \
188         cert-sub-ee.pem cert-sub-ca.pem \
189         cert-proxy.der cert-ca.der cert-ee.der pkcs10-request.der \
190         wca.pem wuser.pem wdc.pem wcrl.crl \
191         random-data statfile crl.crl \
192         test p11dbg.log pkcs11.cfg \
193         test-rc-file.rc
195 clean-local:
196         @echo "cleaning PKITS" ; rm -rf PKITS_data
199 # regression tests
202 check_SCRIPTS = $(SCRIPT_TESTS)
203 check_PROGRAMS = $(PROGRAM_TESTS) test_soft_pkcs11
205 LDADD = libhx509.la
207 test_soft_pkcs11_LDADD = libhx509.la
208 test_soft_pkcs11_CPPFLAGS = $(INCLUDE_hcrypto) -I$(srcdir)/ref
210 test_name_CPPFLAGS = $(INCLUDE_hcrypto)
211 test_name_LDADD = libhx509.la $(LIB_roken)
212 test_expr_CPPFLAGS = $(INCLUDE_hcrypto)
213 test_expr_LDADD = libhx509.la $(LIB_roken)
215 TESTS = $(SCRIPT_TESTS) $(PROGRAM_TESTS)
217 PROGRAM_TESTS =                 \
218         test_name               \
219         test_expr
221 SCRIPT_TESTS =                  \
222         test_ca                 \
223         test_cert               \
224         test_chain              \
225         test_cms                \
226         test_crypto             \
227         test_nist               \
228         test_nist2              \
229         test_pkcs11             \
230         test_java_pkcs11        \
231         test_nist_cert          \
232         test_nist_pkcs12        \
233         test_req                \
234         test_windows            \
235         test_query
237 do_subst = $(heim_verbose)sed -e 's,[@]srcdir[@],$(srcdir),g' \
238         -e 's,[@]objdir[@],$(top_builddir)/lib/hx509,g' \
239         -e 's,[@]egrep[@],$(EGREP),g'
241 test_ca: test_ca.in Makefile
242         $(do_subst) < $(srcdir)/test_ca.in > test_ca.tmp
243         chmod +x test_ca.tmp
244         mv test_ca.tmp test_ca
246 test_cert: test_cert.in Makefile
247         $(do_subst) < $(srcdir)/test_cert.in > test_cert.tmp
248         chmod +x test_cert.tmp
249         mv test_cert.tmp test_cert
251 test_chain: test_chain.in Makefile
252         $(do_subst) < $(srcdir)/test_chain.in > test_chain.tmp
253         chmod +x test_chain.tmp
254         mv test_chain.tmp test_chain
256 test_cms: test_cms.in Makefile
257         $(do_subst) < $(srcdir)/test_cms.in > test_cms.tmp
258         chmod +x test_cms.tmp
259         mv test_cms.tmp test_cms
261 test_crypto: test_crypto.in Makefile
262         $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
263         chmod +x test_crypto.tmp
264         mv test_crypto.tmp test_crypto
266 test_nist: test_nist.in Makefile
267         $(do_subst) < $(srcdir)/test_nist.in > test_nist.tmp
268         chmod +x test_nist.tmp
269         mv test_nist.tmp test_nist
271 test_nist2: test_nist2.in Makefile
272         $(do_subst) < $(srcdir)/test_nist2.in > test_nist2.tmp
273         chmod +x test_nist2.tmp
274         mv test_nist2.tmp test_nist2
276 test_pkcs11: test_pkcs11.in Makefile
277         $(do_subst) < $(srcdir)/test_pkcs11.in > test_pkcs11.tmp
278         chmod +x test_pkcs11.tmp
279         mv test_pkcs11.tmp test_pkcs11
281 test_java_pkcs11: test_java_pkcs11.in Makefile
282         $(do_subst) < $(srcdir)/test_java_pkcs11.in > test_java_pkcs11.tmp
283         chmod +x test_java_pkcs11.tmp
284         mv test_java_pkcs11.tmp test_java_pkcs11
286 test_nist_cert: test_nist_cert.in Makefile
287         $(do_subst) < $(srcdir)/test_nist_cert.in > test_nist_cert.tmp
288         chmod +x test_nist_cert.tmp
289         mv test_nist_cert.tmp test_nist_cert
291 test_nist_pkcs12: test_nist_pkcs12.in Makefile
292         $(do_subst) < $(srcdir)/test_nist_pkcs12.in > test_nist_pkcs12.tmp
293         chmod +x test_nist_pkcs12.tmp
294         mv test_nist_pkcs12.tmp test_nist_pkcs12
296 test_req: test_req.in Makefile
297         $(do_subst) < $(srcdir)/test_req.in > test_req.tmp
298         chmod +x test_req.tmp
299         mv test_req.tmp test_req
301 test_windows: test_windows.in Makefile
302         $(do_subst) < $(srcdir)/test_windows.in > test_windows.tmp
303         chmod +x test_windows.tmp
304         mv test_windows.tmp test_windows
306 test_query: test_query.in Makefile
307         $(do_subst) < $(srcdir)/test_query.in > test_query.tmp
308         chmod +x test_query.tmp
309         mv test_query.tmp test_query
311 EXTRA_DIST = \
312         NTMakefile \
313         hxtool-version.rc \
314         libhx509-exports.def \
315         version-script.map \
316         crmf.asn1 \
317         hx509_err.et \
318         hxtool-commands.in \
319         quote.py \
320         ocsp.asn1 \
321         ocsp.opt \
322         pkcs10.asn1 \
323         pkcs10.opt \
324         test_ca.in \
325         test_chain.in \
326         test_cert.in \
327         test_cms.in \
328         test_crypto.in \
329         test_nist.in \
330         test_nist2.in \
331         test_nist_cert.in \
332         test_nist_pkcs12.in \
333         test_pkcs11.in \
334         test_java_pkcs11.in \
335         test_query.in \
336         test_req.in \
337         test_windows.in \
338         tst-crypto-available1 \
339         tst-crypto-available2 \
340         tst-crypto-available3 \
341         tst-crypto-select \
342         tst-crypto-select1 \
343         tst-crypto-select2 \
344         tst-crypto-select3 \
345         tst-crypto-select4 \
346         tst-crypto-select5 \
347         tst-crypto-select6 \
348         tst-crypto-select7 \
349         data/n0ll.pem \
350         data/secp160r1TestCA.cert.pem \
351         data/secp160r1TestCA.key.pem \
352         data/secp160r1TestCA.pem \
353         data/secp160r2TestClient.cert.pem \
354         data/secp160r2TestClient.key.pem \
355         data/secp160r2TestClient.pem \
356         data/secp160r2TestServer.cert.pem \
357         data/secp160r2TestServer.key.pem \
358         data/secp160r2TestServer.pem \
359         data/bleichenbacher-bad.pem \
360         data/bleichenbacher-good.pem \
361         data/bleichenbacher-sf-pad-correct.pem \
362         data/ca.crt \
363         data/ca.key \
364         data/crl1.crl \
365         data/crl1.der \
366         data/gen-req.sh \
367         data/j.pem \
368         data/kdc.crt \
369         data/kdc.key \
370         data/key.der \
371         data/key2.der \
372         data/nist-data \
373         data/nist-data2 \
374         data/no-proxy-test.crt \
375         data/no-proxy-test.key \
376         data/ocsp-req1.der \
377         data/ocsp-req2.der \
378         data/ocsp-resp1-2.der \
379         data/ocsp-resp1-3.der \
380         data/ocsp-resp1-ca.der \
381         data/ocsp-resp1-keyhash.der \
382         data/ocsp-resp1-ocsp-no-cert.der \
383         data/ocsp-resp1-ocsp.der \
384         data/ocsp-resp1.der \
385         data/ocsp-resp2.der \
386         data/ocsp-responder.crt \
387         data/ocsp-responder.key \
388         data/openssl.cnf \
389         data/pkinit-proxy-chain.crt \
390         data/pkinit-proxy.crt \
391         data/pkinit-proxy.key \
392         data/pkinit-pw.key \
393         data/pkinit.crt \
394         data/pkinit.key \
395         data/pkinit-ec.crt \
396         data/pkinit-ec.key \
397         data/proxy-level-test.crt \
398         data/proxy-level-test.key \
399         data/proxy-test.crt \
400         data/proxy-test.key \
401         data/proxy10-child-test.crt \
402         data/proxy10-child-test.key \
403         data/proxy10-child-child-test.crt \
404         data/proxy10-child-child-test.key \
405         data/proxy10-test.crt \
406         data/proxy10-test.key \
407         data/revoke.crt \
408         data/revoke.key \
409         data/sf-class2-root.pem \
410         data/static-file \
411         data/sub-ca.crt \
412         data/sub-ca.key \
413         data/sub-cert.crt \
414         data/sub-cert.key \
415         data/sub-cert.p12 \
416         data/test-ds-only.crt \
417         data/test-ds-only.key \
418         data/test-enveloped-aes-128 \
419         data/test-enveloped-aes-256 \
420         data/test-enveloped-des \
421         data/test-enveloped-des-ede3 \
422         data/test-enveloped-rc2-128 \
423         data/test-enveloped-rc2-40 \
424         data/test-enveloped-rc2-64 \
425         data/test-ke-only.crt \
426         data/test-ke-only.key \
427         data/test-nopw.p12 \
428         data/test-pw.key \
429         data/test-signed-data \
430         data/test-signed-data-noattr \
431         data/test-signed-data-noattr-nocerts \
432         data/test-signed-sha-1 \
433         data/test-signed-sha-256 \
434         data/test-signed-sha-512 \
435         data/test.combined.crt \
436         data/test.crt \
437         data/test.key \
438         data/test.p12 \
439         data/win-u16-in-printablestring.der \
440         data/yutaka-pad-broken-ca.pem \
441         data/yutaka-pad-broken-cert.pem \
442         data/yutaka-pad-ok-ca.pem \
443         data/yutaka-pad-ok-cert.pem \
444         data/yutaka-pad.key