You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/11/20 22:40:36 UTC

DO NOT REPLY [Bug 48253] New: Tomcat Native patch - adding dynamic locking callbacks for openssl engines

https://issues.apache.org/bugzilla/show_bug.cgi?id=48253

           Summary: Tomcat Native patch - adding dynamic locking callbacks
                    for openssl engines
           Product: Tomcat Native
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Library
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: DRuggeri@primary.net


Created an attachment (id=24576)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24576)
Adds dynamic locking callbacks to TCNative for use by openssl engines

Hello;
   The attached patch adds dynamic locking callbacks needed by certain engines
in OpenSSL (chil, specifically). Most of this code was poached from HTTPD 2.2.x
mod_ssl (ssl_util.c). The notable differences to TCNative after applying the
patch are that the call to ssl_thread_setup had to be moved before the engine
is initialized since the callbacks must be set before engine init, and the
dynamic callback functions were added to ssl_thread_setup.

The issue:
When utilizing an OpenSSL engine that requires the locking callback, no locks
will be found causing the vendor's native library to exit. When using chil,
this only happens when an assertion fails and detects that multiple threads are
active, but no upcalls are provided. I am unsure what other engines require
this functionality.

The solution:
Add the callback functions to use APR locks. Register them with OpenSSL via the
CRYPTO_set_dyn..... functions.


Note:
This is the first TCNative patch I have submitted and was informed that there
should be a xdocs/miscellaneous/changelog.xml file. This patch is against the
tomcat-native-1.1.16-src.tar.gz file which does not include such a document. In
any event, I think the CHANGELOG.txt entry should read:
Improvement: Add dynamic locking callbacks for openssl engines (druggeri)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48253] Tomcat Native patch - adding dynamic locking callbacks for openssl engines

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48253

Daniel Ruggeri <DR...@primary.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |NeedsReleaseNote,
                   |                            |PatchAvailable

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48253] Tomcat Native patch - adding dynamic locking callbacks for openssl engines

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48253

--- Comment #1 from Mladen Turk <mt...@apache.org> 2010-03-26 14:41:51 UTC ---
Patch looks good except that there shouldn't be any
static ... function/type declarations inside .h files.

Just copy that from ssl_private.h directly to the ssl.c
and only for the forward declarations.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48253] Tomcat Native patch - adding dynamic locking callbacks for openssl engines

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48253

--- Comment #4 from jfclere <jf...@gmail.com> 2011-01-07 03:01:23 EST ---
Fixed by svn commit: r1055907

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48253] Tomcat Native patch - adding dynamic locking callbacks for openssl engines

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48253

Daniel Ruggeri <DR...@primary.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |1.1.20

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: DO NOT REPLY [Bug 48253] Tomcat Native patch - adding dynamic locking callbacks for openssl engines

Posted by Daniel Ruggeri <DR...@primary.net>.
On 1:59 PM, bugzilla@apache.org wrote:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=48253
>
> jfclere<jf...@gmail.com>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|NEW                         |RESOLVED
>           Resolution|                            |FIXED

Forgive me, but I did not see any notes added to this bug. Does this 
mean the patch as submitted has been implemented or has a different 
patch/update resolved the same issue? I'm not too familiar with how the 
Tomcat project implements these updates as I spend most of my time on 
the dev@httpd.apache.org list and have had an eye on this bug report for 
some time now.

--
Daniel Ruggeri



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48253] Tomcat Native patch - adding dynamic locking callbacks for openssl engines

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48253

jfclere <jf...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48253] Tomcat Native patch - adding dynamic locking callbacks for openssl engines

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48253

Daniel Ruggeri <DR...@primary.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24576|0                           |1
        is obsolete|                            |

--- Comment #3 from Daniel Ruggeri <DR...@primary.net> 2010-03-29 14:11:08 UTC ---
Created an attachment (id=25206)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25206)
Updated patch - moves proposed changes from ssl_private.h to ssl.c

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48253] Tomcat Native patch - adding dynamic locking callbacks for openssl engines

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48253

jfclere <jf...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jfclere@gmail.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48253] Tomcat Native patch - adding dynamic locking callbacks for openssl engines

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48253

--- Comment #2 from Daniel Ruggeri <DR...@primary.net> 2010-03-29 14:07:12 UTC ---
(In reply to comment #1)
> Patch looks good except that there shouldn't be any
> static ... function/type declarations inside .h files.
> 
> Just copy that from ssl_private.h directly to the ssl.c
> and only for the forward declarations.

Thank you for your time, Mladen. I have updated the patch against the latest
source distribution (1.1.20) and moved the proposed content of ssl_private.h to
the lines immediately preceding the proposed functions in ssl.c. Please let me
know if I misunderstood your directive, or if things are OK. Should I have also
moved the CRYPTO_dynlock_value struct to ssl_private.h?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org