diff options
author | Tom Yu <tlyu@mit.edu> | 2003-05-10 00:01:04 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2003-05-10 00:01:04 +0000 |
commit | 508e90e51619c79d2680eaeca754d516c7f88fdf (patch) | |
tree | 99bed617bdb438c95c55d7c265f9ef4beb9e23f3 /src/lib/krb5/krb/rd_rep.c | |
parent | 919b3a91b573c746a62a704fc5cdf883605d6aa9 (diff) | |
download | krb5-508e90e51619c79d2680eaeca754d516c7f88fdf.tar.gz krb5-508e90e51619c79d2680eaeca754d516c7f88fdf.tar.xz krb5-508e90e51619c79d2680eaeca754d516c7f88fdf.zip |
Rename the local_subkey and remote_subkey fields in the auth_context
to send_subkey and recv_subkey, respectively. Add new APIs to query
and set these fields. Change the behavior of mk_req_ext, rd_req_dec,
and rd_rep to set both subkeys. Applications wanting to set
unidirectional subkeys may still do so by saving the values of subkeys
and doing overrides. Cause mk_cred, mk_priv, and mk_safe to never use
the recv_subkey. Cause rd_cred, rd_priv, and rd_safe to never use the
send_subkey.
ticket: 1415
status: open
tags: pullup
target_version: 1.3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15407 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/rd_rep.c')
-rw-r--r-- | src/lib/krb5/krb/rd_rep.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/rd_rep.c b/src/lib/krb5/krb/rd_rep.c index e35e43f5d2..50ce51331e 100644 --- a/src/lib/krb5/krb/rd_rep.c +++ b/src/lib/krb5/krb/rd_rep.c @@ -82,7 +82,15 @@ krb5_rd_rep(krb5_context context, krb5_auth_context auth_context, const krb5_dat /* Set auth subkey */ if ((*repl)->subkey) { retval = krb5_copy_keyblock(context, (*repl)->subkey, - &auth_context->remote_subkey); + &auth_context->recv_subkey); + if (retval) + goto clean_scratch; + retval = krb5_copy_keyblock(context, (*repl)->subkey, + &auth_context->send_subkey); + if (retval) { + krb5_free_keyblock(context, auth_context->send_subkey); + auth_context->send_subkey = NULL; + } } /* Get remote sequence number */ |