[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: Branko Čibej <brane_at_xbc.nu>
Date: 2004-07-23 22:23:53 CEST

Mark Benedetto King wrote:

>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.
>
>
I insist that svn_cmdline_init is _not _ the right place to do this
initialisation. Instead, every library has to get its own init function
(svn_client_init, ...), which should (of course) call the init functions
of dependent libraries, as necessary.

>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).
>
>
Sure, we can add init functions to the libraries now, but we can't
_require_ that clients call them, which means we can't put anything that
requires single-threaded mode in those functions. It's a pain, I know.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 23 22:24:11 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.