summaryrefslogtreecommitdiff
path: root/kerberosV/lib/libhx509/Makefile
blob: 0dd5c7ce04904bf9d60890a379dda87d7257bb98 (plain)
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
# $OpenBSD: Makefile,v 1.2 2013/07/01 05:15:23 ajacoutot Exp $

LIB=	hx509
DPADD=	${LIBASN1} ${LIBCOM_ERR} ${LIBCRYPTO} ${LIBROKEN} ${LIBWIND}

MPAGES=	hx509.3 \
	hx509_ca.3 \
	hx509_cert.3 \
	hx509_cms.3 \
	hx509_crypto.3 \
	hx509_env.3 \
	hx509_error.3 \
	hx509_keyset.3 \
	hx509_lock.3 \
	hx509_misc.3 \
	hx509_name.3 \
	hx509_peer.3 \
	hx509_print.3 \
	hx509_query.3 \
	hx509_revoke.3 \
	hx509_verify.3
MSRC=	${KRB5DIR}/doc/doxyout/hx509/man/man3

MLINKS=	hx509.3 hx509_context_free.3 \
	hx509.3 hx509_context_init.3 \
	hx509_ca.3 hx509_ca_sign.3 \
	hx509_ca.3 hx509_ca_sign_self.3 \
	hx509_ca.3 hx509_ca_tbs_add_crl_dp_uri.3 \
	hx509_ca.3 hx509_ca_tbs_add_eku.3 \
	hx509_ca.3 hx509_ca_tbs_add_san_hostname.3 \
	hx509_ca.3 hx509_ca_tbs_add_san_jid.3 \
	hx509_ca.3 hx509_ca_tbs_add_san_ms_upn.3 \
	hx509_ca.3 hx509_ca_tbs_add_san_otherName.3 \
	hx509_ca.3 hx509_ca_tbs_add_san_pkinit.3 \
	hx509_ca.3 hx509_ca_tbs_add_san_rfc822name.3 \
	hx509_ca.3 hx509_ca_tbs_free.3 \
	hx509_ca.3 hx509_ca_tbs_init.3 \
	hx509_ca.3 hx509_ca_tbs_set_ca.3 \
	hx509_ca.3 hx509_ca_tbs_set_domaincontroller.3 \
	hx509_ca.3 hx509_ca_tbs_set_notAfter.3 \
	hx509_ca.3 hx509_ca_tbs_set_notAfter_lifetime.3 \
	hx509_ca.3 hx509_ca_tbs_set_notBefore.3 \
	hx509_ca.3 hx509_ca_tbs_set_proxy.3 \
	hx509_ca.3 hx509_ca_tbs_set_serialnumber.3 \
	hx509_ca.3 hx509_ca_tbs_set_spki.3 \
	hx509_ca.3 hx509_ca_tbs_set_subject.3 \
	hx509_ca.3 hx509_ca_tbs_set_template.3 \
	hx509_ca.3 hx509_ca_tbs_set_unique.3 \
	hx509_ca.3 hx509_ca_tbs_subject_expand.3 \
	hx509_ca.3 hx509_ca_tbs_template_units.3 \
	hx509_cert.3 hx509_cert_binary.3 \
	hx509_cert.3 hx509_cert_check_eku.3 \
	hx509_cert.3 hx509_cert_cmp.3 \
	hx509_cert.3 hx509_cert_find_subjectAltName_otherName.3 \
	hx509_cert.3 hx509_cert_free.3 \
	hx509_cert.3 hx509_cert_get_SPKI.3 \
	hx509_cert.3 hx509_cert_get_SPKI_AlgorithmIdentifier.3 \
	hx509_cert.3 hx509_cert_get_attribute.3 \
	hx509_cert.3 hx509_cert_get_base_subject.3 \
	hx509_cert.3 hx509_cert_get_friendly_name.3 \
	hx509_cert.3 hx509_cert_get_issuer.3 \
	hx509_cert.3 hx509_cert_get_issuer_unique_id.3 \
	hx509_cert.3 hx509_cert_get_notAfter.3 \
	hx509_cert.3 hx509_cert_get_notBefore.3 \
	hx509_cert.3 hx509_cert_get_serialnumber.3 \
	hx509_cert.3 hx509_cert_get_subject.3 \
	hx509_cert.3 hx509_cert_get_subject_unique_id.3 \
	hx509_cert.3 hx509_cert_init.3 \
	hx509_cert.3 hx509_cert_init_data.3 \
	hx509_cert.3 hx509_cert_ref.3 \
	hx509_cert.3 hx509_cert_set_friendly_name.3 \
	hx509_cert.3 hx509_print_cert.3 \
	hx509_cert.3 hx509_query_alloc.3 \
	hx509_cert.3 hx509_query_free.3 \
	hx509_cert.3 hx509_query_match_cmp_func.3 \
	hx509_cert.3 hx509_query_match_eku.3 \
	hx509_cert.3 hx509_query_match_friendly_name.3 \
	hx509_cert.3 hx509_query_match_issuer_serial.3 \
	hx509_cert.3 hx509_query_match_option.3 \
	hx509_cert.3 hx509_query_statistic_file.3 \
	hx509_cert.3 hx509_query_unparse_stats.3 \
	hx509_cert.3 hx509_verify_ctx_f_allow_default_trustanchors.3 \
	hx509_cert.3 hx509_verify_hostname.3 \
	hx509_cms.3 hx509_cms_create_signed_1.3 \
	hx509_cms.3 hx509_cms_envelope_1.3 \
	hx509_cms.3 hx509_cms_unenvelope.3 \
	hx509_cms.3 hx509_cms_unwrap_ContentInfo.3 \
	hx509_cms.3 hx509_cms_verify_signed.3 \
	hx509_cms.3 hx509_cms_wrap_ContentInfo.3 \
	hx509_crypto.3 hx509_verify_signature.3 \
	hx509_env.3 hx509_env_add.3 \
	hx509_env.3 hx509_env_add_binding.3 \
	hx509_env.3 hx509_env_find.3 \
	hx509_env.3 hx509_env_find_binding.3 \
	hx509_env.3 hx509_env_free.3 \
	hx509_env.3 hx509_env_lfind.3 \
	hx509_error.3 hx509_clear_error_string.3 \
	hx509_error.3 hx509_err.3 \
	hx509_error.3 hx509_free_error_string.3 \
	hx509_error.3 hx509_get_error_string.3 \
	hx509_error.3 hx509_set_error_string.3 \
	hx509_error.3 hx509_set_error_stringv.3 \
	hx509_keyset.3 hx509_certs_add.3 \
	hx509_keyset.3 hx509_certs_append.3 \
	hx509_keyset.3 hx509_certs_end_seq.3 \
	hx509_keyset.3 hx509_certs_filter.3 \
	hx509_keyset.3 hx509_certs_find.3 \
	hx509_keyset.3 hx509_certs_free.3 \
	hx509_keyset.3 hx509_certs_info.3 \
	hx509_keyset.3 hx509_certs_init.3 \
	hx509_keyset.3 hx509_certs_iter_f.3 \
	hx509_keyset.3 hx509_certs_merge.3 \
	hx509_keyset.3 hx509_certs_next_cert.3 \
	hx509_keyset.3 hx509_certs_start_seq.3 \
	hx509_keyset.3 hx509_certs_store.3 \
	hx509_keyset.3 hx509_ci_print_names.3 \
	hx509_keyset.3 hx509_get_one_cert.3 \
	hx509_misc.3 hx509_free_octet_string_list.3 \
	hx509_misc.3 hx509_xfree.3 \
	hx509_name.3 hx509_general_name_unparse.3 \
	hx509_name.3 hx509_name_binary.3 \
	hx509_name.3 hx509_name_cmp.3 \
	hx509_name.3 hx509_name_copy.3 \
	hx509_name.3 hx509_name_expand.3 \
	hx509_name.3 hx509_name_free.3 \
	hx509_name.3 hx509_name_is_null_p.3 \
	hx509_name.3 hx509_name_to_Name.3 \
	hx509_name.3 hx509_name_to_string.3 \
	hx509_name.3 hx509_parse_name.3 \
	hx509_name.3 hx509_unparse_der_name.3 \
	hx509_peer.3 hx509_peer_info_add_cms_alg.3 \
	hx509_peer.3 hx509_peer_info_alloc.3 \
	hx509_peer.3 hx509_peer_info_free.3 \
	hx509_peer.3 hx509_peer_info_set_cert.3 \
	hx509_peer.3 hx509_peer_info_set_cms_algs.3 \
	hx509_print.3 hx509_bitstring_print.3 \
	hx509_print.3 hx509_cert_keyusage_print.3 \
	hx509_print.3 hx509_oid_print.3 \
	hx509_print.3 hx509_oid_sprint.3 \
	hx509_print.3 hx509_print_stdout.3 \
	hx509_print.3 hx509_validate_cert.3 \
	hx509_print.3 hx509_validate_ctx_add_flags.3 \
	hx509_print.3 hx509_validate_ctx_free.3 \
	hx509_print.3 hx509_validate_ctx_init.3 \
	hx509_print.3 hx509_validate_ctx_set_print.3 \
	hx509_revoke.3 hx509_ocsp_request.3 \
	hx509_revoke.3 hx509_revoke_add_crl.3 \
	hx509_revoke.3 hx509_revoke_add_ocsp.3 \
	hx509_revoke.3 hx509_revoke_free.3 \
	hx509_revoke.3 hx509_revoke_init.3 \
	hx509_revoke.3 hx509_revoke_ocsp_print.3 \
	hx509_revoke.3 hx509_revoke_verify.3 \
	hx509_verify.3 hx509_context_set_missing_revoke.3 \
	hx509_verify.3 hx509_crl_add_revoked_certs.3 \
	hx509_verify.3 hx509_crl_alloc.3 \
	hx509_verify.3 hx509_crl_free.3 \
	hx509_verify.3 hx509_crl_lifetime.3 \
	hx509_verify.3 hx509_crl_sign.3 \
	hx509_verify.3 hx509_ocsp_verify.3 \
	hx509_verify.3 hx509_verify_attach_anchors.3 \
	hx509_verify.3 hx509_verify_attach_revoke.3 \
	hx509_verify.3 hx509_verify_destroy_ctx.3 \
	hx509_verify.3 hx509_verify_init_ctx.3 \
	hx509_verify.3 hx509_verify_path.3 \
	hx509_verify.3 hx509_verify_set_max_depth.3 \
	hx509_verify.3 hx509_verify_set_proxy_certificate.3 \
	hx509_verify.3 hx509_verify_set_strict_rfc3280_verification.3 \
	hx509_verify.3 hx509_verify_set_time.3

INCS=	hx509.h \
	hx509-private.h \
	hx509-protos.h \
	hx509.h \
	hx509_err.h

SRCS=	ca.c \
	cert.c \
	cms.c \
	collector.c \
	crypto.c \
	doxygen.c \
	error.c \
	env.c \
	file.c \
	sel.c \
	sel-gram.c \
	sel-gram.h \
	sel-lex.l \
	keyset.c \
	ks_dir.c \
	ks_file.c \
	ks_mem.c \
	ks_null.c \
	ks_p11.c \
	ks_p12.c \
	ks_keychain.c \
	lock.c \
	name.c \
	peer.c \
	print.c \
	softp11.c \
	req.c \
	revoke.c

SRCS+=	hx509_err.c \
	hx509_err.h

SRCS+=	${GEN_OCSP:S/.x$/.c/:S/.hx$/.h/} \
	${GEN_PKCS10:S/.x$/.c/:S/.hx$/.h/}

CFLAGS+=-I${KRB5DIR}/lib/hx509
CFLAGS+=-I${KRB5DIR}/lib/hx509/ref
CFLAGS+=-I${KRB5DIR}/lib/asn1
CFLAGS+=-I${KRB5DIR}/lib/wind
CFLAGS+=-I${KRB5DIR}/lib/roken -I.

GEN_OCSP= \
	asn1_OCSPBasicOCSPResponse.x \
	asn1_OCSPCertID.x \
	asn1_OCSPCertStatus.x \
	asn1_OCSPInnerRequest.x \
	asn1_OCSPKeyHash.x \
	asn1_OCSPRequest.x \
	asn1_OCSPResponderID.x \
	asn1_OCSPResponse.x \
	asn1_OCSPResponseBytes.x \
	asn1_OCSPResponseData.x \
	asn1_OCSPResponseStatus.x \
	asn1_OCSPSignature.x \
	asn1_OCSPSingleResponse.x \
	asn1_OCSPTBSRequest.x \
	asn1_OCSPVersion.x \
	asn1_id_pkix_ocsp.x \
	asn1_id_pkix_ocsp_basic.x \
	asn1_id_pkix_ocsp_nonce.x \
	ocsp_asn1.hx \
	ocsp_asn1-priv.hx

GEN_PKCS10= \
	asn1_CertificationRequestInfo.x \
	asn1_CertificationRequest.x \
	pkcs10_asn1.hx \
	pkcs10_asn1-priv.hx

GEN_CRMF= \
	asn1_CRMFRDNSequence.x \
	asn1_CertReqMessages.x \
	asn1_CertReqMsg.x \
	asn1_CertRequest.x \
	asn1_CertTemplate.x \
	asn1_Controls.x \
	asn1_PBMParameter.x \
	asn1_PKMACValue.x \
	asn1_POPOPrivKey.x \
	asn1_POPOSigningKey.x \
	asn1_POPOSigningKeyInput.x \
	asn1_ProofOfPossession.x \
	asn1_SubsequentMessage.x \
	crmf_asn1.hx \
	crmf_asn1-priv.hx

GEN+=	${GEN_OCSP}
GEN+=	${GEN_PKCS10}
GEN+=	${GEN_CRMF}

CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} ocsp_asn1_files \
	pkcs10_asn1_files crmf_asn1_files ocsp_asn1-template.[ch]* \
	pkcs10_asn1-template.[ch]* crmf_asn1-template.[ch]* sel-gram.[ch]* \
	sel-lex.c

INCS+=	ocsp_asn1.h pkcs10_asn1.h crmf_asn1.h

sel-gram.c sel-gram.h: sel-gram.y
	${YACC} -p _hx509_sel_yy -d ${.ALLSRC} && mv y.tab.c sel-gram.c && mv y.tab.h sel-gram.h

${GEN_OCSP}: ocsp.asn1 ocsp.opt
	${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \
	 ${.ALLSRC:M*.asn1} ocsp_asn1

${GEN_PKCS10}: pkcs10.asn1 pkcs10.opt
	${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \
	${.ALLSRC:M*.asn1} pkcs10_asn1

${GEN_CRMF}: crmf.asn1
	${ASN1_COMPILE} ${.ALLSRC:M*.asn1} crmf_asn1

.SUFFIXES: .h .c .x .hx

.x.c:   
	cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET}

.hx.h:
	cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET}

.include <bsd.lib.mk>

.SUFFIXES: .h .c .x .hx

.PATH: ${KRB5DIR}/lib/hx509 ${KRB5DIR}/lib/asn1 ${KRB5DIR}/doc/doxyout/hx509/man/man3