Commit Graph

201 Commits

Author SHA1 Message Date
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
Viktor Dukhovni
63d2935c4f Goodbye FTP 2016-11-14 02:42:08 -05:00
Jelmer Vernooij
0113798b18 Don't put system architecture in generated headers.
Including HOST causes the build to be unreproducible.
2016-05-15 23:04:49 +00:00
Jeffrey Altman
a4dae2513f Windows: add HCRYPTO_FALLBACK config to build system
HCRYPTO_FALLBACK is a required definition for building lib/hcrypto.
However, it wasn't added to the Windows build system.  This change
does so and enables fallback functionality.

Change-Id: I4a711c6da58e8832a61a3c0b2b8d9b10038425f0
2016-04-23 19:02:20 -04:00
Nicolas Williams
2cd233db43 Add HEIMDAL_THREAD_create() macros 2016-04-15 00:16:17 -05:00
Nicolas Williams
2f0c45f784 Add thread-locals for WIN32 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
22934bae7c Fix heim_threads.h rwlocks macros for pthreads 2016-04-15 00:16:13 -05:00
Nicolas Williams
c2fafff992 WIN32 thread primitives must return int
Also, zero return means "success", non-zero means "failure" and the
non-zero value is a system error.  That's how it is for the other
platforms' thread primitives.

(The no-threads defaults are still wrong though, as then are macros that
expand into do..while, which can't be used as expressions and don't
"return" values.)
2016-04-15 00:16:13 -05:00
Nicolas Williams
1f53a40827 threads: Windows mutex and rwlock implementation
Change-Id: I087bd5884eca9f232f4b5a2a6463b06b38a488e7
2016-04-10 17:05:07 -05:00
Roland C. Dowdeswell
3e6fffed60 include/Makefile.am: don't clean files that are distributed.
We stop cleaning crypto-headers.h and heim_threads.h.
2015-11-06 17:06:26 -05:00
Bernard Spil
858480145b Refactor EGD conditional support
As per Jeremy's request in #124
Windows does not define HAVE_RAND_EGD resulting in the same conditional
support for EGD.
2015-04-21 10:04:08 +02: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
Ken Dreyer
10a7fb0bfa Properly terminate ifdef conditional in krb5-types.h 2014-02-17 13:25:16 -07:00
Love Hörnquist Åstrand
1223428b85 add missing files, sort stuff 2014-02-16 11:47:27 -08:00
Jeffrey Altman
d9bc256199 define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE
Always define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE even if attributes are
not supported.

Change-Id: Ibc2110d809d81f546723853038c69176075d6013
2014-02-04 23:20:10 -05:00
Love Hornquist Astrand
516c12c9a9 intruduce krb5_generate_random() that can fail and return an error, check for it at krb5_context creation time 2013-10-21 08:22:02 -07:00
Jeffrey Altman
466953b6ee Windows: remove unintended text string
patchset b9d7e33a2f introduced some
garbage at the beginning of the include/NTMakefile.  remove it.

Change-Id: Ia24ea3a03aa9ed10b8076112b6486e23f1c36b7c
2013-09-15 00:48:45 -04:00
Tony Acero
b9d7e33a2f Windows: Fix perl string equality for Debug Builds
Use "eq" and not "=~"

Change-Id: Iac38ff9859ab40fc30aba0df90956b6029c04cb6
2013-09-13 22:18:57 -04: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
Nico Williams
1f78baf198 Make krb5-types.h define int64_t on Win32 2013-07-16 21:04:32 -05:00
Ben Kaduk
5dfaa0d10b Be friendly to krb5_generate_random_block consumers
Allow them to disable the EGD/profile access and the use of a
random seed file.

These facilities are not tenable when running in the kernel.
2013-07-03 23:17:38 -05:00
Nicolas Williams
6dd66df594 Make master build on Windows
Add strtoll()/strtoull() to lib/roken
    Add stdint.h to lib/roken (Windows only)
    Add logic to detect whether to use lib/roken's stdint.h based on
        Visual Studio version
    Add include of stdint.h in generated ASN.1 code
    Export missing symbols for 64-bit integers in lib/asn1
    Export missing symbols for FAST
    Add missing sources to kdc/NTMakefile
    Fix issue in kuserok
    Fix bsearch issues
2012-01-17 12:10:14 -06:00
Jeffrey Altman
bad61548dd Windows: Version mgmt for assemblies and thirdparty
Breakout the version data from windows/NTMakefile.config
and move it to windows/NTMakefile.version.  This new file
contains only version data.  This permits version data to
be safely referenced by third party components.

In addition, add version range information for those versions
of Heimdal for which this release is a compatible upgrade.  If
there is a forward incompatible change to the assembly ABI, it
is not a compatible upgrade.  This version data is used to specify
the Windows assembly redirect range.

Change-Id: Ic9f156212599cc4277e2be812f29a6497801046c
2011-09-23 09:48:42 -04:00
Love Hörnquist Åstrand
7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Love Hörnquist Åstrand
e5eb401fcd simplify checking and start to use __has_extension 2011-06-19 10:43:12 -07:00
Love Hörnquist Åstrand
b8ddbe73c4 quite down clang analyzer warnings for the generate asn1 code 2011-06-14 22:29:49 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Jeffrey Altman
87aad6a13a Add NO_LOCALNAME
The pname to uid functionality at present assumes there is
an implementation of getpwnam() and that the local user
identifier is an integer.  On Windows, the local user identifier
is a SId.  Add NO_LOCALNAME as a build option so that Windows
(for now) can build without providing a getpwnam() implementation.

Change-Id: I04cfd6d2cd52e6228733f1da1dab420b453e6566
2011-05-17 13:56:37 -04:00
Love Hornquist Astrand
b108cbe218 spelling 2010-11-26 15:01:56 -08:00
Love Hornquist Astrand
3debbe8ef5 clean out gssapi_oid.h 2010-11-26 14:28:09 -08:00
Love Hornquist Astrand
95b601af10 clean out cache_plugin.h 2010-11-26 14:27:51 -08:00
Asanka C. Herath
370e245ffc Windows: Only export through .def files
While we use __declspec(dllimport) to import from DLLs, we don't
use __declspec(dllexport) to export them.
2010-11-24 15:33:25 -05:00
Asanka C. Herath
d11917211b Windows: Older Windows SDKs need <winsock2.h>
Older SDKs need <winsock2.h> to be included before <ws2tcpip.h>
2010-11-24 15:33:06 -05:00
Asanka C. Herath
d3582b56c6 Define and use a path separator string
A colon can't be used to separate paths on Windows since they are used
in drive sepecification.  Define a macro that can be used as a path
separator string.  On Windows, this is defined as ";".  It is a ":"
everywhere else.
2010-11-24 15:32:56 -05:00
Love Hornquist Astrand
501c5ac2fe sort and add ntlm_err.h 2010-10-30 22:19:29 -07:00
Love Hornquist Astrand
ef78859954 clean heimbase. 2010-10-27 20:31:13 -07:00
Love Hornquist Astrand
82d15c0ada define helper macros for __attribute__ 2010-10-26 23:41:05 -07:00
Love Hornquist Astrand
a77070f5b1 define helper macros for __attribute__ 2010-10-26 23:39:42 -07:00
Love Hornquist Astrand
d05098b950 New drop with windows code from Secure Endpoints/Asanka 2010-09-14 10:08:03 -07:00
Love Hornquist Astrand
a37554cc27 clean better 2010-09-14 09:29:40 -07:00
Asanka Herath
91bfec3059 Windows: Enable weak crypto by default 2010-09-14 08:04:16 -04:00
Asanka Herath
9db9b146fb Windows: Add support for MSLSA: cache type using a plug-in 2010-09-14 08:04:11 -04:00
Asanka Herath
efd02d929a Windows: No Fortuna method 2010-08-20 13:06:55 -04:00
Asanka Herath
8363d30a47 Remove commented code 2010-08-20 15:21:15 +08:00
Asanka Herath
e7337145ee Define HAVE_WINDNS and NO_LIMIT_FD_SETSIZE
HAVE_WINDNS is defined when we want to use DNSAPI on Windows which
handles most of the resolver work for us.

NO_LIMIT_FD_SETSIZE is defined if the value of a socket FD does not
imply anything about the number of sockets so far assigned.
I.e. checking if the socket is larger than FD_SETSIZE is incorrect.
2010-05-26 10:38:39 -04:00
Asanka Herath
f54630328b strlen() returns a size_t 2010-05-26 10:38:38 -04:00
Asanka Herath
716121bc60 Don't break build if cleanup fails 2010-05-26 10:38:37 -04:00