[16284] in Kerberos-V5-bugs
RE: [krbdev.mit.edu #8797] Issue with MIT Kerberos Documentation -
daemon@ATHENA.MIT.EDU (Frank Filz via RT)
Wed Apr 17 14:47:43 2019
Mail-followup-to: rt@krbdev.mit.edu
mail-copies-to: never
From: " Frank Filz via RT" <rt-comment@KRBDEV-PROD-APP-1.mit.edu>
In-Reply-To: <rt-8797@krbdev.mit.edu>
Message-ID: <rt-8797-49388.16.8815273794788@krbdev.mit.edu>
To: "'AdminCc of krbdev.mit.edu Ticket #8797'":;
Date: Wed, 17 Apr 2019 14:47:36 -0400
MIME-Version: 1.0
Reply-To: rt-comment@KRBDEV-PROD-APP-1.mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krb5-bugs-bounces@mit.edu
> 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
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs