[16280] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

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

daemon@ATHENA.MIT.EDU (Greg Hudson via RT)
Wed Apr 17 01:54:02 2019

Mail-followup-to: rt@krbdev.mit.edu
mail-copies-to: never
From: Greg Hudson via RT <rt-comment@KRBDEV-PROD-APP-1.mit.edu>
In-Reply-To: <rt-8797@krbdev.mit.edu>
Message-ID: <rt-8797-49377.9.52557617164501@krbdev.mit.edu>
To: "'AdminCc of krbdev.mit.edu Ticket #8797'":;
Date: Wed, 17 Apr 2019 01:53:55 -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".
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs

home help back first fref pref prev next nref lref last post