apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: Using OpenSSL's des_fcrypt for thread safe crypt()
Date Tue, 03 May 2005 12:15:22 GMT
On Tue, 03 May 2005 12:51:30 +0100, Ben Laurie wrote:

>Joe Orton wrote:
>> On Mon, Apr 25, 2005 at 10:06:59PM +1000, Brian Havard wrote:
>>>I'd like to add to apr-util the ability to use des_fcrypt from the OpenSSL 
>>>library as a possible thread-safe implementation of crypt() for systems that 
>>>have no crypt_r().
>>>Does anyone have a problem with either the concept or implementation of this?
>> With the implementation, at least, yes:
>> - only pick up the dependency on -lcrypto on platforms which need this

Ok, fair enough. I'll just have to figure out how to do that.

>> - keep the flag private to apr-util (i.e. use AC_CHECK_HEADERS and
>> AC_DEFINE), it doesn't need to be exported via apu.h

I think I can handle that.

>> Is this function really thread-safe in OpenSSL even without the locking
>> callbacks registered?
>Probably not.

Really? I can't see any use of locks in the fcrypt code or anything that
looks thread-unsafe. The docs also state specifically that it IS thread
"DES_fcrypt() ... This function is thread safe, unlike the normal crypt".
(from http://www.openssl.org/docs/crypto/des.html)

 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |

View raw message