Hi all,
I had a little problem with the pkcs12 library.
When I added a friendly-name attibute in a PKCS12_SAFEBAG
SafeBag object (for a certificate or a shrouded
PKCS8 key), it works well except that when I imported
the pfx file into IE 5.x, the friendly-name attribute
was displayed with garbage characters at the end.
Apparently it was due to the following line in
PKCS12_add_friendlyname_uni:
if(!name[namelen - 1] && !name[namelen - 2]) namelen -= 2;
This code remove the double null if included, as said by the comment
above it.
When I comment that line, all is fine. So what was the reason for this
"zapping"?
PKCS12_add_friendlyname_asc()
Pierre De Boeck
Sr System Engineer
Mission Critical (Belgium)
Phone: +32 2 757 10 15 Fax: +32 2 759 276 0
email: [EMAIL PROTECTED]
///
(. .)
---------------------------------oOO--(_)--OOo----------------------
BEGIN:VCARD
VERSION:2.1
N:De Boeck;Pierre;;;
FN:Pierre De Boeck
ORG:Mission Critical
TITLE:Sr System Engineer
TEL;WORK;VOICE:+32 (2) 757.10.15
TEL;HOME;VOICE:+32 2 7594496
TEL;WORK;FAX:+32 2 759 27 60
ADR;WORK:;;Avenue Claire 27;Waterloo;;1410;Belgium
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Avenue Claire 27=0D=0AWaterloo, 1410=0D=0ABelgium
ADR;HOME:;;Dekenijstraat 21 BUS;;6;;Belgium
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Dekenijstraat 21 BUS=0D=0A, 6 =0D=0ABelgium
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:19990421T075946Z
END:VCARD
smime.p7s