925 Commits

Author SHA1 Message Date
Nicolas Williams
097e96cbf4 Look for emalloc
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
3a0bf8eb0c Allow choice of sqlite for HDB pref 2017-01-24 11:08:30 -06:00
Nicolas Williams
fa2afcc5fc Add #ifndef DOXY guard to generated headers
cf/make-proto.pl copies Doxygen docs to -private and -protos headers.
We need to either extract these from those files but not source files,
or only from source files but not the generated headers.  This commit
does the latter.
2016-12-14 22:05:58 -06:00
Nicolas Williams
3422afb291 Fix -ldb-5 discovery (#215) 2016-12-08 18:30:58 -06:00
Nicolas Williams
27d7939d74 Improve valgrind suppressions 2016-12-06 22:44:23 -06:00
Viktor Dukhovni
d454492d01 Drop X11 autoconf and travis deps 2016-11-14 14:34:43 -05:00
Viktor Dukhovni
bb507cd4d4 Goodbye push 2016-11-14 14:19:58 -05:00
Viktor Dukhovni
b77e701a22 Goodbye login 2016-11-14 02:59:12 -05:00
Nicolas Williams
ab65f51c52 Apply band-aid to install-build-headers (#114) 2016-11-10 17:58:21 -06:00
Nicolas Williams
99b79d1f4c Check for mig(1), not just libdispatch 2016-11-10 13:15:07 -06:00
Remi Ferrand
298ee93ac2 Autoconf detection of Perl5 and Perl5 modules
Add m4 macros for checking for perl modules (JSON)

Fix #74, #29.

Signed-off-by: Nico Williams <nico@twosigma.com>
2016-11-10 11:55:56 -06:00
Nicolas Williams
7b6bf87685 Also look for editline/readline.h (fix #38) 2016-11-10 11:35:36 -06:00
Marcin Cieślak
afead1717c Check for -ldb-5 (Berkeley Database) 2016-11-08 15:48:40 -05:00
Marcin Cieślak
b9145b859d Enable threads on FreeBSD 10 and 11 2016-11-08 15:15:37 -05:00
Nicolas Williams
44dec510fd Update to SQLite3 3.14
Newer versions of SQLite3 have a number of new features that are
desirable to users who host other DBs in the same file as the HDB (for
example), as well as performance and bug fixes.

We should consider switching the SQLite3 backend for HDB to WITHOUT
ROWID tables for performance reasons.  We should also consider using
foreign keys instead of triggers.  Making any such changes requires care
to permit both, upgrade and downgrade.

We might want to use the SQLite3 session extension for a SQLite3-
specific, low-level replication (iprop).  Given conflict resultion code,
or a sufficiently normalized schema, the session extension would make it
easy to create a multi-master replication system, not unlike what one
would expect of an LDAP setup, though with none of the atomicity that
LDAP is supposed to provide (specifically, O_EXCL semantics for creates
and predicates for updates) unless we were to add a locking protocol.

Note that as of 3.14, the session extension is mutually exclusive of
WITHOUT ROWID tables.
2016-08-11 14:53:25 -05:00
Nicolas Williams
76c596ceb8 Complete support for --disable-afs-support 2016-08-10 19:51:11 -05:00
Viktor Dukhovni
1017a594ef Use OpenSSL include path as needed
For consistency make "-I" part of the macro value set by autoconf.

For now, don't attempt to handle OpenSSL rpath in cf/crypto.m4.
That's much easier by just setting LDFLAGS when running configure.
Otherwise too many Makefiles to edit and libtool and automake do
their best to undo the rpath.
2016-05-07 05:29:12 -04:00
Viktor Dukhovni
9393d53538 Actually capture libcrypto autoconf results
Also infer lib path not just include path, and set rpath if not from /usr.
Also need libcrypto for test_rand.
2016-05-07 02:36:34 -04:00
Nicolas Williams
95a996ceae Add --without-hcrypto-fallback option 2016-04-19 13:40:46 -05:00
Nicolas Williams
a9887a843f cf/crypto.m4: use AC_DEFINE() for hcrypto provider 2016-04-19 13:24:36 -05:00
Nicolas Williams
fca9bc45e2 Add --with-hcrypto-default-backend 2016-04-15 00:16:17 -05:00
Nicolas Williams
490337f4f9 Make OpenSSL an hcrypto backend proper
This adds a new backend for libhcrypto: the OpenSSL backend.

Now libhcrypto has these backends:

 - hcrypto itself (i.e., the algorithms coded in lib/hcrypto)
 - Common Crypto (OS X)
 - PKCS#11 (specifically for Solaris, but not Solaris-specific)
 - Windows CNG (Windows)
 - OpenSSL (generic)

The ./configure --with-openssl=... option no longer disables the use of
hcrypto.  Instead it enables the use of OpenSSL as a (and the default)
backend in libhcrypto.  The libhcrypto framework is now always used.

OpenSSL should no longer be used directly within Heimdal, except in the
OpenSSL hcrypto backend itself, and files where elliptic curve (EC)
crypto is needed.

Because libhcrypto's EC support is incomplete, we can only use OpenSSL
for EC.  Currently that means separating all EC-using code so that it
does not use hcrypto, thus the libhx509/hxtool and PKINIT EC code has
been moved out of the files it used to be in.
2016-04-15 00:16:17 -05:00
Nicolas Williams
bfa1d9ba09 Remove debug echo in cf/db.m4 2016-04-15 00:16:14 -05:00
Nicolas Williams
ab42f2882f Update valgrind suppressions 2016-02-26 00:55:33 -06:00
Nicolas Williams
16275048b8 Prefer LMDB to Berkeley DB 2016-02-26 00:55:32 -06:00
Nicolas Williams
a94dc50114 Add --with-db-type-preference config param 2016-02-26 00:55:32 -06:00
Nicolas Williams
c6f24e99f0 Revamp cf/db.m4; test LMDB 2016-02-26 00:55:32 -06:00
Nicolas Williams
96859fe687 maybe-valgrind.sh: don't --trace-children=yes 2016-02-26 00:55:31 -06:00
Nicolas Williams
0271b171e5 Add bswap64() 2016-02-16 20:49:33 -06:00
Luke Howard
fdf8782db2 hcrypto: PKCS#11 backend
implement a PKCS#11 backend for hcrypto. tested with Solaris 11 and
SoftHSM, this is now the default when building on Solaris.
2015-12-09 11:08:35 +11:00
Luke Howard
0de138a7dc cf: define __EXTENSIONS__ on Solaris
defining __EXTENSIONS__ is necessary to build on Solaris 11
2015-12-09 11:02:28 +11:00
hasufell
427a60057c Completely remove RAND_egd support
The EGD daemon is completely unmaintained and has not seen a release
since 13 years which is not an acceptable timeframe for cryptographic
software. It is not packaged in any linux distribution I know of
and definitely not in *BSD.

LibreSSL has already dropped support for RAND_egd.
2015-10-06 15:44:47 +02:00
Bernard
828f4f4fb1 Fix build when OpenSSL has no EGD support 2015-04-10 22:47:03 +02:00
Nicolas Williams
e75f790fe6 Use getauxval() for issuid() on Linux 2015-03-24 11:50:00 -05:00
Nicolas Williams
b48bed5f42 Daemons detach atomically to avoid having to wait
Tests that start daemons have to "wait" for them to start.

This commit makes Heimdal daemons prep to detach (when requested) by
forking early, then having the child signal readiness to the parent when
the child really is ready.  The parent exits only which the child is
ready.  This means that tests will no longer need to wait for daemons.

However, tests will still need a pidfile or such so they can stop the
daemons.

Note that the --detach options should not be used on OS X from launchd,
only from tests.
2015-03-24 11:49:59 -05:00
Simon Wilkinson
8485250989 roken: Add memset_s implementation
Add an implementation of memset_s to roken.

Some optimising compilers may remove the memset() instruction when it
is used immediately before a free, which defeats its purpose if the
intention is to zero memory before returning it to the heap or stack.

C11 added memset_s, provide a fallback in roken so that memset_s can
be used on all platforms.
2015-03-05 17:06:20 +00:00
Viktor Dukhovni
08c628b240 BN_is_negative is no longer a macro in OpenSSL master 2015-03-04 19:49:40 -05:00
Viktor Dukhovni
529f17bbec OpenSSL master requires more explicit #includes 2015-03-04 19:46:54 -05:00
Love Hörnquist Åstrand
f05236b202 hush autoconf 2014-08-22 21:52:27 -07:00
Love Hörnquist Åstrand
e6ed2bc9df use LT_INIT only, fixes #95 2014-08-22 21:52:10 -07:00
Love Hörnquist Åstrand
c93db5aa52 check for sys/errno.h 2014-07-18 17:46:25 +02:00
Nicolas Williams
816e8fcfa9 Use thread-safe errno on Solaris 2014-05-05 00:00:46 -05:00
Love Hörnquist Åstrand
f074a81c0c code sign all binaries when we can 2014-02-16 11:35:19 -08:00
Love Hörnquist Åstrand
bc0109489e include noinst_HEADERS 2014-02-16 10:04:56 -08:00
James Le Cuirot
97f1e2efb5 Fix roken-h-process.pl 2014-02-01 22:04:10 +00:00
Gustavo Zacarias
f76e8d5710 roken-h-process: use Getopt::Std, getopts.pl is deprecated
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2014-01-31 08:33:39 +01:00
Nicolas Williams
3e74e2e3bb Fix some DLL hell: use dladdr() to find plugin dir
Normally one would dlopen() a shared object's basename, not its absolute
path.  However, lib/krb5/plugin.c, in an effort to be zero-conf-ish,
wants to readdir() to find plugins to load, and in the process it ends
up defeating the RTLD's search-the-caller's-rpath.

This commit partially addresses this by allowing the use of $ORIGIN in
plugin_dir values and using them for the default (except on OS X).

This allows multiple Heimdal versions installed on the same host, but
with different plugin ABIs, to co-exist.  A step forward for doing make
check on hosts where Heimdal is installed.

For now we hardcode $ORIGIN/../lib/plugin/krb5 (linux, Solaris, *BSD),
or $ORIGIN (Windows; for assemblies objects need to be in the same
directory) and we eval $ORIGIN by using dladdr() (Linux, Solaris) or
GetModuleHandleEx() (Win32, via a dladdr() wrapper in libroken) to find
the path to libkrb5 whose dirname to use as $ORIGIN.  For Windows,
because we need the plugins to be in the same directory as libkrb5, we
require a prefix on plugin DLLs ("plugin_krb5_") to distinguish them
from other objects.

We should add a special token to mean "look in $ORIGIN, sure, but
dlopen() the plugin basenames only (so the RTLD can search the rpath)".
2013-09-06 16:51:53 -05:00
Love Hornquist Astrand
ad824fcd6a remove bit that might make old perl fail 2013-07-19 14:40:37 +02:00
Love Hornquist Astrand
581f834b4e include db6/db.h 2013-07-18 14:58:54 +02:00
Love Hornquist Astrand
787d9ceec9 check for db6/db.h 2013-07-18 14:58:54 +02:00