(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:
Assar Westerlund
2001-06-18 02:45:15 +00:00
parent e1074a9830
commit a1f1df4d51

View File

@@ -53,6 +53,14 @@ krb5_mk_safe(krb5_context context,
size_t len;
u_int32_t tmp_seq;
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.msg_type = krb_safe;
@@ -88,7 +96,7 @@ krb5_mk_safe(krb5_context context,
free (buf);
return ret;
}
ret = krb5_crypto_init(context, auth_context->keyblock, 0, &crypto);
ret = krb5_crypto_init(context, key, 0, &crypto);
if (ret) {
free (buf);
return ret;