From a1f1df4d512ea6ba2a5d30b91b36fad9cf9b972d Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Mon, 18 Jun 2001 02:45:15 +0000 Subject: [PATCH] (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 --- lib/krb5/mk_safe.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/krb5/mk_safe.c b/lib/krb5/mk_safe.c index 0b057d304..e49272587 100644 --- a/lib/krb5/mk_safe.c +++ b/lib/krb5/mk_safe.c @@ -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;