summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/hdb/keys.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-08-26 19:35:52 +0200
committerStefan Metzmacher <metze@samba.org>2008-08-26 19:46:38 +0200
commit243321b4bbe273cf3a9105ca132caa2b53e2f263 (patch)
treec8588a032720412a9a510d4045d6ca6e5c961ee7 /source4/heimdal/lib/hdb/keys.c
parent455f5c043d1416136a16a0bb6e463d855a913409 (diff)
downloadsamba-243321b4bbe273cf3a9105ca132caa2b53e2f263.tar.gz
samba-243321b4bbe273cf3a9105ca132caa2b53e2f263.tar.bz2
samba-243321b4bbe273cf3a9105ca132caa2b53e2f263.zip
heimdal: import heimdal's trunk svn rev 23697 + lorikeet-heimdal patches
This is based on f56a3b1846c7d462542f2e9527f4d0ed8a34748d in my heimdal-wip repo. metze (This used to be commit 467a1f2163a63cdf1a4c83a69473db50e8794f53)
Diffstat (limited to 'source4/heimdal/lib/hdb/keys.c')
-rw-r--r--source4/heimdal/lib/hdb/keys.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source4/heimdal/lib/hdb/keys.c b/source4/heimdal/lib/hdb/keys.c
index e689ae1020..e649f445e0 100644
--- a/source4/heimdal/lib/hdb/keys.c
+++ b/source4/heimdal/lib/hdb/keys.c
@@ -33,7 +33,7 @@
#include "hdb_locl.h"
-RCSID("$Id: keys.c 23316 2008-06-23 04:32:32Z lha $");
+RCSID("$Id$");
/*
* free all the memory used by (len, keys)
@@ -68,11 +68,13 @@ hdb_free_keys (krb5_context context, int len, Key *keys)
* afs or afs3 == des:afs3-salt
*/
-/* the 3 DES types must be first */
-static const krb5_enctype all_etypes[] = {
+static const krb5_enctype des_etypes[] = {
ETYPE_DES_CBC_MD5,
ETYPE_DES_CBC_MD4,
- ETYPE_DES_CBC_CRC,
+ ETYPE_DES_CBC_CRC
+};
+
+static const krb5_enctype all_etypes[] = {
ETYPE_AES256_CTS_HMAC_SHA1_96,
ETYPE_ARCFOUR_HMAC_MD5,
ETYPE_DES3_CBC_SHA1
@@ -110,8 +112,8 @@ parse_key_set(krb5_context context, const char *key,
/* XXX there should be a string_to_etypes handling
special cases like `des' and `all' */
if(strcmp(buf[i], "des") == 0) {
- enctypes = all_etypes;
- num_enctypes = 3;
+ enctypes = des_etypes;
+ num_enctypes = sizeof(des_etypes)/sizeof(des_etypes[0]);
} else if(strcmp(buf[i], "des3") == 0) {
e = ETYPE_DES3_CBC_SHA1;
enctypes = &e;
@@ -139,8 +141,8 @@ parse_key_set(krb5_context context, const char *key,
salt->salttype = KRB5_PW_SALT;
} else if(strcmp(buf[i], "afs3-salt") == 0) {
if(enctypes == NULL) {
- enctypes = all_etypes;
- num_enctypes = 3;
+ enctypes = des_etypes;
+ num_enctypes = sizeof(des_etypes)/sizeof(des_etypes[0]);
}
salt->salttype = KRB5_AFS3_SALT;
}