>Synopsis:      /dev/crypto broken on FreeBSD

 >Class:         sw-bug

 >OS Release:       FreeBSD 6.2-RELEASE-p8 i386
 >OpenSSL Release:  All OpenSSL releases based on 
crypto/engine/eng_cryptodev.c v.1.5 and newer (tested on 0.9.8e)

 >Description:
        The problem check-in #11541
http://cvs.openssl.org/chngview?cn=11541
        commited to crypto/engine/eng_cryptodev.c 1.4 -> 1.5
        broke the /dev/crypto support on FreeBSD

        The current code contain:
  --------------
...
if (defined(__unix__) || defined(unix)) && !defined(USG) && \
   (defined(OpenBSD) || defined(__FreeBSD_version))
#include <sys/param.h>
...
  --------------

        Unfortunately, the __FreeBSD_version variable is defined within 
sys/param.h

        As the #if check the presence of such variable before the sys/param 
inclusion, it fail everytime so /dev/crypto support is not compiled in.

 >How-To-Repeat:
         Run the 'openssl speed' on FreeBSD with and without a 
/dev/crypto supported hardware accelerator, compare the results

 >Fix:

        We can check the existence of variables, but after the sys/param.h 
inclusion only.

        See the attached patch.


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

Reply via email to