99 Commits

Author SHA1 Message Date
Rod Widdowson
348a03e48e Documentation changes for the Windows Build
- Fix markup
- Specific quoted command line for Visual Studio
  build
- Caveat about line ending for gawk
- Add comments about python versions
- makeinfo.exe is no longer available from cygwin
- Add some words about APPVER setting
2022-09-24 20:21:09 +10:00
Jeffrey Altman
7ad9d0ee0e windows: invert NODEBUG for cvarsmt and cvarsdll
ec866e635e
("Windows 10 SDK build fixes") inverted the meaning selecting
Debug versions for NODEBUG and vice versa.

Change-Id: I90771a71cd3efc93ba47076fbf5cd1efb0948f6f
2022-01-27 17:23:28 -05:00
Luke Howard
00ba0ab387 windows: bail early if unknown APPVER
If APPVER is set to an unknown value, bail early rather than invoking compiler
with bogus Windows version macros.
2022-01-14 09:30:33 +11:00
Nicolas Williams
2375fa9d1e gss: Too many compilers don't support 'restrict' 2022-01-05 18:03:39 -06:00
Jeffrey Altman
9427796f1a Generate .x source files as .c source files
The generated .x source and .hx header files are plain C source files.
Generate them as .c source files and avoid unnecessary file copying
and special makefile rules.

Change-Id: Ifc4bbe3c46dd357fdd642040ad964c7cfe1d395c
2022-01-05 17:36:24 -06:00
Jeffrey Altman
42ad8b4c55 lib/asn1: build static runtime version of libasn1 on Windows
This commit builds a static runtime version of the asn1 library
which is required for some thirdparty applications.

  LIBASN1_S   =$(LIBDIR)\libasn1_s.lib

This differs from libasn1.lib which is compiled to use the
dynamic runtime.

Change-Id: Ib04f5b53a7f16d7bbe9d2debb75e944322a6792a
2022-01-05 12:58:48 -06:00
Luke Howard
ec866e635e Windows 10 SDK build fixes
Build without Win32.mak, and using Universal C Runtime (UCRT)

windows: Check for APPVER, not VCVER for UCRT

When deciding whether UCRT is used (and thus no CRT merge modules), check for
Windows 10 rather than the version of Visual Studio, as we may be building with
an older SDK.
2022-01-05 12:58:48 -06:00
Jeffrey Altman
bda5919f6b Windows: MSVC does not support 'restrict' keyword
Use of the C99 'restrict' keyword was introduced by
be708ca3cf
("gsskrb5: Add simple name attributes support")

Change-Id: I8272f595af53741ee7c59750bb2d388faeb01f8f
2022-01-03 22:46:08 -05:00
Luke Howard
466658e929 Revert "Windows 10 SDK build fixes"
This reverts commit ceef0a0089.
2022-01-04 14:44:13 +11:00
Luke Howard
ceef0a0089 Windows 10 SDK build fixes
Build without Win32.mak, and using Universal C Runtime (UCRT)

windows: Check for APPVER, not VCVER for UCRT

When deciding whether UCRT is used (and thus no CRT merge modules), check for
Windows 10 rather than the version of Visual Studio, as we may be building with
an older SDK.
2022-01-03 09:25:18 -05:00
Luke Howard
774f50b28b gss: move GSS pre-auth helpers to convenience lib
GSS pre-auth helpers do not belong in libgssapi, so move them to a separate
convenience library.
2021-08-27 15:20:07 +10:00
Luke Howard
15c82996a4 windows: add /td sha256 argument to signtool
Recent versions of signtool require an additional /td sha256 argument to
indicate the timestamp hash type.
2021-08-12 16:33:56 +10:00
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
Nicolas Williams
7138a04690 Fix rk_mkdir() on WIN32 2018-12-25 22:11:19 -06: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
ae432b0264 Windows: include KX509 support
Change-Id: I6e7920d1ad2c58640c9a2d4ec10793024ae949c2
2017-01-27 00:37:08 -05:00
Viktor Dukhovni
7209b72869 Bump master version to 7.99.1 (8.0-dev) 2016-12-02 22:38:00 -05:00
Roland C. Dowdeswell
c7f5242cc8 Release 6.99.1 (beta) 2016-10-19 15:32:39 -04: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
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
Jeffrey Altman
c751314501 Windows: disable weak crypto
Weak crypto is disabled on every other system.  OpenAFS no longer
requires it and AuriStor doesn't need it.  Turn it off.

Change-Id: I6fab2328f71d1c38a655560ab0f83b8df9b53c73
2016-04-23 19:02:20 -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
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
Love Hörnquist Åstrand
8a950e93ae Merge pull request #160 from asankah/windows-md-docs
Rename windows/README to README.md since it's already in Markdown.
2016-03-09 17:48:44 +01:00
Asanka Herath
9953693113 Rename windows/README to README.md since it's already in Markdown. 2016-03-09 11:36:21 -05:00
Asanka Herath
3f5bc8830f Remove maint.el.
This script is unused and will probably not be used by anyone.
2016-03-09 11:31:42 -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
Luke Howard
5023f55208 Add Windows CNG (BCrypt) support to HCrypto EVP API 2015-02-11 16:00:32 +11:00
Jeffrey Altman
71fcd51659 Windows: 1.6.99
Change-Id: Ifd124db0de542f9dea9bbd0347b0915cd9d45c72
2013-10-25 00:02:40 -04:00
Jeffrey Altman
dae1a38d80 Windows: Add Symbol Store support
Change-Id: I722738dc56b9fdeb1c50643bcdc076dbd27a3f8a
2013-09-22 21:06:20 -04:00
Jeffrey Altman
bc7a1533b9 Windows: Permit thirdparty/NTMakefile.version
NTMakefile.version defines company names and build options.
Do not require third parties to commit their modifications
within the Heimdal repo.

Change-Id: Ifb4d82e05f40023a2c29bd5cb4c3445c0bd876d3
2013-09-15 01:33:33 -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
6ade3b3a8b Windows: Add support for resource Trademark strings
Change-Id: I3b09fde4478c31414d55a16c460be4581a07499a
2013-09-15 00:48:46 -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
37ca3d35a9 Windows: use roken's rk_rename
Windows CRT rename does not unlink the target if it exists.

Change-Id: Id7bdf5729d418bb22b59ab11d0d5f31ccb7e3577
2013-07-27 19:13:18 -04:00
Jeffrey Altman
5b223c2caa roken: do not require use of rk_mkdir on all platforms
Although rk_mkdir can be provided on all platforms there is no
reason to require that it be used by unconditionally mapping

  mkdir -> rk_mkdir

Change-Id: Ic149500037abf446434332bf6ba67dfb3906cd72
2013-07-27 19:13:17 -04: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
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
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
fc3b4fcd3e drop unused KRB4 bits 2011-07-30 14:17:09 -07:00
Jeffrey Altman
c9d24dffde Windows: 1.5.99 Pre-release
Change-Id: Ie0d307888b68e19ffd46041729a27c4be2ed27fb
2011-07-27 20:04:31 -04:00
Asanka C. Herath
adb8cba7ee Windows: Version 1.4.9930.630 2011-06-15 12:38:56 -04:00
Jeffrey Altman
5523e33a9f windows: update README
provide additional details about the windows build system

Change-Id: I5196b8e743f3cc969e02f5954bdc6ff91c45e7f1
2011-05-19 00:32:54 -04: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