Stephen Henson via RT wrote:
>> [phil...@redfish-solutions.com - Mon Jun 29 22:11:12 2009]:
>>
>> Philip A. Prindeville wrote:
>>> Stephen Henson via RT wrote:
>>>
>>>>> [philipp_s...@redfish-solutions.com - Mon Jan 26 12:04:34 2009]:
>>>>>
>>>>> The OCF code has been ported to Linux:
>>>>>
>>>>> http://sourceforge.net/project/showfiles.php?group_id=133575
>>>>>
>>>>>
>>>>> it would be very nice if this were supported in openssl without
>> patching.
>>>>> For instance, crypto/engine/eng_all.c tests for:
>>>>>
>>>>>
>>>>> #if defined(__OpenBSD__) || defined(__FreeBSD__)
>>>>>
>>>>>
>>>>> but why not test for HAVE_CRYPTODEV instead, and allow this to be
>> set by
>>>>> the configuration environment?
>>>>>
>>>>>
>>>> You should be able to set HAVE_CRYPTODEV in the configuration
>>>> environment with the command line switch -DHAVE_CRYPTODEV . Is the
>> above
>>>> line the only case you need to patch?
>>>>
>>>> Steve.
>>>>
>>> As far as I can tell, the files that conditionally expose
>> "cryptodev" stuff are:
>>> crypto/engine/eng_all.c
>>> crypto/engine/engine.h
>>> include/openssl/engine.h
>>> libssl/crypto/evp/c_all.c
>>>
>>> and that's it.
>>>
>>> I'm attaching a copy of the patch we use on Linux and uClibc if
>> anyone is interested.
>>> -Philip
>>>
>>>
>> Didn't hear back.  I responded on 03/09/2009.
>>
>> Should I repost this patch?  I'm trying to figure out what you need
>> from
>> me to get movement on issues 1821, 1822, and 1823.
>>
> 
> This should be now included as part of the patch for PR#1974

Ok, silly question but...

diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c
index 623485d..3165b98 100644
--- a/crypto/engine/eng_all.c
+++ b/crypto/engine/eng_all.c
@@ -68,7 +68,7 @@ void ENGINE_load_builtin_engines(void)
         * *no* builtin implementations). */
        ENGINE_load_openssl();
 #endif
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#if !defined(OPENSSL_NO_HW) && (defined(__OpenBSD__) || defined(__FreeBSD__) 
|| defined(HAVE_CRYPTODEV))
        ENGINE_load_cryptodev();
 #endif
 #if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_AESNI)


Why not just have:

# if !defined(OPENSSL_NO_HW) && defined(HAVE_CRYPTODEV)

and enable this for __OpenBSD__ and __FreeBSD__ as appropriate?

-Philip

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to