X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=blobdiff_plain;f=mech_eap%2Futil_crypt.c;h=9906b8377f0b64ef2bba005c6e44049f8e7d0aeb;hp=b6e203eab3b36c71d2f9282fd7b55af55b949bb5;hb=HEAD;hpb=3d5083e8a273503d6d5233195d2ee7cb2e754e6d diff --git a/mech_eap/util_crypt.c b/mech_eap/util_crypt.c index b6e203e..9906b83 100644 --- a/mech_eap/util_crypt.c +++ b/mech_eap/util_crypt.c @@ -140,7 +140,6 @@ mapIov(krb5_context context, int dce_style, size_t ec, size_t rrc, return KRB5_BAD_MSIZE; gss_headerlen += gss_trailerlen; - gss_trailerlen = 0; } else { if (trailer->buffer.length != gss_trailerlen) return KRB5_BAD_MSIZE; @@ -316,6 +315,15 @@ gssEapLocateIov(gss_iov_buffer_desc *iov, int iov_count, OM_uint32 type) return p; } +gss_iov_buffer_t +gssEapLocateHeaderIov(gss_iov_buffer_desc *iov, int iov_count, enum gss_eap_token_type toktype) +{ + if (toktype == TOK_TYPE_MIC) + return gssEapLocateIov(iov, iov_count, GSS_IOV_BUFFER_TYPE_MIC_TOKEN); + else + return gssEapLocateIov(iov, iov_count, GSS_IOV_BUFFER_TYPE_HEADER); +} + void gssEapIovMessageLength(gss_iov_buffer_desc *iov, int iov_count,