From a182ee5916fc7cea7f8b4d65060d0a96a5f2be66 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sun, 26 Sep 2010 18:28:55 +0200 Subject: [PATCH] do the right lucid thing for accepor subkeys --- util_lucid.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util_lucid.c b/util_lucid.c index e8bc7c3..79c5ebc 100644 --- a/util_lucid.c +++ b/util_lucid.c @@ -56,9 +56,13 @@ gssEapExportLucidSecContext(OM_uint32 *minor, lctx->send_seq = ctx->sendSeq; lctx->recv_seq = ctx->recvSeq; lctx->protocol = 1; - lctx->cfx_kd.have_acceptor_subkey = 0; - lkey = &lctx->cfx_kd.ctx_key; + lctx->cfx_kd.have_acceptor_subkey = + ((rfc4121Flags(ctx, 0) & TOK_FLAG_ACCEPTOR_SUBKEY) != 0); + + lkey = lctx->cfx_kd.have_acceptor_subkey + ? &lctx->cfx_kd.ctx_key + : &lctx->cfx_kd.acceptor_subkey; lkey->type = KRB_KEY_TYPE(&ctx->rfc3961Key); lkey->data = GSSEAP_MALLOC(KRB_KEY_LENGTH(&ctx->rfc3961Key)); -- 2.1.4