[xmlsec] Thread safety?
Aleksey Sanin
aleksey@aleksey.com
Fri, 31 Jan 2003 08:05:49 -0800
LibXMLSEC itself is mostly thread safe. The only thing that comes
to mind is the xmlSecSimpleKeysManager: you do not want to add
keys while another thread is using it (however, if you just read from
multiple threads then it's ok). But you probably want to implement
your own keys manager anyway so it's not a big deal.
As far as I know, all the libraries used by XMLSec (OpenSSL, LibXML2 and
LibXSLT) could be used in multithread environment. You just need
to compile them with threads support. When you are saying that
LibXSLT is not thread safe, I believe that you referer to the recent
discussion in the mailing list about it. However, the real problem discussed
there is error reporting (i.e. LibXSLT always report errors to the same
error handlers/context). When it might be a problem in some case,
in other cases (imho, most cases) you just don't care about details on
while you function failed. And you can put your own errors reporting
function which is perfectly safe. IMHO, LibXSLT *is* thread safe
and I know that it is used in multithreaded programs. But you might
want to ask Daniel directly just in case.
Aleksey.
Jesse Pelton wrote:
>I'm considering using XMLSec in a multi-threaded environment. Is libxmlsec
>thread-safe? I gather from the archives and bug database that libxslt is not
>thread-safe, so libxmlsec would need to guard calls into libxslt. That's
>hardly an ideal situation, and I'd be surprised if you've done it.
>
>Assuming that libxmlsec is not presently thread-safe, are the issues
>entirely in the libraries it uses, or are there issues in libxmlsec itself?
>_______________________________________________
>xmlsec mailing list
>xmlsec@aleksey.com
>http://www.aleksey.com/mailman/listinfo/xmlsec
>
>