From fd809eed5d8dfcc38868ac118dee228cdd846c4d Mon Sep 17 00:00:00 2001 From: kaloz Date: Sat, 12 Jul 2008 15:43:16 +0000 Subject: add ocf support to openssl, and use it by default if engines are enabled git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11789 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...210-use_cryptodev_by_default_if_available.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/openssl/patches/210-use_cryptodev_by_default_if_available.patch (limited to 'package/openssl/patches/210-use_cryptodev_by_default_if_available.patch') diff --git a/package/openssl/patches/210-use_cryptodev_by_default_if_available.patch b/package/openssl/patches/210-use_cryptodev_by_default_if_available.patch new file mode 100644 index 000000000..6bcb78601 --- /dev/null +++ b/package/openssl/patches/210-use_cryptodev_by_default_if_available.patch @@ -0,0 +1,28 @@ +--- openssl-0.9.8h/ssl/ssl_algs.c 2007-04-24 01:50:21.000000000 +0200 ++++ openssl-0.9.8h-ocf/ssl/ssl_algs.c 2008-07-12 17:34:27.000000000 +0200 +@@ -57,6 +57,9 @@ + */ + + #include ++#ifndef OPENSSL_NO_ENGINE ++#include ++#endif + #include + #include + #include "ssl_locl.h" +@@ -127,6 +130,15 @@ + #endif + /* initialize cipher/digest methods table */ + ssl_load_ciphers(); ++ ++#ifndef OPENSSL_NO_ENGINE ++ /* Initialize available hardware crypto engines */ ++ ENGINE_load_builtin_engines(); ++ ENGINE_register_all_complete(); ++ /* ...and set cryptodev to be the default. */ ++ ENGINE_set_default_ciphers(ENGINE_by_id("cryptodev")); ++#endif ++ + return(1); + } + -- cgit v1.2.3