OpenSSL Locks

I need to do some additional processing with OpenSSL in a custom
module. I noticed ngingx does not set any locks in ngx_ssl_init (from
ngx_event_openssl.c).

A few questions:

  1. Should lock installation be guarded on NGX_THREADS or something else?

  2. Where is most appropirate to initialize the locks: ngx_init_threads
    or ngx_ssl_init (or somewhere else)?

  3. Is the project interested in a patch? (Per
    Contributing Changes, thanks Maxim).

Thanks in advance.

Jeff

Hello!

On Wed, Dec 11, 2013 at 05:55:16AM -0500, Jeffrey W. wrote:

  1. Is the project interested in a patch? (Per
    Contributing Changes, thanks Maxim).

There are basically no threads support in nginx (it was
experimental and broken for a long time with the exception of some
win32-related stuff), so it’s not clear why you need locks at all.


Maxim D.
http://nginx.org/

On Wed, Dec 11, 2013 at 10:25 AM, Maxim D. [email protected]
wrote:

  1. Should lock installation be guarded on NGX_THREADS or something else?

  2. Where is most appropirate to initialize the locks: ngx_init_threads
    or ngx_ssl_init (or somewhere else)?

  3. Is the project interested in a patch? (Per
    Contributing Changes, thanks Maxim).

There are basically no threads support in nginx (it was
experimental and broken for a long time with the exception of some
win32-related stuff), so it’s not clear why you need locks at all.
Thanks Maxim. The source code is full of:

#if (NGX_THREADS)
  ...
#endif

I thought they were needed. My bad.

Jeff