Commit Graph

48 Commits

Author SHA1 Message Date
Jeffrey Altman
6bdbf3ca27 windows: revert change to ldebug
ea90ca8666 ("Move some infra bits of
lib/krb5/ to lib/base/ (2)") inappropriately altered the declaration
of the "ldebug" macro which stores the switches passed to "link.exe".
There is no "/RELEASE" switch and the "/DEBUG" switch instructs the
linker to produce files containing debug symbols (.pdb) which are
required for generating the Windows assemblies.

This change restores the prior behavior.

Change-Id: I61b8fd4759ba84671858f7c8275dbd25af1638e6
2020-05-26 11:48:45 -05:00
Luke Howard
4a7eb74374 gss: SAnon - the Simple Anonymous GSS-API mechanism
Add support for SAnon, a simple key agreement protocol that provides no
authentication of initiator or acceptor using x25519 ECDH key exchange.
See doc/standardization/draft-howard-gss-sanon-xx.txt for a protocol
description.
2020-04-25 23:19:30 -05:00
Nicolas Williams
ea90ca8666 Move some infra bits of lib/krb5/ to lib/base/ (2)
This is the second of two commits in a series that must be picked together.

This series of two commits moves parts of lib/krb5/ infrastructure
functionality to lib/base/, leaving behind wrappers.

Some parts of libkrb5 are entirely generic or easily made so, and could
be useful in various parts of Heimdal that are not specific to the krb5
API, such as:

 - lib/gssapi/  (especially since the integration of NegoEx)
 - lib/hx509/
 - bx509d       (which should really move out of kdc/)

For the above we need to move these bits of lib/krb5/:

 - lib/krb5/config_file.c   (all of it, leaving forwardings behind)
 - lib/krb5/config_reg.c    (all of it)
 - lib/krb5/plugin.c        (all of it, leaving forwardings behind)
 - lib/krb5/log.c           (all of it, ditto)
 - lib/krb5/heim_err.et     (all of it)

And because of those two, these too must also move:

 - lib/krb5/expand_path.c   (all of it, leaving forwardings behind)
 - lib/krb5/warn.c          (just the warning functions, ditto)

The changes to the moved files are mostly quite straightforward and are
best reviewed with --word-diff=color.

We're also creating a heim_context and a heim API to go with it.  But
it's as thin as possible, with as little state as necessary to enable
this move.  Functions for dealing with error messages use callbacks.

Moving plugin.c does have one knock-on effect on all users of the old
krb5 plugin API (which remains), which is that a global search and
replace of struct krb5_plugin_data to struct heim_plugin_data was
needed, though the layout and size of that structure doesn't change, so
the ABI doesn't either.

As well, we now build lib/vers/ and lib/com_err/ before lib/base/ so as
to be able to move lib/krb5/heim_err.et to lib/base/ so that we can make
use of HEIM_ERR_* in lib/base/, specifically in the files that moved.

Once this is all done we'll be able to use config files and plugins in
lib/hx509/, we'll be able to move bx509d out of kdc/, and so on.

Most if not all of the new functions in lib/base/ are Heimdal-private,
thus calling conventions for them are not declared.

Status:

 - builds and passes CIs (Travis, Appveyor)
 - ran make check-valgrind and no new leaks or other memory errors
 - ready for review

HOW TO REVIEW:

     $ # Review file moves:
     $ git log --stat -n1 HEAD^
     $
     $ # Review changes to moved files using --word-diff=color
     $ git log -p -b -w --word-diff=color HEAD^..HEAD   \
               lib/base/config_file.c                   \
               lib/base/config_reg.c                    \
               lib/base/expand_path.c                   \
               lib/base/warn.c                          \
               lib/krb5/config_file.c                   \
               lib/krb5/config_reg.c                    \
               lib/krb5/expand_path.c                   \
               lib/krb5/warn.c
     $
     $ # Review the whole thing, possibly adding -b and/or -w, and
     $ # maybe --word-diff=color:
     $ git log -p origin/master..HEAD
     $ git log -p -b -w origin/master..HEAD
     $ git log -p -b -w --word-diff=color origin/master..HEAD

TBD (future commits):

 - make lib/gssapi use the new heimbase functions
 - move kx509/bx509d common code to lib/hx509/ or other approp. location
 - move bx509d out of kdc/
2020-03-02 10:56:13 -06:00
Jeffrey Altman
efb27f15ac Windows: update default timestamping service
The Verisign and Symantec timestamping services have been shutdown.
Switch to the Digicert service which replaced the Symantec services
as of 31 Oct 2019.

  http://timestamp.digicert.com

Change-Id: I365e6c3698b8fc99b18e8d1e5a54ce3519f3c5eb
2019-11-02 21:14:00 -04:00
Jeffrey Altman
3a0d9f07a8 Windows: update SHA2 timestamp server
The RFC 3161 Service SHA128: https://timestamp.geotrust.com/tsa
is being decommissioned at the end of March 2017.  A new SHA256 service:
http://sha256timestamp.ws.symantec.com/sha256/timestamp
takes its place.

Change-Id: Iaf3de7ce7ccdd5c2589e80a7e4accccb307228d3
2017-02-23 21:28:03 -05:00
Jeffrey Altman
3de56adbcc Windows: Skip sha256 code sign if !CODESIGN
If we are not code signing we must define an action for _CODESIGN_SHA256
or the build system macros will be unbalanced.

Change-Id: I3c545de3c8ee809709defd12faeead358fde26dd
2016-04-23 20:58:25 -04:00
Jeffrey Altman
a234ee5265 Windows: Update code signing to support SHA256
Change-Id: I324e7c56fd73a744127c50e8fc136e8b23d860b0
2016-04-18 23:36:16 -05:00
Jeffrey Altman
bc20b5fad0 Windows: do not search for signtool.exe
Permit an explicit version of signtool.exe to be specified via an
environment variable.  Now that sha256 signatures are required the version
of signtool.exe that matches the SDK or Visual Studio version might not
be sufficient to apply code signatures.

Change-Id: I694e2b319bd692d6358ae7ce3d241da2da7648f8
2016-04-18 23:36:16 -05:00
Luke Howard
5023f55208 Add Windows CNG (BCrypt) support to HCrypto EVP API 2015-02-11 16:00:32 +11:00
Jeffrey Altman
dae1a38d80 Windows: Add Symbol Store support
Change-Id: I722738dc56b9fdeb1c50643bcdc076dbd27a3f8a
2013-09-22 21:06:20 -04:00
Jeffrey Altman
5d0f3ee927 Windows: Extned Assembly name for version options
Windows file resources can be marked as Private, Special, Debug
and Pre-release.  Extend the Heimdal Assembly name to include
designations for these various build options to ensure that
private, special, debug and pre-release builds do not conflict
with the assembly name reserved for public releases.  This permits
a private, special, debug and pre-release build to be installed
side-by-side with the final release without interference.

Change-Id: I569ce2ff911ddbaebd81ba2e8b477ba6fb520502
2013-09-15 00:48:47 -04:00
Jeffrey Altman
1243f2a0d3 Windows: do not fail if output directories exist
Quote path names in case there are ever spaces

Prepend $(MKDIR) rule is "-" to avoid failures if the output
directories already exist.

Change-Id: I1e5cfb408042617a73edeeae99eb269a061ba61d
2013-09-13 22:18:53 -04:00
Jeffrey Altman
9b13216c0e Windows: PLUGINDIR == BINDIR
Plugins must be in the same directory as the DLLs.

Change-Id: I982f8113208dc896d73b155cf0c22184efc1b1c1
2013-09-13 22:17:39 -04:00
Jeffrey Altman
949f427488 Windows: do not set USE_32BIT_TIME_T for Heimdal
Heimdal does not have any backward compatibility issues unlike
MIT.  There is no reason to restrict out interfaces to using
32-bit time of 32-bit Windows.  Our supported compilers default
to 64-bit time_t.  Use it.

Change-Id: I931c547841c17897d7d55a61459519cb99973385
2011-09-23 17:09:21 -04:00
Jeffrey Altman
1301b1cc15 extend windows build system for additional subdirs
Permit an additional level of subdirectory depth in
the Windows build system

Change-Id: I2d248d3e917e13457ca135c4a221d723643159fa
2011-05-17 12:02:09 -04:00
Asanka C. Herath
dd6d5a0e2c Windows: Build multiplatform installer
When building the x64 installer, we can optionally include 32-bit
components as well.  This requires that the 32-bit build to be already
completed.  The resulting multiplatform installer will install
both sets of components.

This is enabled by the environment variable MULTIPLATFORM_INSTALLER.
2010-12-03 01:12:30 -05:00
Asanka C. Herath
5a8e7fcd0d Windows: Add LIBHEIMBASE and LIBRFC3961 macros 2010-11-24 15:33:36 -05:00
Asanka C. Herath
4eb1a9faa6 Windows: Make plugin\krb5 an official build target directory 2010-11-24 15:33:21 -05:00
Asanka C. Herath
e67cbf3bf9 Windows: Ignore C4146 warning 2010-11-24 15:33:16 -05:00
Asanka C. Herath
ff404ecaae Windows: Support older compilers that don't do parallel builds 2010-11-24 15:33:11 -05:00
Asanka C. Herath
82a200bfa2 Windows: Installers are optional 2010-11-24 15:33:10 -05:00
Asanka C. Herath
8b21737eaf Windows: SED is a required build tool 2010-11-24 15:32:50 -05:00
Asanka C. Herath
d98e72bc62 Windows: Build Texinfo documentation as compiled HTML 2010-11-24 15:32:30 -05:00
Asanka C. Herath
9fd109a0e1 Windows: Support for additional build tools 2010-11-24 15:32:29 -05:00
Asanka C. Herath
8d36e7dfcc Support for merging application manifest 2010-11-24 15:32:23 -05:00
Asanka C. Herath
1b32efe62c Windows: Include manifest dependencies by default when building tools 2010-11-24 15:32:20 -05:00
Asanka C. Herath
d320145d00 Windows: Build SDK in $(SRC)\out\sdk 2010-11-24 15:32:16 -05:00
Asanka C. Herath
f0b9e01eac Windows: Build and stage redistributable merge module 2010-11-24 15:32:13 -05:00
Asanka C. Herath
8aa7a84b7a Windows: Build installers 2010-11-24 15:32:09 -05:00
Asanka C. Herath
079cbf7a1a Windows: Build the SDK 2010-09-14 08:04:20 -04:00
Asanka Herath
00e84dac77 Windows: Specify target machine architecture in link step 2010-08-20 16:59:36 -04:00
Asanka Herath
e9e33710ce Windows: No separate assembly directory 2010-08-20 13:14:19 -04:00
Asanka Herath
c111770aed Windows: Use pushd and popd for recursive builds
This makes it possible to recurse into arbitrary directories instead
of just subdirectories.
2010-08-20 13:14:17 -04:00
Asanka Herath
7843607a49 Windows: Use 32-bit time_t on 32-bit builds 2010-08-20 13:14:16 -04:00
Asanka Herath
63597ca3fc Windows: Make application manifest available everywhere 2010-08-20 13:14:15 -04:00
Asanka Herath
12638c01a9 Windows: Build shared side-by-side assemblies for Heimdal 2010-08-20 13:10:50 -04:00
Asanka Herath
641eab32d8 Windows: Revise build of tools in lib 2010-08-20 13:06:56 -04:00
Asanka Herath
d83611238a Windows: Build a single heimdal.dll
Heimdal.dll is a combination of libasn1, libwind, libhcrypto, libhx509
and libkrb5.
2010-08-20 13:06:54 -04:00
Asanka Herath
381e946b9f Disable warnings we don't care about on Windows
We may care about them later, but for now we need to cut down on
noise.
2010-08-20 13:03:39 -04:00
Asanka Herath
e9160dbcfa Support parallelized builds on Windows 2010-08-20 13:03:32 -04:00
Love Hornquist Astrand
1f226a37b9 try glue in ltm in NTMakefile 2010-08-19 23:55:33 -07:00
Asanka Herath
85f6e6d670 Build Tom's fast math library on Windows 2010-05-26 12:17:30 -04:00
Asanka Herath
0d17cbefee Update Windows build environment
We are building both 32-bit and 64-bit binaries.  The output directory
is no longer called out32.  Instead it's just called 'out'.  Also
support deeper directories.
2010-05-26 12:16:19 -04:00
Asanka Herath
630e89e357 Add LIBHEIMIPCC and LIBHEIMIPCS to NTMakefile.w32 2009-12-21 13:09:54 -05:00
Asanka Herath
94c9bd3557 (lib/asn1) Bring Windows build up-to-date 2009-11-25 12:43:11 -05:00
Asanka Herath
649a929a54 LIBKDC and binary prep macros 2009-11-24 10:17:50 -08:00
Asanka Herath
2df5c26c00 Build system update 2009-11-24 10:17:50 -08:00
Asanka Herath
b1063ea8fc Initial Windows port 2009-11-24 10:11:14 -08:00