summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-07-01 14:55:59 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-07-01 14:55:59 +0000
commite105098b3f3f04dce130d067ac98e91d03884bbb (patch)
tree307583e6896a77c3e719060075a559bd67905249
parent9852e7e4d72eef334b90a24823ff7fbe4c5c9990 (diff)
PR: 1974 (partial)
Submitted by: David McCullough <david_mccullough@securecomputing.com> Approved by: steve@openssl.org If -DHAVE_CRYPTODEV is set enable cryptodev support
-rw-r--r--INSTALL6
-rw-r--r--crypto/engine/eng_all.c4
-rw-r--r--crypto/engine/engine.h2
-rw-r--r--crypto/evp/c_all.c2
4 files changed, 10 insertions, 4 deletions
diff --git a/INSTALL b/INSTALL
index 85e2660191..1325079f2a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -103,6 +103,12 @@
define preprocessor symbols, specify additional libraries,
library directories or other compiler options.
+ -DHAVE_CRYPTODEV Enable the BSD cryptodev engine even if we are not using
+ BSD. Useful if you are running ocf-linux or something
+ similar. Once enabled you can also enable the use of
+ cryptodev digests, which is usually slower unless you have
+ large amounts data. Use -DUSE_CRYPTODEV_DIGESTS to force
+ it.
Installation in Detail
----------------------
diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c
index a6f5499340..22c120454f 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
ENGINE_load_dynamic();
@@ -114,7 +114,7 @@ void ENGINE_load_builtin_engines(void)
#endif
}
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
void ENGINE_setup_bsd_cryptodev(void) {
static int bsd_cryptodev_default_loaded = 0;
if (!bsd_cryptodev_default_loaded) {
diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h
index 10b5d6787a..c411806066 100644
--- a/crypto/engine/engine.h
+++ b/crypto/engine/engine.h
@@ -732,7 +732,7 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id,
* values. */
void *ENGINE_get_static_state(void);
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
void ENGINE_setup_bsd_cryptodev(void);
#endif
diff --git a/crypto/evp/c_all.c b/crypto/evp/c_all.c
index a5da52e62d..766c4cecdf 100644
--- a/crypto/evp/c_all.c
+++ b/crypto/evp/c_all.c
@@ -83,7 +83,7 @@ void OPENSSL_add_all_algorithms_noconf(void)
OpenSSL_add_all_ciphers();
OpenSSL_add_all_digests();
#ifndef OPENSSL_NO_ENGINE
-# if defined(__OpenBSD__) || defined(__FreeBSD__)
+# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
ENGINE_setup_bsd_cryptodev();
# endif
#endif