Hi,

On September 8, 2003 12:38 pm, Dr. Stephen Henson wrote:
> On Mon, Sep 08, 2003, Geoff Thorpe wrote:
[snip]
> >     CRYPTO_w_lock(CRYPTO_LOCK_SSL_SESSION);
> >     sess->references++;
> >     CRYPTO_w_unlock(CRYPTO_LOCK_SSL_SESSION);
> >
> > Oh, and thanks for making me look at this - I've just realised the
> > locking in ssl/ssl_sess.c is wrong ... commiting a fix shortly. :-)
>
> Any reason for not using CRYPTO_add()?

In Brian's case, no - you're probably right that it's simpler. I was 
following the logic in ssl_sess.c which (I think) can not use 
CRYPTO_add() (otherwise there could be a race between checking if 
ssl->session exists and calling CRYPTO_add() on it's reference counter).

Either way, Brian's quibble about violating encapsulation remains valid - 
you have to manipulate structure elements directly in some form or other.

Cheers,
Geoff

-- 
Geoff Thorpe
[EMAIL PROTECTED]
http://www.geoffthorpe.net/

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

Reply via email to