gensec: Refactor gensec_security_mechs()
[samba4-gss.git] / third_party / heimdal_build / wscript_build
blob59fb2758f91a362ebdbc12117d0743439fa50a83
1 #!/usr/bin/env python
3 import os
4 from samba_utils import SET_TARGET_TYPE
5 from samba_autoconf import CURRENT_CFLAGS
6 from samba_utils import LOAD_ENVIRONMENT, TO_LIST
8 def heimdal_path(p, absolute=False):
9 hpath = os.path.join("../heimdal", p)
10 if not absolute:
11 return hpath
12 return os.path.normpath(os.path.join(bld.path.abspath(), hpath))
14 def heimdal_paths(ps):
15 return [heimdal_path(p) for p in TO_LIST(ps)]
17 # waf build tool for building .et files with compile_et
18 def HEIMDAL_ASN1(name, source,
19 options='',
20 directory='',
21 option_file=None,
22 includes='',
23 template=True):
24 '''Build a ASN1 file using the asn1 compiler.
25 This will produce 2 output files'''
26 source = heimdal_path(source)
27 bname = os.path.basename(source)[0:-5]
28 dname = os.path.dirname(source)
29 asn1name = "%s_asn1" % bname
31 if option_file:
32 option_file = heimdal_path(option_file)
34 if not SET_TARGET_TYPE(bld, name, 'ASN1'):
35 return
37 # for ASN1 compilation, I always put it in build_source, as it doesn't make
38 # sense elsewhere
39 bld.set_group('build_source')
41 out_files = heimdal_paths([
42 "%s/asn1_%s_asn1.c" % (directory, bname),
43 "%s/%s_asn1.h" % (directory, bname),
44 "%s/%s_asn1-priv.h" % (directory, bname),
45 "%s/%s_asn1_oids.c" % (directory, bname),
48 # the ${TGT[0].parent.abspath(env)} expression gives us the parent directory of
49 # the first target in the build directory
50 # SRC[0].abspath(env) gives the absolute path to the source directory for the first
51 # source file. Note that in the case of a option_file, we have more than
52 # one source file
53 cd_rule = 'cd "${TGT[0].parent.abspath(env)}" &&'
54 env = LOAD_ENVIRONMENT()
55 if env.ADDRESS_SANITIZER:
56 # If address sanitizer is enabled, we need to suppress leak checking
57 # in the asn1 tool.
58 no_leak_check = " ASAN_OPTIONS=detect_leaks=0"
59 else:
60 no_leak_check = ""
62 if template:
63 template_str = " --template "
64 else:
65 template_str = ""
67 asn1_rule = cd_rule + \
68 no_leak_check + \
69 ' "${ASN1_COMPILE}" ${OPTION_FILE} ${ASN1OPTIONS} ' \
70 + template_str \
71 + ' --one-code-file "${SRC[0].abspath(env)}" ${ASN1NAME}'
73 source = TO_LIST(source)
75 if option_file is not None:
76 source.append(option_file)
78 deps = ''
79 if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
80 deps = 'asn1_compile'
82 t = bld(rule=asn1_rule,
83 ext_out = '.c',
84 before = 'c',
85 update_outputs = True,
86 shell = True,
87 source = source,
88 target = out_files,
89 depends_on = deps,
90 name=name + '_ASN1')
92 t.env.ASN1NAME = asn1name
93 t.env.ASN1OPTIONS = options
94 t.env.BLDBIN = os.path.normpath(os.path.join(bld.srcnode.abspath(bld.env), '..'))
95 if option_file is not None:
96 t.env.OPTION_FILE = "--option-file='%s'" % \
97 os.path.normpath(os.path.join(bld.path.abspath(), option_file))
99 cfile = out_files[0]
100 hfile = out_files[1]
101 hpriv = out_files[2]
103 bld.set_group('main')
105 includes = TO_LIST(includes)
106 includes.append(os.path.dirname(out_files[0]))
108 cflags=[]
109 if not template:
110 cflags = bld.env.HEIMDAL_UNPICKY_WNO_FREE_NOHEAP_OBJECT_CFLAGS
112 t = bld(features = 'c',
113 source = cfile,
114 target = name,
115 samba_cflags = CURRENT_CFLAGS(bld, name, cflags),
116 depends_on = '',
117 samba_deps = TO_LIST('roken replace heimbase '
118 'HEIMDAL_HEIM_ASN1'),
119 samba_includes = includes,
120 local_include = True)
123 def HEIMDAL_ERRTABLE(name, source):
124 '''Build a heimdal errtable from a .et file'''
126 source = heimdal_path(source)
128 bname = source[0:-3] # strip off the .et suffix
130 if not SET_TARGET_TYPE(bld, name, 'ET'):
131 return
133 bld.set_group('hostcc_build_source')
135 out_files = []
136 out_files.append('%s.c' % bname)
137 out_files.append('%s.h' % bname)
139 sources = [source, 'et_compile_wrapper.sh']
141 deps = ''
142 if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
143 deps = 'compile_et'
145 t = bld(rule='"${SRC[1].abspath(env)}" "${TGT[0].parent.abspath(env)}" "${COMPILE_ET}" "${SRC[0].abspath(env)}" ${TGT[0].bldpath(env)}',
146 ext_out = '.c',
147 before = 'c',
148 update_outputs = True,
149 shell = True,
150 source = sources,
151 target = out_files,
152 depends_on = deps,
153 name = name)
155 def HEIMDAL_AUTOPROTO(header, source, options=None, group='prototypes'):
156 '''rule for heimdal prototype generation'''
157 header = heimdal_path(header)
158 bld.set_group(group)
159 if options is None:
160 options='-q -P comment -o'
161 SET_TARGET_TYPE(bld, header, 'PROTOTYPE')
162 source = heimdal_paths(source)
163 t = bld(rule='${PERL} "${HEIMDAL}/cf/make-proto.pl" ${OPTIONS} "${TGT[0].abspath(env)}" ${SRC}',
164 source=source,
165 target=header,
166 update_outputs=True,
167 ext_out='.c',
168 before='c')
169 t.env.HEIMDAL = os.path.join(bld.srcnode.abspath(), 'third_party/heimdal')
170 t.env.OPTIONS = options
173 def HEIMDAL_AUTOPROTO_PRIVATE(header, source):
174 '''rule for private heimdal prototype generation'''
175 HEIMDAL_AUTOPROTO(header, source, options='-q -P comment -p')
178 def HEIMDAL_GENERATOR(name, rule, source='', target='',
179 group='generators'):
180 '''A generic source generator target'''
182 if not SET_TARGET_TYPE(bld, name, 'GENERATOR'):
183 return
185 bld.set_group(group)
186 return bld(
187 rule=rule,
188 source=source,
189 target=target,
190 shell=isinstance(rule, str),
191 update_outputs=True,
192 before='c',
193 ext_out='.c',
194 vars=[rule],
195 samba_type='GENERATOR',
196 name=name)
199 def HEIMDAL_LIBRARY(libname, source, deps, version_script=None, includes='', cflags=''):
200 '''define a Heimdal library'''
202 cflags, cflags_end, allow_warnings = HEIMDAL_CFLAGS(use_hostcc=False,
203 extra_cflags=cflags)
204 source = heimdal_paths(source)
205 if version_script is not None:
206 orig_vscript_map = heimdal_path(version_script, absolute=False)
207 else:
208 orig_vscript_map = None
209 bld.SAMBA_LIBRARY(libname, source,
210 deps=deps,
211 includes=includes,
212 cflags=cflags,
213 cflags_end=cflags_end,
214 allow_warnings=allow_warnings,
215 private_library=True,
216 orig_vscript_map=orig_vscript_map)
218 def HEIMDAL_CFLAGS(use_hostcc=False, extra_cflags=[]):
219 cflags_unpicky=[]
221 if bld.env.allow_heimdal_warnings:
222 cflags_unpicky += bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS
223 cflags_unpicky += bld.env.HEIMDAL_UNPICKY_WNO_MAYBE_UNINITIALIZED_CFLAGS
224 # old compilers on centos7 or ubuntu1604 need this
226 allow_warnings = bld.env.allow_heimdal_warnings
227 cflags_picky = bld.env.HEIMDAL_NO_ERROR_CFLAGS
228 extra_cflags=TO_LIST(extra_cflags)
230 cflags = ''
231 cflags_end = cflags_picky + cflags_unpicky + extra_cflags
232 return (cflags, cflags_end, allow_warnings)
234 def HEIMDAL_SUBSYSTEM(modname, source,
235 deps='',
236 includes='',
237 cflags='',
238 group='main',
239 use_hostcc=False,
240 use_global_deps=True):
241 '''define a Heimdal subsystem'''
243 cflags, cflags_end, allow_warnings = HEIMDAL_CFLAGS(use_hostcc=use_hostcc,
244 extra_cflags=cflags)
245 source = heimdal_paths(source)
247 bld.SAMBA_SUBSYSTEM(modname,
248 source = source,
249 deps = deps,
250 includes = includes,
251 cflags = cflags,
252 cflags_end = cflags_end,
253 allow_warnings = allow_warnings,
254 group = group,
255 use_hostcc = use_hostcc,
256 use_global_deps= use_global_deps)
258 def HEIMDAL_BINARY(binname, source,
259 deps='',
260 includes='',
261 cflags='',
262 use_hostcc=False,
263 use_global_deps=True,
264 compiler=None,
265 group='main',
266 install=True,
267 install_path=None):
268 '''define a Samba binary'''
270 cflags, cflags_end, allow_warnings = HEIMDAL_CFLAGS(use_hostcc=use_hostcc,
271 extra_cflags=cflags)
272 source = heimdal_paths(source)
274 obj_target = binname + '.heimdal.objlist'
276 HEIMDAL_SUBSYSTEM(obj_target,
277 source = source,
278 deps = deps,
279 includes = includes,
280 cflags = cflags,
281 group = group,
282 use_hostcc = use_hostcc,
283 use_global_deps= use_global_deps)
285 bld.SAMBA_BINARY(binname,
286 source = '',
287 deps = obj_target,
288 includes = includes,
289 cflags = cflags,
290 cflags_end = cflags_end,
291 allow_warnings = allow_warnings,
292 group = group,
293 use_hostcc = use_hostcc,
294 use_global_deps= use_global_deps,
295 install_path = None,
296 install = install)
299 if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):
301 if not bld.CONFIG_SET('HAVE_IFADDRS_H'):
302 HEIMDAL_GENERATOR(
303 name="HEIMDAL_IFADDRS_H",
304 rule="rm -f ${TGT} && ln ${SRC} ${TGT}",
305 source = 'ifaddrs.hin',
306 target = 'ifaddrs.h',
309 if not bld.CONFIG_SET('HAVE_ERR_H'):
310 HEIMDAL_GENERATOR(
311 group='hostcc_base_build_source',
312 name="HEIMDAL_ERR_H",
313 rule="rm -f ${TGT} && ln ${SRC} ${TGT}",
314 source = '../heimdal/lib/roken/err.hin',
315 target = '../heimdal/lib/roken/err.h',
318 ROKEN_COMMON_SOURCE = '''
319 lib/roken/base64.c
320 lib/roken/ct.c
321 lib/roken/hex.c
322 lib/roken/bswap.c
323 lib/roken/dumpdata.c
324 lib/roken/emalloc.c
325 lib/roken/ecalloc.c
326 lib/roken/getarg.c
327 lib/roken/getauxval.c
328 lib/roken/get_window_size.c
329 lib/roken/getdtablesize.c
330 lib/roken/h_errno.c
331 lib/roken/issuid.c
332 lib/roken/net_read.c
333 lib/roken/net_write.c
334 lib/roken/parse_time.c
335 lib/roken/parse_units.c
336 lib/roken/vis.c
337 lib/roken/strlwr.c
338 lib/roken/strsep_copy.c
339 lib/roken/strsep.c
340 lib/roken/strupr.c
341 lib/roken/strpool.c
342 lib/roken/estrdup.c
343 lib/roken/erealloc.c
344 lib/roken/secure_getenv.c
345 lib/roken/simple_exec.c
346 lib/roken/strcollect.c
347 lib/roken/rtbl.c
348 lib/roken/rand.c
349 lib/roken/cloexec.c
350 lib/roken/clz.c
351 lib/roken/xfree.c
352 lib/roken/timeval.c
353 lib/roken/mergesort.c
354 lib/roken/mergesort_r.c
355 ../heimdal_build/replace.c
358 ROKEN_HOSTCC_SOURCE = ROKEN_COMMON_SOURCE
360 ROKEN_SOURCE = ROKEN_COMMON_SOURCE + '''
361 lib/roken/resolve.c
362 lib/roken/socket.c
363 lib/roken/roken_gethostby.c
364 lib/roken/mkostemp.c
365 lib/roken/getuserinfo.c
368 HEIMDAL_LIBRARY('roken',
369 ROKEN_SOURCE,
370 includes='../heimdal/lib/roken ../heimdal/include ../heimdal_build/include',
371 deps='resolv util replace',
372 version_script='lib/roken/version-script.map',
375 HEIMDAL_SUBSYSTEM('ROKEN_HOSTCC',
376 ROKEN_HOSTCC_SOURCE,
377 use_hostcc=True,
378 use_global_deps=False,
379 includes='../heimdal/lib/roken ../heimdal/include ../heimdal_build/include',
380 group='hostcc_base_build_main',
381 deps='LIBREPLACE_HOSTCC',
384 if not bld.CONFIG_SET("USING_SYSTEM_KDC"):
385 HEIMDAL_LIB_GSS_PREAUTH_SOURCE = '''
386 lib/gss_preauth/pa_client.c
387 lib/gss_preauth/pa_common.c
390 HEIMDAL_LIBRARY('gss_preauth',
391 source=HEIMDAL_LIB_GSS_PREAUTH_SOURCE,
392 includes='../heimdal/lib/gss_preauth',
393 deps='roken gssapi')
394 HEIMDAL_AUTOPROTO('lib/gss_preauth/gss-preauth-private.h',
395 HEIMDAL_LIB_GSS_PREAUTH_SOURCE,
396 options='-q -P remove -p')
397 HEIMDAL_AUTOPROTO('lib/gss_preauth/gss-preauth-protos.h',
398 HEIMDAL_LIB_GSS_PREAUTH_SOURCE,
399 options='-E KRB5_LIB -q -P remove -o')
401 HEIMDAL_ASN1('HEIMDAL_KX509_ASN1',
402 'lib/asn1/kx509.asn1',
403 directory='lib/asn1'
405 HEIMDAL_ASN1('HEIMDAL_DIGEST_ASN1',
406 'lib/asn1/digest.asn1',
407 directory='lib/asn1'
410 KDC_SOURCE='kdc/default_config.c kdc/fast.c kdc/kerberos5.c kdc/krb5tgs.c kdc/pkinit.c kdc/pkinit-ec.c kdc/mssfu.c kdc/log.c kdc/misc.c kdc/digest.c kdc/process.c kdc/kdc-plugin.c kdc/kx509.c kdc/gss_preauth.c'
412 HEIMDAL_LIBRARY('kdc', source=KDC_SOURCE,
413 includes='../heimdal/kdc',
414 deps='roken krb5 hdb asn1 HEIMDAL_DIGEST_ASN1 HEIMDAL_KX509_ASN1 heimntlm hcrypto com_err wind heimbase gssapi gss_preauth',
415 version_script='kdc/version-script.map')
416 HEIMDAL_AUTOPROTO('kdc/kdc-protos.h', KDC_SOURCE, options='-E KDC_LIB -q -P comment -o')
417 HEIMDAL_AUTOPROTO_PRIVATE('kdc/kdc-private.h', KDC_SOURCE)
419 if not bld.CONFIG_SET("USING_SYSTEM_HEIMNTLM"):
420 HEIMDAL_ERRTABLE('HEIMNTLM_ET',
421 'lib/ntlm/ntlm_err.et')
423 HEIMNTLM_SOURCE = 'lib/ntlm/ntlm.c'
424 HEIMDAL_LIBRARY('heimntlm',
425 source=HEIMNTLM_SOURCE,
426 includes='../heimdal/lib/ntlm',
427 deps='roken hcrypto krb5',
428 version_script='lib/ntlm/version-script.map',
430 HEIMDAL_AUTOPROTO('lib/ntlm/heimntlm-protos.h', HEIMNTLM_SOURCE)
432 if not bld.CONFIG_SET("USING_SYSTEM_HDB"):
433 HEIMDAL_ASN1('HEIMDAL_HDB_ASN1', 'lib/hdb/hdb.asn1',
434 directory='lib/asn1',
435 option_file="lib/hdb/hdb.opt",
436 template=False,
437 includes='../heimdal/lib/asn1')
439 HDB_KEYS_SOURCE = 'lib/hdb/keys.c'
441 HEIMDAL_SUBSYSTEM('HEIMDAL_HDB_KEYS',
442 HDB_KEYS_SOURCE,
443 includes='../heimdal/lib/hdb',
444 deps='roken hcrypto krb5 HEIMDAL_HDB_ASN1',
447 HEIMDAL_ERRTABLE('HEIMDAL_HDB_ERR_ET', 'lib/hdb/hdb_err.et')
449 HDB_SOURCE = '''lib/hdb/db.c lib/hdb/dbinfo.c lib/hdb/hdb.c
450 lib/hdb/ext.c lib/hdb/keytab.c lib/hdb/hdb-keytab.c
451 lib/hdb/mkey.c lib/hdb/ndbm.c lib/hdb/hdb_err.c
452 lib/hdb/common.c
453 ../heimdal_build/hdb-glue.c'''
455 HEIMDAL_LIBRARY('hdb',
456 version_script='lib/hdb/version-script.map',
457 source=HDB_SOURCE,
458 includes='../heimdal/lib/hdb',
459 deps='krb5 HEIMDAL_HDB_KEYS roken hcrypto com_err HEIMDAL_HDB_ASN1 wind',
461 HEIMDAL_AUTOPROTO('lib/hdb/hdb-protos.h', HDB_SOURCE + " " + HDB_KEYS_SOURCE)
462 HEIMDAL_AUTOPROTO_PRIVATE('lib/hdb/hdb-private.h', HDB_SOURCE + " " + HDB_KEYS_SOURCE)
465 if not bld.CONFIG_SET("USING_SYSTEM_GSSAPI"):
466 HEIMDAL_ERRTABLE('HEIMDAL_NEGOEX_ERR_ET', 'lib/gssapi/spnego/negoex_err.et')
467 HEIMDAL_ERRTABLE('HEIMDAL_GKRB5_ERR_ET', 'lib/gssapi/krb5/gkrb5_err.et')
469 HEIMDAL_ASN1('HEIMDAL_GSSAPI_ASN1',
470 'lib/gssapi/mech/gssapi.asn1',
471 includes='../heimdal/lib/asn1',
472 template=False,
473 directory='lib/gssapi'
476 HEIMDAL_ASN1('HEIMDAL_SPNEGO_ASN1',
477 source='lib/gssapi/spnego/spnego.asn1',
478 options='--sequence=MechTypeList',
479 includes='../heimdal/lib/asn1',
480 template=False,
481 directory='lib/gssapi'
484 HEIMDAL_GSSAPI_SPNEGO_SOURCE = '''
485 lib/gssapi/spnego/init_sec_context.c
486 lib/gssapi/spnego/external.c
487 lib/gssapi/spnego/compat.c
488 lib/gssapi/spnego/context_stubs.c
489 lib/gssapi/spnego/context_storage.c
490 lib/gssapi/spnego/accept_sec_context.c
491 lib/gssapi/spnego/negoex_ctx.c
492 lib/gssapi/spnego/negoex_err.c
493 lib/gssapi/spnego/negoex_util.c
496 HEIMDAL_AUTOPROTO_PRIVATE('lib/gssapi/spnego/spnego-private.h',
497 HEIMDAL_GSSAPI_SPNEGO_SOURCE)
499 HEIMDAL_GSSAPI_KRB5_SOURCE = '''
500 lib/gssapi/krb5/copy_ccache.c
501 lib/gssapi/krb5/delete_sec_context.c
502 lib/gssapi/krb5/duplicate_cred.c
503 lib/gssapi/krb5/init_sec_context.c
504 lib/gssapi/krb5/context_time.c
505 lib/gssapi/krb5/init.c
506 lib/gssapi/krb5/address_to_krb5addr.c
507 lib/gssapi/krb5/get_mic.c
508 lib/gssapi/krb5/inquire_context.c
509 lib/gssapi/krb5/add_cred.c
510 lib/gssapi/krb5/inquire_cred.c
511 lib/gssapi/krb5/inquire_cred_by_oid.c
512 lib/gssapi/krb5/inquire_cred_by_mech.c
513 lib/gssapi/krb5/inquire_mechs_for_name.c
514 lib/gssapi/krb5/inquire_names_for_mech.c
515 lib/gssapi/krb5/indicate_mechs.c
516 lib/gssapi/krb5/inquire_sec_context_by_oid.c
517 lib/gssapi/krb5/name_attrs.c
518 lib/gssapi/krb5/export_sec_context.c
519 lib/gssapi/krb5/import_sec_context.c
520 lib/gssapi/krb5/duplicate_name.c
521 lib/gssapi/krb5/import_name.c
522 lib/gssapi/krb5/compare_name.c
523 lib/gssapi/krb5/export_name.c
524 lib/gssapi/krb5/canonicalize_name.c
525 lib/gssapi/krb5/unwrap.c
526 lib/gssapi/krb5/wrap.c
527 lib/gssapi/krb5/release_name.c
528 lib/gssapi/krb5/cfx.c
529 lib/gssapi/krb5/8003.c
530 lib/gssapi/krb5/arcfour.c
531 lib/gssapi/krb5/encapsulate.c
532 lib/gssapi/krb5/display_name.c
533 lib/gssapi/krb5/sequence.c
534 lib/gssapi/krb5/display_status.c
535 lib/gssapi/krb5/release_buffer.c
536 lib/gssapi/krb5/external.c
537 lib/gssapi/krb5/compat.c
538 lib/gssapi/krb5/creds.c
539 lib/gssapi/krb5/ccache_name.c
540 lib/gssapi/krb5/acquire_cred.c
541 lib/gssapi/krb5/release_cred.c
542 lib/gssapi/krb5/store_cred.c
543 lib/gssapi/krb5/set_cred_option.c
544 lib/gssapi/krb5/decapsulate.c
545 lib/gssapi/krb5/verify_mic.c
546 lib/gssapi/krb5/accept_sec_context.c
547 lib/gssapi/krb5/set_sec_context_option.c
548 lib/gssapi/krb5/process_context_token.c
549 lib/gssapi/krb5/prf.c
550 lib/gssapi/krb5/aeap.c
551 lib/gssapi/krb5/pname_to_uid.c
552 lib/gssapi/krb5/authorize_localname.c
553 lib/gssapi/krb5/gkrb5_err.c
556 HEIMDAL_AUTOPROTO_PRIVATE('lib/gssapi/krb5/gsskrb5-private.h',
557 HEIMDAL_GSSAPI_KRB5_SOURCE)
559 HEIMDAL_GSSAPI_MECH_SOURCE = '''
560 lib/gssapi/mech/cred.c
561 lib/gssapi/mech/context.c
562 lib/gssapi/mech/gss_krb5.c
563 lib/gssapi/mech/gss_mech_switch.c
564 lib/gssapi/mech/gss_process_context_token.c
565 lib/gssapi/mech/gss_buffer_set.c
566 lib/gssapi/mech/gss_aeap.c
567 lib/gssapi/mech/gss_add_cred.c
568 lib/gssapi/mech/gss_add_cred_from.c
569 lib/gssapi/mech/gss_acquire_cred_from.c
570 lib/gssapi/mech/gss_cred.c
571 lib/gssapi/mech/gss_store_cred_into.c
572 lib/gssapi/mech/gss_add_oid_set_member.c
573 lib/gssapi/mech/gss_compare_name.c
574 lib/gssapi/mech/gss_release_oid_set.c
575 lib/gssapi/mech/gss_create_empty_oid_set.c
576 lib/gssapi/mech/gss_duplicate_oid_set.c
577 lib/gssapi/mech/gss_decapsulate_token.c
578 lib/gssapi/mech/gss_inquire_cred_by_oid.c
579 lib/gssapi/mech/gss_canonicalize_name.c
580 lib/gssapi/mech/gss_inquire_sec_context_by_oid.c
581 lib/gssapi/mech/gss_inquire_names_for_mech.c
582 lib/gssapi/mech/gss_inquire_mechs_for_name.c
583 lib/gssapi/mech/gss_wrap_size_limit.c
584 lib/gssapi/mech/gss_names.c
585 lib/gssapi/mech/gss_verify.c
586 lib/gssapi/mech/gss_display_name.c
587 lib/gssapi/mech/gss_duplicate_oid.c
588 lib/gssapi/mech/gss_duplicate_cred.c
589 lib/gssapi/mech/gss_display_status.c
590 lib/gssapi/mech/gss_release_buffer.c
591 lib/gssapi/mech/gss_release_oid.c
592 lib/gssapi/mech/gss_test_oid_set_member.c
593 lib/gssapi/mech/gss_release_cred.c
594 lib/gssapi/mech/gss_set_sec_context_option.c
595 lib/gssapi/mech/gss_export_name.c
596 lib/gssapi/mech/gss_seal.c
597 lib/gssapi/mech/gss_acquire_cred.c
598 lib/gssapi/mech/gss_unseal.c
599 lib/gssapi/mech/gss_verify_mic.c
600 lib/gssapi/mech/gss_accept_sec_context.c
601 lib/gssapi/mech/gss_inquire_cred_by_mech.c
602 lib/gssapi/mech/gss_indicate_mechs.c
603 lib/gssapi/mech/gss_get_neg_mechs.c
604 lib/gssapi/mech/gss_delete_sec_context.c
605 lib/gssapi/mech/gss_sign.c
606 lib/gssapi/mech/gss_utils.c
607 lib/gssapi/mech/gss_init_sec_context.c
608 lib/gssapi/mech/gss_oid_equal.c
609 lib/gssapi/mech/gss_oid.c
610 lib/gssapi/mech/gss_oid_to_str.c
611 lib/gssapi/mech/gss_mo.c
612 lib/gssapi/mech/gss_context_time.c
613 lib/gssapi/mech/gss_encapsulate_token.c
614 lib/gssapi/mech/gss_get_mic.c
615 lib/gssapi/mech/gss_import_sec_context.c
616 lib/gssapi/mech/gss_inquire_cred.c
617 lib/gssapi/mech/gss_wrap.c
618 lib/gssapi/mech/gss_import_name.c
619 lib/gssapi/mech/gss_duplicate_name.c
620 lib/gssapi/mech/gss_unwrap.c
621 lib/gssapi/mech/gss_export_sec_context.c
622 lib/gssapi/mech/gss_export_name_composite.c
623 lib/gssapi/mech/gss_inquire_context.c
624 lib/gssapi/mech/gss_release_name.c
625 lib/gssapi/mech/gss_set_cred_option.c
626 lib/gssapi/mech/gss_pseudo_random.c
627 lib/gssapi/mech/gss_authorize_localname.c
628 lib/gssapi/mech/gss_get_name_attribute.c
629 lib/gssapi/mech/gssspi_exchange_meta_data.c
630 lib/gssapi/mech/gssspi_query_mechanism_info.c
631 lib/gssapi/mech/gssspi_query_meta_data.c
632 ../heimdal_build/gssapi-glue.c
635 HEIMDAL_SUBSYSTEM('gssapi-subsystem',
636 HEIMDAL_GSSAPI_SPNEGO_SOURCE +
637 HEIMDAL_GSSAPI_KRB5_SOURCE +
638 HEIMDAL_GSSAPI_MECH_SOURCE,
639 includes='../heimdal/lib/gssapi/gssapi ../heimdal/lib/gssapi/spnego ../heimdal/lib/gssapi/krb5 ../heimdal/lib/gssapi/mech ../heimdal/lib/ntlm',
640 deps='hcrypto asn1 HEIMDAL_SPNEGO_ASN1 HEIMDAL_GSSAPI_ASN1 roken krb5 com_err wind heimbase',
641 cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS,
644 HEIMDAL_LIBRARY('gssapi',
646 includes='../heimdal/lib/gssapi/gssapi ../heimdal/lib/gssapi/spnego ../heimdal/lib/gssapi/krb5 ../heimdal/lib/gssapi/mech ../heimdal/lib/ntlm',
647 deps='gssapi-subsystem',
648 version_script='lib/gssapi/version-script.map',
651 if not bld.CONFIG_SET("USING_SYSTEM_KRB5"):
652 # expand_path.c needs some of the install paths
653 HEIMDAL_SUBSYSTEM('HEIMDAL_CONFIG',
654 'lib/krb5/expand_path.c lib/krb5/plugin.c lib/krb5/context.c',
655 includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/include',
656 cflags=bld.dynconfig_cflags('LIBDIR BINDIR LIBEXECDIR SBINDIR'),
657 deps='hcrypto heimbase wind hx509 com_err'
660 HEIMDAL_SUBSYSTEM('HEIMDAL_IPC_CLIENT',
661 [os.path.join('lib/ipc', x) for x in TO_LIST(
662 '''client.c common.c''')],
663 includes='../heimdal/include ../heimdal/lib/asn1 ../heimdal/lib/ipc',
664 deps='roken heimbase')
666 HEIMDAL_ERRTABLE('HEIMDAL_KRB5_ERR_ET', 'lib/krb5/krb5_err.et')
668 HEIMDAL_ERRTABLE('HEIMDAL_KRB_ERR_ET', 'lib/krb5/krb_err.et')
670 HEIMDAL_ERRTABLE('HEIMDAL_K524_ERR_ET', 'lib/krb5/k524_err.et')
672 HEIMDAL_ERRTABLE('HEIMDAL_K5E1_ERR_ET', 'lib/krb5/k5e1_err.et')
674 HEIMDAL_ERRTABLE('HEIMDAL_KX509_ERR_ET', 'lib/krb5/kx509_err.et')
676 HEIMDAL_ERRTABLE('HEIMDAL_HEIM_ERR_ET', 'lib/base/heim_err.et')
678 krb5_crypto_cflags = []
679 if bld.CONFIG_SET('HAVE_WUSE_AFTER_FREE_1'):
680 krb5_crypto_cflags.append('-Werror=use-after-free=1')
683 HEIMDAL_SUBSYSTEM('KRB5_CRYPTO',
684 'lib/krb5/crypto.c',
685 includes='../heimdal/lib/krb5 ../heimdal/include',
686 deps='wind hcrypto',
687 cflags=krb5_crypto_cflags)
689 KRB5_SOURCE = [os.path.join('lib/krb5/', x) for x in TO_LIST(
690 '''acache.c add_et_list.c
691 addr_families.c appdefault.c
692 asn1_glue.c auth_context.c authdata.c
693 build_ap_req.c build_auth.c cache.c
694 changepw.c codec.c config_file.c
695 constants.c convert_creds.c
696 copy_host_realm.c crc.c creds.c
697 crypto-aes-sha1.c crypto-aes-sha2.c crypto-algs.c
698 crypto-arcfour.c crypto-des3.c crypto-des.c
699 crypto-des-common.c crypto-evp.c
700 crypto-null.c crypto-pk.c crypto-rand.c
701 data.c dcache.c db_plugin.c deprecated.c eai_to_heim_errno.c enomem.c
702 error_string.c expand_hostname.c
703 fast.c fcache.c free.c free_host_realm.c
704 generate_seq_number.c generate_subkey.c
705 get_addrs.c get_cred.c
706 get_default_principal.c
707 get_default_realm.c get_for_creds.c
708 get_host_realm.c get_in_tkt.c
709 get_port.c init_creds.c init_creds_pw.c
710 kcm.c keyblock.c keytab.c keytab_any.c
711 keytab_file.c keytab_memory.c
712 keytab_keyfile.c krbhst.c krcache.c log.c
713 mcache.c misc.c mk_error.c mk_priv.c
714 mk_rep.c mk_req.c mk_req_ext.c
715 mit_glue.c net_read.c net_write.c n-fold.c padata.c pkinit.c pkinit-ec.c
716 principal.c prog_setup.c pac.c
717 pcache.c prompter_posix.c rd_cred.c rd_error.c
718 rd_priv.c rd_rep.c rd_req.c replay.c
719 salt.c salt-aes-sha1.c salt-aes-sha2.c salt-arcfour.c salt-des3.c salt-des.c
720 send_to_kdc.c set_default_realm.c
721 store.c store-int.c store_emem.c store_fd.c
722 store_mem.c store_stdio.c ticket.c time.c transited.c
723 version.c warn.c krb5_err.c sp800-108-kdf.c
724 aname_to_localname.c kuserok.c kx509.c
725 mk_cred.c kx509_err.c
726 k524_err.c krb_err.c k5e1_err.c''')] + ["../heimdal_build/krb5-glue.c"]
728 krb5_keyutils_dep = ''
729 if bld.CONFIG_SET('HAVE_KEYCTL_GET_PERSISTENT'):
730 krb5_keyutils_dep = ' keyutils'
732 HEIMDAL_LIBRARY('krb5', KRB5_SOURCE,
733 version_script='lib/krb5/version-script.map',
734 includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/include',
735 deps='roken wind asn1 hx509 HEIMDAL_KX509_ASN1 hcrypto com_err HEIMDAL_CONFIG heimbase execinfo samba_intl HEIMDAL_IPC_CLIENT KRB5_CRYPTO' + krb5_keyutils_dep,
736 cflags=['-DLOCALSTATEDIR="/2"'] + bld.dynconfig_cflags(),
738 KRB5_PROTO_SOURCE = KRB5_SOURCE + ['lib/krb5/expand_path.c', 'lib/krb5/plugin.c', 'lib/krb5/context.c', 'lib/krb5/crypto.c']
740 HEIMDAL_AUTOPROTO_PRIVATE('lib/krb5/krb5-private.h', KRB5_PROTO_SOURCE)
741 HEIMDAL_AUTOPROTO('lib/krb5/krb5-protos.h', KRB5_PROTO_SOURCE,
742 options='-E KRB5_LIB -q -P comment -o')
744 if not bld.CONFIG_SET("USING_SYSTEM_ASN1"):
745 HEIMDAL_HEIM_ASN1_SOURCE = '''
746 lib/asn1/der_get.c
747 lib/asn1/der_put.c
748 lib/asn1/der_free.c
749 lib/asn1/der_format.c
750 lib/asn1/der_length.c
751 lib/asn1/der_copy.c
752 lib/asn1/der_cmp.c
753 lib/asn1/der_print.c
754 lib/asn1/extra.c
755 lib/asn1/timegm.c
756 lib/asn1/template.c
757 lib/asn1/oid_resolution.c
760 HEIMDAL_AUTOPROTO('lib/asn1/der-protos.h',
761 HEIMDAL_HEIM_ASN1_SOURCE,
762 group='hostcc_build_source',
763 options="-q -P comment -o")
766 HEIMDAL_AUTOPROTO('lib/asn1/der-private.h',
767 HEIMDAL_HEIM_ASN1_SOURCE,
768 group='hostcc_build_source',
769 options="-q -P comment -p")
771 HEIMDAL_ERRTABLE('HEIMDAL_ASN1_ERR_ET', 'lib/asn1/asn1_err.et')
773 heimdal_heim_asn1_cflags = ''
774 if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
775 heimdal_heim_asn1_cflags = '-Wno-format-truncation'
777 HEIMDAL_SUBSYSTEM('HEIMDAL_HEIM_ASN1',
778 HEIMDAL_HEIM_ASN1_SOURCE + 'lib/asn1/asn1_err.c',
779 includes='../heimdal/lib/asn1',
780 cflags=heimdal_heim_asn1_cflags,
781 deps='''roken com_err
782 HEIMDAL_CMS_ASN1
783 HEIMDAL_DIGEST_ASN1
784 HEIMDAL_KRB5_ASN1
785 HEIMDAL_KX509_ASN1
786 HEIMDAL_OCSP_ASN1
787 HEIMDAL_PKCS10_ASN1
788 HEIMDAL_PKCS12_ASN1
789 HEIMDAL_PKCS8_ASN1
790 HEIMDAL_PKCS9_ASN1
791 HEIMDAL_PKINIT_ASN1
792 HEIMDAL_RFC2459_ASN1
793 HEIMDAL_RFC4108_ASN1
797 HEIMDAL_ASN1('HEIMDAL_CRMF_ASN1',
798 'lib/asn1/crmf.asn1',
799 option_file='lib/asn1/crmf.opt',
800 directory='lib/asn1',
801 template=False
804 HEIMDAL_ASN1('HEIMDAL_RFC2459_ASN1',
805 'lib/asn1/rfc2459.asn1',
806 option_file='lib/asn1/rfc2459.opt',
807 directory='lib/asn1'
810 HEIMDAL_ASN1('HEIMDAL_RFC4108_ASN1',
811 'lib/asn1/rfc4108.asn1',
812 directory='lib/asn1'
815 HEIMDAL_ASN1('HEIMDAL_KRB5_ASN1',
816 'lib/asn1/krb5.asn1',
817 option_file='lib/asn1/krb5.opt',
818 directory='lib/asn1'
821 HEIMDAL_ASN1('HEIMDAL_PKINIT_ASN1',
822 'lib/asn1/pkinit.asn1',
823 directory='lib/asn1'
826 HEIMDAL_ASN1('HEIMDAL_CMS_ASN1',
827 'lib/asn1/cms.asn1',
828 option_file='lib/asn1/cms.opt',
829 directory='lib/asn1'
832 HEIMDAL_LIBRARY('asn1',
833 version_script='lib/asn1/version-script.map',
834 deps="HEIMDAL_HEIM_ASN1 HEIMDAL_RFC2459_ASN1 HEIMDAL_KRB5_ASN1 HEIMDAL_PKINIT_ASN1 HEIMDAL_CMS_ASN1",
835 source='')
837 if not bld.CONFIG_SET('USING_SYSTEM_HCRYPTO'):
838 if not bld.CONFIG_SET("USING_SYSTEM_TOMMATH"):
839 # As directly listed in lib/hcrypto/libtommath/makefile.shared
840 libtommath_o = "\
841 bn_cutoffs.o bn_deprecated.o bn_mp_2expt.o bn_mp_abs.o bn_mp_add.o bn_mp_add_d.o bn_mp_addmod.o \
842 bn_mp_and.o bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o \
843 bn_mp_cnt_lsb.o bn_mp_complement.o bn_mp_copy.o bn_mp_count_bits.o bn_mp_decr.o bn_mp_div.o bn_mp_div_2.o \
844 bn_mp_div_2d.o bn_mp_div_3.o bn_mp_div_d.o bn_mp_dr_is_modulus.o bn_mp_dr_reduce.o bn_mp_dr_setup.o \
845 bn_mp_error_to_string.o bn_mp_exch.o bn_mp_expt_u32.o bn_mp_exptmod.o bn_mp_exteuclid.o bn_mp_fread.o \
846 bn_mp_from_sbin.o bn_mp_from_ubin.o bn_mp_fwrite.o bn_mp_gcd.o bn_mp_get_double.o bn_mp_get_i32.o \
847 bn_mp_get_i64.o bn_mp_get_l.o bn_mp_get_ll.o bn_mp_get_mag_u32.o bn_mp_get_mag_u64.o bn_mp_get_mag_ul.o \
848 bn_mp_get_mag_ull.o bn_mp_grow.o bn_mp_incr.o bn_mp_init.o bn_mp_init_copy.o bn_mp_init_i32.o \
849 bn_mp_init_i64.o bn_mp_init_l.o bn_mp_init_ll.o bn_mp_init_multi.o bn_mp_init_set.o bn_mp_init_size.o \
850 bn_mp_init_u32.o bn_mp_init_u64.o bn_mp_init_ul.o bn_mp_init_ull.o bn_mp_invmod.o bn_mp_is_square.o \
851 bn_mp_iseven.o bn_mp_isodd.o bn_mp_kronecker.o bn_mp_lcm.o bn_mp_log_u32.o bn_mp_lshd.o bn_mp_mod.o \
852 bn_mp_mod_2d.o bn_mp_mod_d.o bn_mp_montgomery_calc_normalization.o bn_mp_montgomery_reduce.o \
853 bn_mp_montgomery_setup.o bn_mp_mul.o bn_mp_mul_2.o bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_mulmod.o bn_mp_neg.o \
854 bn_mp_or.o bn_mp_pack.o bn_mp_pack_count.o bn_mp_prime_fermat.o bn_mp_prime_frobenius_underwood.o \
855 bn_mp_prime_is_prime.o bn_mp_prime_miller_rabin.o bn_mp_prime_next_prime.o \
856 bn_mp_prime_rabin_miller_trials.o bn_mp_prime_rand.o bn_mp_prime_strong_lucas_selfridge.o \
857 bn_mp_radix_size.o bn_mp_radix_smap.o bn_mp_rand.o bn_mp_read_radix.o bn_mp_reduce.o bn_mp_reduce_2k.o \
858 bn_mp_reduce_2k_l.o bn_mp_reduce_2k_setup.o bn_mp_reduce_2k_setup_l.o bn_mp_reduce_is_2k.o \
859 bn_mp_reduce_is_2k_l.o bn_mp_reduce_setup.o bn_mp_root_u32.o bn_mp_rshd.o bn_mp_sbin_size.o bn_mp_set.o \
860 bn_mp_set_double.o bn_mp_set_i32.o bn_mp_set_i64.o bn_mp_set_l.o bn_mp_set_ll.o bn_mp_set_u32.o \
861 bn_mp_set_u64.o bn_mp_set_ul.o bn_mp_set_ull.o bn_mp_shrink.o bn_mp_signed_rsh.o bn_mp_sqr.o \
862 bn_mp_sqrmod.o bn_mp_sqrt.o bn_mp_sqrtmod_prime.o bn_mp_sub.o bn_mp_sub_d.o bn_mp_submod.o \
863 bn_mp_to_radix.o bn_mp_to_sbin.o bn_mp_to_ubin.o bn_mp_ubin_size.o bn_mp_unpack.o bn_mp_xor.o bn_mp_zero.o \
864 bn_prime_tab.o bn_s_mp_add.o bn_s_mp_balance_mul.o bn_s_mp_exptmod.o bn_s_mp_exptmod_fast.o \
865 bn_s_mp_get_bit.o bn_s_mp_invmod_fast.o bn_s_mp_invmod_slow.o bn_s_mp_karatsuba_mul.o \
866 bn_s_mp_karatsuba_sqr.o bn_s_mp_montgomery_reduce_fast.o bn_s_mp_mul_digs.o bn_s_mp_mul_digs_fast.o \
867 bn_s_mp_mul_high_digs.o bn_s_mp_mul_high_digs_fast.o bn_s_mp_prime_is_divisible.o \
868 bn_s_mp_rand_jenkins.o bn_s_mp_rand_platform.o bn_s_mp_reverse.o bn_s_mp_sqr.o bn_s_mp_sqr_fast.o \
869 bn_s_mp_sub.o bn_s_mp_toom_mul.o bn_s_mp_toom_sqr.o"
871 full_path_libtommath_c = \
872 [os.path.join('lib/hcrypto/libtommath',
873 x.split(".o")[0] + ".c")
874 for x in TO_LIST(libtommath_o)]
876 HEIMDAL_SUBSYSTEM('tommath',
877 full_path_libtommath_c,
878 includes='../heimdal/lib/hcrypto/libtommath'
881 HEIMDAL_LIBRARY('hcrypto',
882 'lib/hcrypto/aes.c lib/hcrypto/bn.c lib/hcrypto/dh.c lib/hcrypto/dh-ltm.c lib/hcrypto/des.c lib/hcrypto/dsa.c lib/hcrypto/engine.c lib/hcrypto/md4.c lib/hcrypto/md5.c lib/hcrypto/rsa.c lib/hcrypto/rsa-ltm.c lib/hcrypto/rc2.c lib/hcrypto/rc4.c lib/hcrypto/rijndael-alg-fst.c lib/hcrypto/rnd_keys.c lib/hcrypto/sha.c lib/hcrypto/sha256.c lib/hcrypto/sha512.c lib/hcrypto/ui.c lib/hcrypto/evp.c lib/hcrypto/evp-hcrypto.c lib/hcrypto/pkcs5.c lib/hcrypto/pkcs12.c lib/hcrypto/rand.c lib/hcrypto/rand-unix.c lib/hcrypto/rand-fortuna.c lib/hcrypto/rand-timer.c lib/hcrypto/hmac.c lib/hcrypto/camellia.c lib/hcrypto/camellia-ntt.c lib/hcrypto/common.c lib/hcrypto/validate.c',
883 includes='../heimdal/lib/hcrypto ../heimdal/lib ../heimdal/include',
884 deps='roken asn1 tommath replace',
885 version_script='lib/hcrypto/version-script.map',
888 if not bld.CONFIG_SET('USING_SYSTEM_HEIMBASE'):
889 HEIMBASE_SOURCE_COMMON = '''
890 lib/base/array.c
891 lib/base/bool.c
892 lib/base/bsearch.c
893 lib/base/data.c
894 lib/base/db.c
895 lib/base/dict.c
896 lib/base/error.c
897 lib/base/heimbase.c
898 lib/base/string.c
899 lib/base/number.c
900 lib/base/null.c
901 lib/base/json.c
902 lib/base/heim_err.c
904 HEIMBASE_SOURCE = HEIMBASE_SOURCE_COMMON + '''
905 lib/base/config_file.c
906 lib/base/context.c
907 lib/base/error_string.c
908 lib/base/expand_path.c
909 lib/base/log.c
910 lib/base/plugin.c
911 lib/base/warn.c
913 HEIMDAL_AUTOPROTO('lib/base/heimbase-protos.h',
914 HEIMBASE_SOURCE,
915 group='hostcc_build_source')
916 HEIMDAL_LIBRARY('heimbase',
917 HEIMBASE_SOURCE,
918 includes='../heimdal/lib/base ../heimdal/include ../heimdal/lib/krb5',
919 deps='roken replace com_err',
920 cflags=['-DLOCALSTATEDIR="/2"'] + bld.dynconfig_cflags(),
921 version_script='lib/base/version-script.map',
924 HEIMBASE_HOSTCC_SOURCE = HEIMBASE_SOURCE_COMMON + '''
925 lib/com_err/com_err.c
926 lib/com_err/error.c
928 HEIMDAL_SUBSYSTEM('HEIMBASE_HOSTCC',
929 HEIMBASE_HOSTCC_SOURCE,
930 use_hostcc=True,
931 use_global_deps=False,
932 includes='../heimdal/lib/base ../heimdal/lib/com_err ../heimdal/include ../heimdal/lib/krb5',
933 group='hostcc_build_main',
934 deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC',
937 if not bld.CONFIG_SET("USING_SYSTEM_HX509"):
938 HEIMDAL_ASN1('HEIMDAL_OCSP_ASN1',
939 'lib/asn1/ocsp.asn1',
940 options='--preserve-binary=OCSPTBSRequest --preserve-binary=OCSPResponseData',
941 includes='../heimdal/lib/asn1',
942 directory='lib/hx509'
945 HEIMDAL_ASN1('HEIMDAL_PKCS8_ASN1',
946 'lib/asn1/pkcs8.asn1',
947 directory='lib/asn1'
951 HEIMDAL_ASN1('HEIMDAL_PKCS9_ASN1',
952 'lib/asn1/pkcs9.asn1',
953 directory='lib/asn1'
957 HEIMDAL_ASN1('HEIMDAL_PKCS12_ASN1',
958 'lib/asn1/pkcs12.asn1',
959 directory='lib/asn1'
962 HEIMDAL_ASN1('HEIMDAL_PKCS10_ASN1',
963 'lib/asn1/pkcs10.asn1',
964 options='--preserve-binary=CertificationRequestInfo',
965 includes='../heimdal/lib/asn1',
966 directory='lib/hx509'
969 HEIMDAL_ERRTABLE('HEIMDAL_HX509_ERR_ET',
970 'lib/hx509/hx509_err.et')
972 HEIMDAL_HX509_OBJH_SOURCE = '''
973 lib/hx509/ca.c
974 lib/hx509/cert.c
975 lib/hx509/cms.c
976 lib/hx509/collector.c
977 lib/hx509/crypto.c
978 lib/hx509/crypto-ec.c
979 lib/hx509/error.c
980 lib/hx509/env.c
981 lib/hx509/file.c
982 lib/hx509/keyset.c
983 lib/hx509/ks_dir.c
984 lib/hx509/ks_file.c
985 lib/hx509/ks_keychain.c
986 lib/hx509/ks_mem.c
987 lib/hx509/ks_null.c
988 lib/hx509/ks_p11.c
989 lib/hx509/ks_p12.c
990 lib/hx509/lock.c
991 lib/hx509/name.c
992 lib/hx509/peer.c
993 lib/hx509/print.c
994 lib/hx509/req.c
995 lib/hx509/revoke.c
996 lib/hx509/sel.c
997 lib/hx509/hx509_err.c
1000 HEIMDAL_AUTOPROTO('lib/hx509/hx509-protos.h',
1001 HEIMDAL_HX509_OBJH_SOURCE,
1002 options="-R '^(_|^C)' -E HX509_LIB -q -P comment -o")
1004 HEIMDAL_AUTOPROTO('lib/hx509/hx509-private.h',
1005 HEIMDAL_HX509_OBJH_SOURCE,
1006 options="-q -P comment -p")
1008 HEIMDAL_LIBRARY('hx509',
1009 HEIMDAL_HX509_OBJH_SOURCE + ' lib/hx509/sel-lex.l lib/hx509/sel-gram.y',
1010 includes='../heimdal/lib/hx509',
1011 deps='roken com_err asn1 hcrypto asn1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKCS10_ASN1 wind heimbase',
1012 cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS,
1013 version_script='lib/hx509/version-script.map',
1016 if not bld.CONFIG_SET('USING_SYSTEM_WIND'):
1017 HEIMDAL_ERRTABLE('WIND_ERR_ET',
1018 'lib/wind/wind_err.et')
1020 HEIMDAL_GENERATOR(
1021 name="HEIMDAL_ERRORLIST",
1022 rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'",
1023 source = '../heimdal/lib/wind/gen-errorlist.py ../heimdal/lib/wind/rfc3454.txt ../heimdal/lib/wind/stringprep.py',
1024 target = '../heimdal/lib/wind/errorlist_table.c ../heimdal/lib/wind/errorlist_table.h'
1028 HEIMDAL_GENERATOR(
1029 name = 'HEIMDAL_NORMALIZE_TABLE',
1030 rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[2].abspath()}' '${SRC[1].parent.abspath(env)}'",
1031 source = '../heimdal/lib/wind/gen-normalize.py ../heimdal/lib/wind/UnicodeData.txt ../heimdal/lib/wind/CompositionExclusions-3.2.0.txt',
1032 target = '../heimdal/lib/wind/normalize_table.h ../heimdal/lib/wind/normalize_table.c'
1035 HEIMDAL_GENERATOR(
1036 name = 'HEIMDAL_COMBINING_TABLE',
1037 rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'",
1038 source = '../heimdal/lib/wind/gen-combining.py ../heimdal/lib/wind/UnicodeData.txt',
1039 target = '../heimdal/lib/wind/combining_table.h ../heimdal/lib/wind/combining_table.c'
1042 HEIMDAL_GENERATOR(
1043 name = 'HEIMDAL_BIDI_TABLE',
1044 rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'",
1045 source = '../heimdal/lib/wind/gen-bidi.py ../heimdal/lib/wind/rfc3454.txt',
1046 target = '../heimdal/lib/wind/bidi_table.h ../heimdal/lib/wind/bidi_table.c'
1050 HEIMDAL_GENERATOR(
1051 name = 'HEIMDAL_MAP_TABLE',
1052 rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[2].abspath()}' '${SRC[2].parent.abspath(env)}'",
1053 source = '../heimdal/lib/wind/gen-map.py ../heimdal/lib/wind/stringprep.py ../heimdal/lib/wind/rfc3454.txt',
1054 target = '../heimdal/lib/wind/map_table.h ../heimdal/lib/wind/map_table.c'
1057 HEIMDAL_LIBRARY('wind',
1058 'lib/wind/wind_err.c lib/wind/stringprep.c lib/wind/errorlist.c lib/wind/errorlist_table.c lib/wind/normalize.c lib/wind/normalize_table.c lib/wind/combining.c lib/wind/combining_table.c lib/wind/utf8.c lib/wind/bidi.c lib/wind/bidi_table.c lib/wind/ldap.c lib/wind/map.c lib/wind/map_table.c',
1059 includes='../heimdal/lib/wind',
1060 deps='roken com_err',
1061 version_script='lib/wind/version-script.map',
1064 if not bld.CONFIG_SET('USING_SYSTEM_COM_ERR'):
1065 HEIMDAL_LIBRARY('com_err',
1066 'lib/com_err/com_err.c lib/com_err/error.c',
1067 includes='../heimdal/lib/com_err',
1068 deps='roken samba_intl',
1069 version_script='lib/com_err/version-script.map',
1072 HEIMDAL_SUBSYSTEM('HEIMDAL_VERS_HOSTCC',
1073 'lib/vers/print_version.c ../heimdal_build/version.c',
1074 group='hostcc_base_build_main',
1075 deps='LIBREPLACE_HOSTCC ROKEN_HOSTCC',
1076 use_global_deps=False,
1077 use_hostcc=True)
1079 HEIMDAL_SUBSYSTEM('HEIMDAL_VERS',
1080 'lib/vers/print_version.c ../heimdal_build/version.c',
1081 deps='roken replace')
1084 if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
1085 HEIMDAL_SUBSYSTEM('HEIMDAL_ASN1_GEN_HOSTCC',
1086 'lib/asn1/gen.c',
1087 includes='../heimdal/lib/asn1',
1088 group='hostcc_build_main',
1089 cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS,
1090 deps='ROKEN_HOSTCC HEIMBASE_HOSTCC',
1091 use_global_deps=False,
1092 use_hostcc=True)
1094 # here is the asn1 compiler build rule
1095 HEIMDAL_BINARY('asn1_compile',
1096 'lib/asn1/gen_copy.c lib/asn1/gen_print.c '
1097 'lib/asn1/gen_decode.c lib/asn1/gen_encode.c lib/asn1/gen_free.c '
1098 'lib/asn1/gen_glue.c lib/asn1/gen_length.c lib/asn1/gen_seq.c '
1099 'lib/asn1/gen_template.c lib/asn1/hash.c lib/asn1/symbol.c '
1100 'lib/asn1/asn1parse.y lib/asn1/lex.l lib/asn1/main.c',
1101 use_hostcc=True,
1102 use_global_deps=False,
1103 includes='../heimdal/lib/asn1',
1104 group='hostcc_build_main',
1105 deps='ROKEN_HOSTCC HEIMBASE_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC '
1106 'HEIMDAL_ASN1_GEN_HOSTCC',
1107 install=False
1109 bld.env['ASN1_COMPILE'] = os.path.join(bld.bldnode.parent.abspath(), 'asn1_compile')
1112 if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
1113 HEIMDAL_BINARY('compile_et',
1114 'lib/com_err/parse.y lib/com_err/lex.l lib/com_err/compile_et.c',
1115 use_hostcc=True,
1116 use_global_deps=False,
1117 includes='../heimdal/lib/com_err',
1118 group='hostcc_base_build_main',
1119 deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
1120 install=False
1122 bld.env['COMPILE_ET'] = os.path.join(bld.bldnode.parent.abspath(), 'compile_et')
1124 if bld.CONFIG_SET('USING_EMBEDDED_HEIMDAL'):
1125 HEIMDAL_BINARY('samba4kinit',
1126 'kuser/kinit.c',
1127 deps='krb5 heimntlm roken HEIMDAL_VERS hcrypto gssapi gss_preauth',
1128 install=False
1131 HEIMDAL_BINARY('samba4kgetcred',
1132 'kuser/kgetcred.c',
1133 deps='krb5 heimntlm roken HEIMDAL_VERS hcrypto asn1 gssapi gss_preauth',
1134 install=False
1137 HEIMDAL_BINARY('samba4kpasswd',
1138 'kpasswd/kpasswd.c',
1139 deps='krb5 heimntlm roken HEIMDAL_VERS hcrypto',
1140 install=False
1143 # Alias subsystem to allow common kerberos code that will
1144 # otherwise link against MIT's gssapi_krb5 and k5crypto
1146 # Note: that we also need this if we use system heimdal libraries
1147 HEIMDAL_SUBSYSTEM('gssapi_krb5', '', deps='gssapi')
1148 HEIMDAL_SUBSYSTEM('k5crypto', '', deps='krb5')