Stanislav Brabec wrote:
> Ludovic Rousseau wrote:
> > But I have two warnings:
> > ldap_mapper.c:874: warning: passing argument 1 of 'X509_cmp' from
> > incompatible pointer type
> > ldap_mapper.c:874: warning: passing argument 2 of 'X509_cmp' from
> > incompatible pointer type
> 
> I spent a quite a lot of time to identify this problem.
> 
> X509_cmp expects, that referred structure has type X509 (X509_st).
> But common/cert_st.h contains:
> #define X509 CERTCertificate

> As these structures are completely different, it most probably does not
> work.

Actually, it seems to be an ugly hack. The code should at use a
different string than X509 to not confuse developers and cleanly
distinguish between OpenSSL X509 and an opaque symbol representing
either OpenSSL X509 or NSS CERTCertificate.

We have two chances:

- Create more opaque wrappers, e. g.:

#define CERT X509
resp.
#define CERT CERTCertificate

#define CERT_cmp X509_cmp
resp.
#define CERT_cmp CERT_CompareCerts

I found no directly corresponding NSS function for d2i_X509().

- Never use NSS in ldap_mapper, which seems to be actually the only
module affected by mentioned problem.

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: [EMAIL PROTECTED]
Lihovarská 1060/12           tel: +420 284 028 966, +49 911 740538747
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to