Closed phillipod closed 9 years ago
For both the SSS and VLV controls, note the decode errors when parsing the responses for the berval. Also notice the hexdump of the berval immediately above.
Compare to the output from wireshark.
Looking at how serverctrls are returned to the caller from ldap_parse_result()..
// transfer returned controls to the perl code
if( serverctrls != NULL ) {
for( i = 0; serverctrls[i] != NULL; i++ )
av_push(serverctrls_av, newSViv((IV)serverctrls[i]));
}
So this seems to be building the serverctrls array, by taking a pointer to the returned serverctrl from the C SDK's ldap_parse_result(). Nothing funky going on here.
Heading on towards ldap_control_berval:
char *
ldap_control_berval(control)
LDAPControl * control
CODE:
{
RETVAL = control->ldctl_value.bv_val;
}
OUTPUT:
RETVAL
So the return type is "char *" and it definitely doesn't reference the length. Probably will want to make this a PV with length return.
This is gonna be a long comment, so I'll present the data in this comment and move to a second comment.
This code...
Produces
Wireshark output for same PDU