From 14badd99bf8685d9b39182f2042a1092add57b70 Mon Sep 17 00:00:00 2001 From: Sam Hartman <hartmans@mit.edu> Date: Tue, 7 Jan 2003 19:27:50 +0000 Subject: [PATCH] Fix logic error in previous patch that broke gss_init_sec_context ticket: 1054 Status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15087 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 5 +++++ src/lib/krb5/krb/mk_req_ext.c | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index e12afdce6..997292fe4 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,8 @@ +2003-01-07 Sam Hartman <hartmans@mit.edu> + + * mk_req_ext.c (krb5_mk_req_extended): Fix logic error in checksum function handling + + 2003-01-06 Sam Hartman <hartmans@mit.edu> * mk_req_ext.c (krb5_mk_req_extended): Inf no in_data is provided diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index c2cd63b91..a6510019d 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -141,17 +141,17 @@ krb5_mk_req_extended(krb5_context context, krb5_auth_context *auth_context, } if (!in_data &&(*auth_context)->checksum_func) { - - if (in_data) { - retval = (*auth_context)->checksum_func( context, - *auth_context, - (*auth_context)->checksum_func_data, - &in_data); - if (retval) - goto cleanup_cksum; + retval = (*auth_context)->checksum_func( context, + *auth_context, + (*auth_context)->checksum_func_data, + &in_data); + if (retval) + goto cleanup_cksum; } - if ((*auth_context)->req_cksumtype == 0x8003) { + if (in_data) { + + if ((*auth_context)->req_cksumtype == 0x8003) { /* XXX Special hack for GSSAPI */ checksum.checksum_type = 0x8003; checksum.length = in_data->length; -- 2.26.2