(krb5_mk_safe): pick keys in the right order, local - remote - session
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10091 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -53,6 +53,14 @@ krb5_mk_safe(krb5_context context,
|
|||||||
size_t len;
|
size_t len;
|
||||||
u_int32_t tmp_seq;
|
u_int32_t tmp_seq;
|
||||||
krb5_crypto crypto;
|
krb5_crypto crypto;
|
||||||
|
krb5_keyblock *key;
|
||||||
|
|
||||||
|
if (auth_context->local_subkey)
|
||||||
|
key = auth_context->local_subkey;
|
||||||
|
else if (auth_context->remote_subkey)
|
||||||
|
key = auth_context->remote_subkey;
|
||||||
|
else
|
||||||
|
key = auth_context->keyblock;
|
||||||
|
|
||||||
s.pvno = 5;
|
s.pvno = 5;
|
||||||
s.msg_type = krb_safe;
|
s.msg_type = krb_safe;
|
||||||
@@ -88,7 +96,7 @@ krb5_mk_safe(krb5_context context,
|
|||||||
free (buf);
|
free (buf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = krb5_crypto_init(context, auth_context->keyblock, 0, &crypto);
|
ret = krb5_crypto_init(context, key, 0, &crypto);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
free (buf);
|
free (buf);
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user