Moved krb5_get_salt to str2key.c.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1334 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -2,31 +2,6 @@
|
|||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
static krb5_error_code
|
|
||||||
krb5_get_salt (krb5_principal princ,
|
|
||||||
krb5_data *salt)
|
|
||||||
{
|
|
||||||
size_t len;
|
|
||||||
int i;
|
|
||||||
krb5_error_code err;
|
|
||||||
char *p;
|
|
||||||
|
|
||||||
len = princ->realm.length;
|
|
||||||
for (i = 0; i < princ->ncomp; ++i)
|
|
||||||
len += princ->comp[i].length;
|
|
||||||
err = krb5_data_alloc (salt, len);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
p = salt->data;
|
|
||||||
strncpy (p, princ->realm.data, princ->realm.length);
|
|
||||||
p += princ->realm.length;
|
|
||||||
for (i = 0; i < princ->ncomp; ++i) {
|
|
||||||
strncpy (p, princ->comp[i].data, princ->comp[i].length);
|
|
||||||
p += princ->comp[i].length;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code
|
||||||
decrypt_tkt (krb5_context context,
|
decrypt_tkt (krb5_context context,
|
||||||
const krb5_keyblock *key,
|
const krb5_keyblock *key,
|
||||||
|
Reference in New Issue
Block a user