new salt format

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3319 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-08-31 19:35:37 +00:00
parent d2a9f83f4a
commit 53f897d164
7 changed files with 61 additions and 43 deletions

View File

@@ -121,6 +121,7 @@ conv_db(void *arg, Principal *p)
ALLOC(ent.keys.val);
ent.keys.val[0].mkvno = p->kdc_key_ver;
ent.keys.val[0].salt = calloc(1, sizeof(*ent.keys.val[0].salt));
ent.keys.val[0].salt->type = pa_pw_salt;
ent.kvno = p->key_version;
ent.keys.val[0].key.keytype = KEYTYPE_DES;
krb5_data_alloc(&ent.keys.val[0].key.keyvalue, sizeof(des_cblock));

View File

@@ -182,7 +182,7 @@ do_version4(unsigned char *buf,
#if 0
/* this is not necessary with the new code in libkrb */
/* find a properly salted key */
while(ckey->salt == NULL || ckey->salt->length != 0)
while(ckey->salt == NULL || ckey->salt->salt.length != 0)
ret = hdb_next_keytype2key(context, client, KEYTYPE_DES, &ckey);
if(ret){
kdc_log(0, "No version-4 salted key in database -- %s.%s@%s",

View File

@@ -509,8 +509,9 @@ as_rep(KDC_REQ *req,
ALLOC(rep.padata);
rep.padata->len = 1;
rep.padata->val = calloc(1, sizeof(*rep.padata->val));
rep.padata->val->padata_type = pa_pw_salt;
copy_octet_string(ckey->salt, &rep.padata->val->padata_value);
rep.padata->val->padata_type = ckey->salt->type;
copy_octet_string(&ckey->salt->salt,
&rep.padata->val->padata_value);
}
ret = encode_AS_REP(buf + sizeof(buf) - 1, sizeof(buf), &rep, &len);