Arne Ansper wrote:
> 
> 
> 
> one question: do we need those _peek_ functions at all? i think
> not. and i have a proposal how to keep new library and applications
> clean and keep compatibility with older applications:
> 

Well not everything has a reference count and not everything is static.

Some of the calls instead return a copy of the structure. If you do this
with everything that doesn't have a reference count you end up with lots
of needless Malloc() functions and you also have problems writing a
compatability wrapper because if you free the copy its gone.

I suppose you could add reference counts to everything but each one can
have a mutex operation associated with it and calling a mutex whenever
any kind of 'get' operation is needed even when you know there will
never be any kind of race condition is inefficient.

[side note the library only uses a small number of mutexes: for example
when you call X509_free(x) it uses a global lock for X509 instead of one
for the 'x' structure]

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to