[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: RFC: TLS support in svn protocol

From: Mark Benedetto King <mbk_at_lowlatency.com>
Date: 2004-07-13 21:23:42 CEST

On Tue, Jul 13, 2004 at 01:22:31PM +0200, Branko ??ibej wrote:
> Mark Benedetto King wrote:
>
> >On Sat, Jul 10, 2004 at 11:13:06PM -0400, Greg Hudson wrote:
> >
> >
> >>Separate from all this, I have an implementation concern: I think the
> >>OpenSSL library is only thread-safe if you provide it with locking
> >>primitives in the single-threaded environment, and our client library
> >>has no means of doing that.
> >>
> >>
> >>
> >
> >Isn't that what svn_cmdline_init() is for?
> >
> >
> No, it's not. That's a utility function for command-line tools, which is
> a different beast. Our libraries lack an initialisation function that
> would be guaranteed to run once per process in a single threaded
> environment (like apr_initialize, for example). Even though we can add
> such a function to the libraries now, we can't guarantee (that is,
> require) the single-threaded initialisation before 2.0.
>

Okay, here's the thing. It would also be rude for us to go calling
OpenSSL's "only call this once" functions, since some of our API
consumers may have their own calls to these functions (or perhaps,
horrors, mutually incompatible ones!).

It seems to me that we should, for our own correctness, do
initialization in svn_cmdline_init(), and recommend that our API
consumers that do not call svn_cmdline_init() take care to properly
initialize all of the dependent libraries.

Note that we already require them to call apr_initialize().
Granted, that's documented in HACKING, and this isn't. But the fact
that we, in essence, neglected to document this requirement (and
also have a corresponding bug of our own) shouldn't, IMO, prevent
us from documenting it now (and fixing our bug).

--ben

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 13 21:45:04 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.