[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: userPKCS12 and storage format



Wyatt Neal wrote:
when i store a userPKCS12 binary file into the ldap directory using base64 encoding using the C LDAP API, the next time I try to retrieve the data, it is returned in base64 format; however, if insert the certificate using an ldif file from the command line and request the file using C, it comes back in binary format. i'm using the binary values as my LDAPMod ops, what am I doing wrong?
Nothing. The server sends the value in binary format; the library receives it in binary form; assuming you use ldapsearch to "retrieve the data", ldapsearch presents it in base64 because it's the only printable form it knows for non-printable values. Read ldapsearch(1) and specifically about -t/-T for saving binary-valued attributes, or write your own code.

p.




Ing. Pierangelo Masarati OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------