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

Greg Hudson via RT <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.bugs
Message-ID <[email protected]>
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".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.