[xml] SSL/TLS support



Hello everyone,

Following the example given by my Lord Mark of the Vakoc :-), I have brought
the SSL/TLS support somewhat further towards the integration into the source
base.

Here are two things. The one is what Mark has produced, which is the SSL/TLS
support using Windows native API. The second one is SSL/TLS through OpenSSL.

The native support on Windows is controlled through a LIBXML_HTTPS_WININET
macro. Windows configuration script takes care of setting or unsetting this
(not included in the attached diff). The necessary code change affects
xmlIO.c

The OpenSSL support should be available on all platforms where openssl and
libxml work. This thing is controlled through HAVE_OPENSSL_SSL_H macro, as
<openssl/ssl.h> is the only header file needed for this mess. The affected
files are nanohttp.c and xmlIO.c. However, I have problems with this one,
read on.

The attached diff contains the patch for both. This one should not be
applied now, it is just for review.

Now, the native Windows version works (although I have no idea what the
GSSBROWSER window might be... Mark?) quite good and does not depend on other
features. If noone objects on this, I would commit the necessary changes.

The OpenSSL support depends on nanoHttp and is not complete. I have two
problems with this one:
  * The secrets of automake/autoconf are beyond my present knowledge and I
don't know how to tweak this to check for existence of OpenSSL and define
HAVE_OPENSSL_SSL_H macro. Could someone help with this? :-)
  * Either I am missing something obvious, or my OpenSSL installation does
not tick correctly. The code as I made it should work, still there is an
error I cannot find. If someone finds a second or two, please check the
attached patch and tell me why does it timeout on select() after
SSL_connect() in xmlNanoHTTPMethodRedir() in nanohttp.c? Alexey, you
certainly know what is amiss, eh? If it is something trivial, have mercy, it
is my first hack with OpenSSL :-)

Ciao
Igor

Attachment: libxml.diff
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]