[krbdev.mit.edu #8797] Issue with MIT Kerberos Documentation - Developing with GSSAPI

Frank Filz via RT rt-comment at KRBDEV-PROD-APP-1.mit.edu
Wed Apr 17 14:47:36 EDT 2019


> Whoops.  It's not a repeat of the gss_wrap_iov_length() function, but it
does call
> the wrong functions.  I believe it should read:
> 
>     OM_uint32 major, minor;
>     gss_iov_buffer_desc iov[2];
>     char data[1024];
> 
>     iov[0].type = GSS_IOV_BUFFER_TYPE_MIC_TOKEN;
>     iov[1].type = GSS_IOV_BUFFER_TYPE_DATA;
>     iov[1].buffer.value = "message";
>     iov[1].buffer.length = 7;
> 
>     major = gss_get_mic_iov_length(&minor, ctx, GSS_C_QOP_DEFAULT,
> iov, 2);
>     if (GSS_ERROR(major))
>         handle_error(major, minor);
>     if (iov[0].buffer.length > sizeof(data))
>         handle_out_of_space_error();
>     iov[0].buffer.value = data;
> 
>     major = gss_get_mic_iov(&minor, ctx, GSS_C_QOP_DEFAULT, iov, 2);
>     if (GSS_ERROR(major))
>         handle_error(major, minor);
> 
> I will fix it.  If you'd like to see a working example of
> gss_get_mic_iov_length() to help debug the problem you're running into,
> src/tests/gssapi/t_iov.c contains code which is compiled and run as part
of
> "make check".

I thought (and t_iov.c seems to confirm) that the
GSS_IOV_BUFFER_TYPE_MIC_TOKEN comes after the GSS_IOV_BUFFER_TYPE_DATA
buffer.

Thanks

Frank





More information about the krb5-bugs mailing list