Commit Graph

27615 Commits

Author SHA1 Message Date
Nicolas Williams
b20bb509bd Fix never valid error condition in KDC
The TGS was incorrectly using authtime to compute renew_till for new
tickets, which was in turn leading to endtime potentially being equal to
starttime, which caused the TGS to return KRB5KDC_ERR_NEVER_VALID.

This happens when the TGT renewal lifetime is longer than the max renew
lifetime of any other services, after that much time (target services'
max renew life) passes.  The TGT is still good but TGS-REQs fail.
2013-11-26 16:57:19 -06:00
Jelmer Vernooij
87a0e11a80 Add heimdal-krb5.pc file, with krb5.pc depending on it.
This makes it easier to install Heimdal and MIT kerberos on
the same system by just providing the heimdal-krb5.pc file;
the krb5.pc file is provided by both.

This is similar to what's done with heimdal-gssapi.pc/krb5-gssapi.pc.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2013-11-24 14:39:14 +00:00
Love Hörnquist Åstrand
91a2802779 Merge pull request #45 from jelmer/hx509-heimbase
Include heimbase.h in hx509.h; required for heim_err_t.
2013-11-20 05:13:26 -08:00
Nicolas Williams
fdcb8f3862 Fix callers of heim_ntlm_encode_type3; make build 2013-11-20 01:20:01 -06:00
Nicolas Williams
2f7eec7d2c Add very large MIT KDB princ entry for testing
Constructed by doing repeated kadmin.local cpw commands with a policy
with -history 9.
2013-11-20 01:08:22 -06:00
Nicolas Williams
9e084ca1d7 Fix MIT dump entry parsing bug that forced 2048 sz 2013-11-20 01:08:22 -06:00
Nicolas Williams
2c16b0da30 Be verbose about MIT dump entry parsing failures 2013-11-20 01:07:54 -06:00
Nicolas Williams
e9d21aeffc Fix bug in loading MIT dumps 2013-11-20 01:07:54 -06:00
Jelmer Vernooij
906922b990 Include heimbase.h in hx509.h; required for heim_err_t.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2013-11-20 00:42:26 +00:00
Love Hörnquist Åstrand
bd661203cf test type1 encodings 2013-11-18 15:43:44 +01:00
Love Hörnquist Åstrand
576f103203 try to use the right domain/hostname offset/ucs2 encoding
reported by Joe Mason
2013-11-17 17:43:47 +01:00
Love Hörnquist Åstrand
3af1b3a8a6 use constants 2013-11-17 17:03:10 +01:00
Love Hörnquist Åstrand
cde59c543d bump libheimntlm to the version from OSX 10.9 Mavericks 2013-11-17 13:15:55 +01:00
Ross L Richardson
22a5077835 Minor language problems 2013-11-17 12:48:41 +01:00
Love Hörnquist Åstrand
7d163f234b check that e have sane values 2013-10-30 22:29:19 -07:00
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