diff options
Diffstat (limited to 'crypto/heimdal/lib/gssapi/init_sec_context.c')
-rw-r--r-- | crypto/heimdal/lib/gssapi/init_sec_context.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/crypto/heimdal/lib/gssapi/init_sec_context.c b/crypto/heimdal/lib/gssapi/init_sec_context.c index 3928143..1be73e1 100644 --- a/crypto/heimdal/lib/gssapi/init_sec_context.c +++ b/crypto/heimdal/lib/gssapi/init_sec_context.c @@ -33,7 +33,7 @@ #include "gssapi_locl.h" -RCSID("$Id: init_sec_context.c,v 1.27 2001/05/11 09:16:46 assar Exp $"); +RCSID("$Id: init_sec_context.c,v 1.29 2001/08/29 02:21:09 assar Exp $"); /* * copy the addresses from `input_chan_bindings' (if any) to @@ -344,17 +344,14 @@ init_auth (*context_handle)->flags = flags; (*context_handle)->more_flags = LOCAL; - kret = gssapi_krb5_create_8003_checksum (input_chan_bindings, - flags, - &fwd_data, - &cksum); + ret = gssapi_krb5_create_8003_checksum (minor_status, + input_chan_bindings, + flags, + &fwd_data, + &cksum); krb5_data_free (&fwd_data); - if (kret) { - gssapi_krb5_set_error_string (); - *minor_status = kret; - ret = GSS_S_FAILURE; + if (ret) goto failure; - } #if 1 enctype = (*context_handle)->auth_context->keyblock->keytype; @@ -400,11 +397,10 @@ init_auth goto failure; } - ret = gssapi_krb5_encapsulate (&outbuf, output_token, "\x01\x00"); - if (ret) { - *minor_status = kret; + ret = gssapi_krb5_encapsulate (minor_status, &outbuf, output_token, + "\x01\x00"); + if (ret) goto failure; - } krb5_data_free (&outbuf); @@ -452,12 +448,11 @@ repl_mutual krb5_data indata; krb5_ap_rep_enc_part *repl; - ret = gssapi_krb5_decapsulate (input_token, &indata, "\x02\x00"); - if (ret) { + ret = gssapi_krb5_decapsulate (minor_status, input_token, &indata, + "\x02\x00"); + if (ret) /* XXX - Handle AP_ERROR */ - *minor_status = 0; - return GSS_S_FAILURE; - } + return ret; kret = krb5_rd_rep (gssapi_krb5_context, (*context_handle)->auth_context, |