Anyway, I have GSS-SPNEGO almost working (only wrapping outgoing
messages at the moment, unwrapping is tomorrow) but it required
modifying libldap and liblber. I added an ldap_set_inspect_hdlr
function that sets read/write callbacks. They're invoked in
sockbuf.c:{ber_int_sb_read,ber_int_sb_write} if Sockbuf has a handler
installed. The user must supply handler that read/write and "inspect"
the buffers possibly writing alternative data (ie the gss_wrap'd data).
The modifications were pretty simple and clean. Is there a better way?