summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/krb/mk_rep.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2003-12-13 06:28:35 +0000
committerKen Raeburn <raeburn@mit.edu>2003-12-13 06:28:35 +0000
commita87606b8e2b12a6a5260539a5544f55fb81d53bc (patch)
tree6417250436c25f4dc42f0142d211872c57ca1ba2 /src/lib/krb5/krb/mk_rep.c
parent7943823ea88ccb7e5a2b9e1981f1f601ba261af5 (diff)
downloadkrb5-a87606b8e2b12a6a5260539a5544f55fb81d53bc.tar.gz
krb5-a87606b8e2b12a6a5260539a5544f55fb81d53bc.tar.xz
krb5-a87606b8e2b12a6a5260539a5544f55fb81d53bc.zip
Add platform-dependent 64-bit and inline-function support via new header
k5-platform.h. Add 64-bit serializer support. [Not needed for ticket 1471, but needed for 2040 and annoying to check in separately.] Add to (internal for now) crypto API a function to get the mandatory checksum type associated with an enctype. New support for server-generated subkey, selected via an auth_context flag. ticket: 1471 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15908 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/mk_rep.c')
-rw-r--r--src/lib/krb5/krb/mk_rep.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/mk_rep.c b/src/lib/krb5/krb/mk_rep.c
index 31f3fe5001..393f634bb1 100644
--- a/src/lib/krb5/krb/mk_rep.c
+++ b/src/lib/krb5/krb/mk_rep.c
@@ -59,7 +59,14 @@ krb5_mk_rep(krb5_context context, krb5_auth_context auth_context, krb5_data *out
repl.ctime = auth_context->authentp->ctime;
repl.cusec = auth_context->authentp->cusec;
- repl.subkey = auth_context->authentp->subkey;
+ if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_USE_SUBKEY) {
+ retval = krb5int_generate_and_save_subkey (context, auth_context,
+ auth_context->keyblock);
+ if (retval)
+ return retval;
+ repl.subkey = auth_context->send_subkey;
+ } else
+ repl.subkey = auth_context->authentp->subkey;
repl.seq_number = auth_context->local_seq_number;
/* encode it before encrypting */