[#2379] Add support for handling binary objects
Summary Add support for handling binary objects
Queue Turba
Queue Version HEAD
Type Enhancement
State Accepted
Priority 1. Low
Owners
Requester kevin_myer@iu13.org
Created 2005-08-04 (5291 days ago)
Due
Updated 2012-04-02 (2858 days ago)
Assigned
Resolved
Milestone
Patch No

Comments
kevin_myer@iu13.org 2005-08-04 01:50:37
It would be nice if Turba could handle the display of binary objects.   
Immediate use, for instance, would be display of user pictures, such 
as a jpegPhoto attribute stored in LDAP, but other binary objects 
exist as well (crypto-related items, for instance).

andreas@altroot.de 2006-06-30 12:17:51
I've modified the ldap.php driver from Turba 2.1.1 since I need to 
store binary encoded certificates in our directory. My version uses 
ldap_get_values_len() instead of ldap_get_entries() to fetch binary 
values. The attribute name "usercertificate;binary" is hard coded. 
Certificates are converted from and to Base64. Several places in the 
code are still marked with FIXME. The driver works for us. I am going 
to fix the remaining issues but currently I have to work on other 
things.

Jan Schneider <jan@horde.org> 2008-08-11 16:21:41
General support has been added to Turba, but not for the LDAP driver 
yet. A patch for LDAP would be nice.

kd@tu-cottbus.de 2012-04-02 09:10:58
> General support has been added to Turba, but not for the LDAP driver 
> yet. A patch for LDAP would be nice.
ok,
here is a replacement for the _getResults method in Ldap.php.
It replaces the main-loop by an first_entry - next_entry loop.
The tricky part is how to tell, whether or not an attribute has to be 
retrieved
by ldap_get_values_len (is binary). This is done in 
_isBinaryValue($atrribute).
If schema-checking is available, the 'certificate' and 'jpeg' syntaxes 
are selected.
Otherwise an additional server configuration option is needed.
e.g. 'binary' => array('jpegPhoto','userCertificate;binary').