Commit Graph

27700 Commits

Author SHA1 Message Date
Nicolas Williams
7d45909537 Fix krb5's gss_pseudo_random() (n is big-endian)
The first enctype RFC3961 prf output length's bytes are correct because
the little- and big-endian representations of unsigned zero are the
same.  The second block of output was wrong because the counter was not
being encoded as big-endian.

This change could break applications.  But those applications would not
have been interoperating with other implementations anyways (in
particular: MIT's).
2013-10-30 14:26:15 -05:00
Jeffrey Altman
71fcd51659 Windows: 1.6.99
Change-Id: Ifd124db0de542f9dea9bbd0347b0915cd9d45c72
2013-10-25 00:02:40 -04:00
Love Hörnquist Åstrand
50d544c2b6 1.6.99 2013-10-22 18:22:53 -07:00
Love Hornquist Astrand
ca24e29ad9 move krb5_generate_random() to krb5_init_context() and document (in doxygen) why its called 2013-10-22 18:19:11 -07:00
Love Hornquist Astrand
7439cb7c54 check the EE if its a proxy certificate and fail up front 2013-10-21 08:43:24 -07:00
Love Hornquist Astrand
056224c32f more comments about how useful krb5_generate_random_block() is 2013-10-21 08:32:11 -07: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
Love Hornquist Astrand
1881980d44 spelling 2013-10-18 10:45:59 +02:00
Love Hornquist Astrand
10f3c8b56e add possible to set rules on what enctypes to use based on glob matching on principal 2013-10-18 10:01:55 +02:00
Love Hornquist Astrand
499affd8fa tet setting policy 2013-10-18 09:06:52 +02:00
Love Hornquist Astrand
072f4ce697 remove unused [kadmin]pre-auth that is no longer there (if it ever was) 2013-10-17 18:52:01 +02:00
Viktor Dukhovni
9a9ba1e197 Reduce RNG false positive error rate 2013-10-17 00:29:51 -04:00
Viktor Dukhovni
146f5b72e6 Link test_rand with math library.
Also deal with size_t to int casts for test_rand printf output.
2013-10-16 23:49:32 -04:00
Viktor Dukhovni
1364508cbf Hopefully fix test_rand breakage 2013-10-16 22:04:01 -04:00
Love Hornquist Astrand
1d84562886 add HDBGET: that only supports get, iteration doesnt really make sense for the HDB keytab except when dumping 2013-10-15 12:40:39 +02:00
Love Hornquist Astrand
d1eb0da071 init more of the fields 2013-10-15 12:07:02 +02:00
Love Hornquist Astrand
94d3958d2e add NO_ACCEPTABLE_KDF 2013-10-15 11:52:37 +02:00
Jeffrey Altman
50381859a0 hdb: fix parsing of mkey db string
The use of the wrong value for the length of ":mkey=" was identified
by Brian May and reported via github:

  https://github.com/heimdal/heimdal/issues/40

Change-Id: I0aed86a5bb0359b7a266369076fde5e62f23b5fe
2013-10-13 19:59:48 -04:00
Jeffrey Altman
44de8701d2 Windows: move gssapi.dll to merge module
In order for the 64-bit FULL installer to install both the 64-bit
and 32-bit versions of gssapi.dll a merge module needs to be created
so that both versions can exist within the same install package.

Change-Id: Iaa979556e1691d3906e497f87e7d12cd89b1d980
2013-10-12 16:13:12 -04:00
Jeffrey Altman
3a00c9b7b0 Windows: Install loose gssapi.dll with manifest
When installing the gssapi.dll within the Heimdal\bin directory
make sure to install the version that has the assembly manifest.
Otherwise, the DLL cannot find the heimdal.dll.

Change-Id: Idd6f8f00db718f8a764e1cfa9d06d188ab22a313
2013-10-12 01:57:14 -04:00
Viktor Dukhovni
b09e1a137b Use defrealm in last-resort parse of kt principal 2013-10-11 20:54:46 -04:00
Jeffrey Altman
eea23fe6ed Windows Installer: Add custom graphics
Change-Id: I9218a4ccc128730ef7fea88cd68aab73209570fb
2013-10-08 22:36:20 -04:00
Jeffrey Altman
e8d2100880 libtommath: fix typo in bn_mp_mod.c
Change-Id: Ieec5c01d5bd59b9268f41933389b1b32a4c4d0c6
2013-10-08 21:32:39 -05:00
Jeffrey Altman
37c7098737 Windows Installer: Add missing Package properties
Platform
InstallScope
InstallPrivileges
Keywords

Change-Id: I04ecfb4456e62a60e737ac26de098f11849c4ec0
2013-10-08 21:30:45 -05:00
Jeffrey Altman
2308c719c3 Windows Installer: gssapi.dll in Heimdal\bin
gssapi.dll is supposed to be implementation agnostic.  No version
numbers and no manifest required to load it.   In addition to the
version that is installed as part of the assembly also include a
version that can be discovered by LoadLibrary() via PATH search.

Change-Id: I1865dd2ecec208745a40e699837bd2a888341a31
2013-10-08 21:08:37 -05:00
Jeffrey Altman
8dc29ae1a0 libtommath: remove bn_mp_isprime.c
Now that mp_prime() is no longer used, remove bn_mp_isprime.c from
the source tree.

Change-Id: Ie0f7ce3184c000f27ae5b9dbe07b323c02ce7199
2013-10-08 17:02:07 -05:00
Moritz Lenz
b709d39aa5 libtommath: Fix mp_mod(a, b, c) if b < 0 and a = n * b, n integer
it used to return b, now it return 0.

From https://github.com/libtom/libtommath

Change-Id: I99f5d42c09a6fbddfb32b7dd0ed10ef04f1c08a5
2013-10-08 16:17:14 -05:00
Steffen Jaeckel
7fe018e418 libtommath: mp_error_to_string: return const char* instead of char*
From https://github.com/libtom/libtommath

Change-Id: Idd5cbab380f5d504fece93afb3a5fcc026309482
2013-10-08 16:17:13 -05:00
Steffen Jaeckel
5bc653f0ef libtommath: allow mp_shrink to shrink initialized, but empty MPI's
from https://github.com/libtom/libtommath

Change-Id: I5814caeb44db710957152a7d47b03f9beb6e5147
2013-10-07 17:20:57 -05:00
Jeffrey Altman
28051fa99c Convert mp_find_prime to use mp_prime_is_prime
Modify the signature of mp_find_prime() to permit the number of
Miller-Rabin rounds to be specified.  In addition, valid responses
now include MP_NO, MP_YES, and MP_VAL which is returned when
mp_prime_is_prime() fails.

Change-Id: I0195129a4dd75875e6dddb6d49a5ceb30afb1a17
2013-10-07 15:18:42 -05:00
Jeffrey Altman
1859a85350 libtommath: protect functions by tommath_class macros
libtommath protects the inclusion of functions by wrapping their
declarations by CPP #ifdef tests and defining the matching macros
within libtommath_class.h.

Add missing macros:

  BN_MP_FIND_PRIME_C
  BN_MP_ISPRIME_C

Change-Id: Ic577300114f8e88d7a3af3d9f717a249d57f03b1
2013-10-07 14:00:21 -05:00
Jeffrey Altman
b90732860a libtommath: remove unnecessary comparison
As pointed out by Steffen Jaeckel [https://github.com/sjaeckel],
within bn_mp_prime_next_prime() t <= PRIME_SIZE as per the check
at the top of the function.  Remove the unnecessary comparison in
a for loop conditional.

Change-Id: I868bee1a7a019e0ab06bf2b81cc71cf66ca9acff
2013-10-07 13:57:03 -05:00
Jeffrey Altman
c1f822f7af rename struct krb5_name_canon_* name collisions
C++ does not permit struct names and typedef names to be the same.
Rename

  struct krb5_name_canon_rule to struct krb5_name_canon_rule_data

and

  struct krb5_name_canon_iterator to struct krb5_name_canon_iterator_data

Change-Id: I92766e0878bf0beef92de1649baf9e5cafbf86aa
2013-10-06 16:42:05 -04:00
Russ Allbery
a2ca442760 krb5_set_default_realm.3 man page update
Since the memory is allocated inside the Kerberos library, it
should be freed by code inside the same library.  free, as
previously recommended, therefore doesn't seem appropriate.
Instead, recommend krb5_xfree, which exists for this purpose.
krb5_set_default_realm.3 man page update

Change-Id: I11d119edf03148cbdc654480c72ddffb540084ec
2013-10-06 16:01:46 -04:00
Nicolas Williams
f10de508a6 Check fcache st_uid == geteuid(), not getuid()
Programs like sshd may create or access a ccache with
ruid != user's UID, euid == user's UID.

Set-uid-0 programs (ob reminder: they start life as ruid == user's UID,
euid == 0) shouldn't unintentionally access ccaches.  Therefore we
shouldn't check both of ruid and euid, just euid.
2013-10-04 18:24:38 -05:00
Nicolas Williams
0b9891214e Make lib/otp/Makefile.am use -I$(DBHEADER) 2013-10-04 19:00:57 -04:00
Nicolas Williams
d58fb7f867 libedit should check HAVE_STDINT_H (S8) 2013-10-04 19:00:57 -04:00
Nicolas Williams
c6bfad4f68 Don't need, so don't use, stdbool.h 2013-10-04 19:00:56 -04:00
Nicolas Williams
704a8a1d37 Don't use %zu
Eventually we'll need to make sure that a) libroken's stdint.h defines
the max integer types, b) the libroken *printf()s can handle all the
standard length and conversion specifiers.
2013-10-04 18:58:31 -04:00
Viktor Dukhovni
c6548bc166 Don't deref NULL pointer with klist -t 2013-10-03 20:41:49 -04:00
Love Hornquist Astrand
dba64ce7f5 Increment array when comparing, from Harald Barth 2013-09-30 21:15:35 -07:00
Love Hornquist Astrand
7a8a78e417 validate that default@ have KRB5_KDB_DISALLOW_ALL_TIX 2013-09-27 08:39:06 -07:00
Love Hornquist Astrand
1b39c562d5 use STDERR_FILENO instead of 2 2013-09-27 08:24:51 -07:00
Jeffrey Altman
f381c62405 Windows: $(SDKREDISTDIR)\heimdal-version.mak
Create a heimdal-version.mak include file which can be included
in third party installer makefiles to determine which compiler and run
time library type was used to build the merge modules.  It is the
responsibility of third party installer packages to include the Visual
Studio CRT merge modules that are required for execution.

Change-Id: Icec2f47755ef7cc5f7dde2e0426603dece7e4933
2013-09-26 17:24:33 -04:00
Jeffrey Altman
aafdf9fba1 Windows: Do not redistribute the policy assembly
Policy assemblies must not be distributed by third parties.

Change-Id: I431efc5aeac593bbbf6358e89a07c4928390e7d4
2013-09-26 17:24:27 -04:00
Jeffrey Altman
62bd882b57 Revert "Windows: Skip policy assembly for now"
This reverts commit a759e5091f.

The policy assembly is now skipped on XP from within the policy assembly
itself so it can be safely installed elsewhere.
2013-09-25 09:59:28 -04:00
Rod Widdowson
6ef84fdfe8 Windows Install: Do not install the policy on XP
A bug in Fusion on XP causes downlevel issues with upgrade.  The long
term fix is to duplicate the Fusion behavior.  For now we just suppress
the install on XP
2013-09-25 09:59:03 -04:00
Jeffrey Altman
a759e5091f Windows: Skip policy assembly for now
On XP there is a bug which prevents two installers from including a
policy assembly of the same name.  Policy Assembly names are

  <Product>.<Major>.<Minor>

For now do not install the policy assembly until we have a work around
for XP or a method of conditionally not installing the policy on XP.

Change-Id: If92bea3c625e6124eb64c2bcc3e5008a58f04404
2013-09-24 15:05:40 -04:00
Viktor Dukhovni
2ccdebdacc Fix kinit renew vs. new strategy.
The previous code never obtained a new TGT when -l was not used.
2013-09-23 11:02:08 -04:00
Jeffrey Altman
dae1a38d80 Windows: Add Symbol Store support
Change-Id: I722738dc56b9fdeb1c50643bcdc076dbd27a3f8a
2013-09-22 21:06:20 -04:00