Commit Graph

43 Commits

Author SHA1 Message Date
Luke Howard
7b720cf61c krb5: implement draft-ietf-kitten-aes-cts-hmac-sha2-07 2016-10-08 08:17:11 +02:00
Viktor Dukhovni
579393c8b9 Optionally prune old keys when setting new keys.
When new keys are added (typically via kadm5_setkey_principal_3),
truncate the key history to remove old keys, that is keys older than
the newest key which was in effect prior longer ago than the principal's
maximum ticket lifetime.  This feature is controlled via the "[kadmin]"
section's "prune-key-history" boolean parameter, which defaults to false.

Currently this happens only when kadm5_setkey_principal_3()
is called directly on the server, the client API simulates
kadm5_setkey_principal_3() via a get, update, modify sequence that does
not prune the key history.  The plan is to add a new kadm5 protocol RPC
and convert clients to call that instead.

In setkey_principal_3 seal keys after entry key update

Also, for now, don't check the return value of kadm5_log_modify() in
the new kadm5_s_setkey_principal_3().  This has to be addressed more
globally.

Censor stale keys in kadm5_s_get_principal
2016-02-26 15:43:12 -05:00
Nicolas Williams
76965a2a14 Add missing initialization of mandatory 2016-02-16 20:49:32 -06:00
Love Hörnquist Åstrand
24c8bac3b8 In all_etypes prefer des3-cbc-sha1 over arcfour-hmac-md5 2014-09-09 18:15:08 +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
Roland C. Dowdeswell
800a4e5c94 We're free(3)ing the wrong ptr, here. 2012-02-24 18:56:29 +00:00
Nicolas Williams
417dff03ba Fix trailing whitespace 2011-11-29 14:50:44 -06:00
Roland C. Dowdeswell
af011f57fc Provide server side kadm5_chpass_principal_3() with ks_tuple implementation.
We enable kadm5_chpass_principal_3() in the server side of the
library.  The client kadm5 library calls will still return the
error KAMD5_KS_TUPLE_NO_SUPP.

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
2011-11-29 14:47:37 -06:00
Roland C. Dowdeswell
00bea41dcb Fix hdb_generate_key_set() to honour ks_tuple, n_ks_tuple.
The code was generating a char ** of string representations of the
ks_tuple() array but it was not using it.  We modify the code to:

	1.  extend the array returned by ks_tuple2str() to include
	    enough space for the trailing NULL and ensure that there
	    is a NULL at the end,

	2.  not free the array before exiting ks_tuple2str() as we
	    intend to use it in the caller,

	3.  re-organise the pointers in hdb_generate_key_set() to
	    make it more clear how we are to free things that have
	    been allocated.

	4.  free the char ** given us by ks_tuple2str() if it has
	    been allocated.

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
2011-11-29 14:47:37 -06:00
Roland C. Dowdeswell
2f6ad56c46 Reverse order of n_ks_tuple and ks_tuple in hdb_generate_key_set().
Signed-off-by: Nicolas Williams <nico@cryptonector.com>
2011-11-29 14:47:37 -06:00
Nicolas Williams
0c893d3980 Fixed booboos from kadm5 key history patch set
Also: add support for ignoring null enctype / zero-length keys,
    which *can* be found in MIT DB entries created in pre-historic
    times.

    Also: make the mitdb HDB backend more elegant (e.g., use the ASN.1
    compiler's generated sequence/array utility functions.

    Also: add a utility function needed for kadm5 kvno change
    improvements and make kadmin's mod --kvno work correctly and
    naturally.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-09-22 15:13:13 +02:00
Love Hörnquist Åstrand
74ec640500 Only free ext on replace 2011-07-24 20:23:30 -07:00
Love Hörnquist Åstrand
2ae9bbb915 update (c) 2011-07-24 20:04:02 -07:00
Love Hörnquist Åstrand
1a6195153f start to use KRB5_ENCTYPE_ 2011-07-24 20:02:10 -07:00
Love Hörnquist Åstrand
f9afd37eed use add_HDB_Ext_KeySet and plug memory leak 2011-07-24 18:14:25 -07:00
Nicolas Williams
95262936c7 s/assert/heim_assert/ and remove dead code 2011-07-24 11:07:27 -05:00
Nicolas Williams
31974aa24c More s/int/size_t/ for iterators. Also fixed a stupid bug. 2011-07-22 16:07:06 -05:00
Nicolas Williams
53ea8ac59b Make changes to hdb_keyset type be backward-compatible. 2011-07-22 16:06:01 -05:00
Nicolas Williams
109607a355 Fix uninitialized variable. 2011-07-22 16:04:52 -05:00
Nicolas Williams
6e04b05e9d Initial support for kadm5_randkey_principal_3(), needed by krb5_admin.
NOT TESTED YET.
2011-07-22 16:04:52 -05:00
Nicolas Williams
51e9da4a66 Fixed (preemptively) a double free and added password history based on key history. 2011-07-22 16:04:52 -05:00
Nicolas Williams
34bb7ae363 Fix double free. 2011-07-22 16:04:51 -05:00
Nicolas Williams
a095933ee0 We want the time that a keyset was set, not the time it was replaced. 2011-07-22 16:04:51 -05:00
Nicolas Williams
fca53990e4 Initial commit for second approach for multiple kvno. NOT TESTED! 2011-07-22 16:04:51 -05:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
f5f9014c90 Warning fixes from Christos Zoulas
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Love Hörnquist Åstrand
5a9dd54e95 drop RCSID
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25319 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-07-05 05:09:16 +00:00
Love Hörnquist Åstrand
85268de15a use krb5_principal_get_realm
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25114 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-16 08:06:42 +00:00
Love Hörnquist Åstrand
ae945b27d7 Use calloc().
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24947 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-25 15:38:04 +00:00
Love Hörnquist Åstrand
31fb2759da Drop DES from default keys.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24602 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-04 22:08:11 +00:00
Love Hörnquist Åstrand
765d501701 keys cant be NULL after assiging a static variable to it, cid#4
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24134 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:05:32 +00:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
b60c237dab All keys doesn't include des keys
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23594 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-17 14:10:38 +00:00
Love Hörnquist Åstrand
7fcd266fdd use krb5_set_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23316 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 04:32:32 +00:00
Love Hörnquist Åstrand
5fed824f37 its vs it\'s etc. From Bjorn Sandell
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22071 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-14 20:04:50 +00:00
Love Hörnquist Åstrand
b23b5d8d8a Make parse_key_set handle key set string "v5", from Peter Meinecke.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21659 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-22 01:51:31 +00:00
Love Hörnquist Åstrand
af4bc603f4 (hdb_generate_key_set): free list of enctype when done.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18819 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-22 09:40:12 +00:00
Love Hörnquist Åstrand
520d13e506 (parse_key_set): handle error case better
(hdb_generate_key_set): return better error


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17220 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-25 08:09:38 +00:00
Love Hörnquist Åstrand
3e9565a941 (hdb_generate_key_set): set ret_key_set before going into the error
clause and freeing key_set. Found by IBM checker.
Make sure ret == 0 after of parse error, we catch the "no entries
parsed" case later.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16929 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-02 00:45:48 +00:00
Love Hörnquist Åstrand
e502ee6379 AES is enabled by default, remove ifdefs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14654 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-17 00:42:05 +00:00
Love Hörnquist Åstrand
47482574e4 make all_etypes static
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14430 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-12-29 20:41:23 +00:00
Love Hörnquist Åstrand
c61ef0d7ab Move keyset parsing and password based keyset generation into hdb.
Requested by Andrew Bartlett <abartlet@samba.org> for hdb-ldb backend


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14297 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-10-11 23:50:25 +00:00