TLS context

David Leonard david.leonard at itee.uq.edu.au
Mon Nov 12 15:52:34 CET 2001


On Mon, 12 Nov 2001, Jacek Konieczny typed thusly:

> ldap.set_option("tls_cacertfile","file")
>
> against:
>
> ldap.set_option(ldap.OPT_X_TLS_CACERTFILE,"file")
>
> The first solution is shorter to use, the second is more like OpenLDAP C
> API. Which one should I use? If it is to be separated from "local"
> options (implemented as attribute) then IMHO the second would be better.
> Currently I have the first one implemented, but it is easy to change.

the latter is better: lets you catch errors in python faster (same trick
used in Xt)

you might also like to intern the strings so you can use == in C.

> > You're welcome to throw away any code not needed when compiling
> > against OpenLDAP 2.x libs. E.g. I already removed autoconf stuff
> > from CVS. If someone needs that he/she can check out the tagged old
> > version.
> OK. So I will do it. I will add "#error" for LDAP_API_VERSION < 2000

:)

d
-- 
David Leonard                           David.Leonard at itee.uq.edu.au
Dept of Inf. Tech. and Elec. Engg   _   Ph:+61 404 844 850
The University of Queensland       |+|  http://www.itee.uq.edu.au/~leonard/
QLD 4072  AUSTRALIA               ~` '~ B73CD65FBEF4C089B79A8EBADF1A932F13EA0FC8





More information about the python-ldap mailing list