summaryrefslogtreecommitdiffstats
path: root/crypto/engine
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2012-06-03 22:00:21 +0000
committerBen Laurie <ben@openssl.org>2012-06-03 22:00:21 +0000
commit71fa451343f97b3624374ed1359adc23fba5696e (patch)
tree87ebfb43ece32507c68e360f36a67b4a921e79c0 /crypto/engine
parenta9e1c50bb09a110d4774e6710f9322344684fa2d (diff)
Version skew reduction: trivia (I hope).
Diffstat (limited to 'crypto/engine')
-rw-r--r--crypto/engine/Makefile2
-rw-r--r--crypto/engine/eng_all.c4
-rw-r--r--crypto/engine/eng_rsax.c2
-rw-r--r--crypto/engine/engine.h2
-rw-r--r--crypto/engine/enginetest.c1
5 files changed, 7 insertions, 4 deletions
diff --git a/crypto/engine/Makefile b/crypto/engine/Makefile
index 94793ce5bd..1530c1861e 100644
--- a/crypto/engine/Makefile
+++ b/crypto/engine/Makefile
@@ -111,6 +111,8 @@ eng_cnf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
eng_cnf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
eng_cnf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
eng_cnf.o: ../cryptlib.h eng_cnf.c eng_int.h
+eng_cryptodev.o: ../../crypto/dh/dh.h ../../crypto/dsa/dsa.h
+eng_cryptodev.o: ../../crypto/err/err.h ../../crypto/rsa/rsa.h
eng_cryptodev.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
eng_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c
index 7185eef1e6..6093376df4 100644
--- a/crypto/engine/eng_all.c
+++ b/crypto/engine/eng_all.c
@@ -70,7 +70,7 @@ void ENGINE_load_builtin_engines(void)
* *no* builtin implementations). */
ENGINE_load_openssl();
#endif
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
+#if !defined(OPENSSL_NO_HW) && (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV))
ENGINE_load_cryptodev();
#endif
#ifndef OPENSSL_NO_RSAX
@@ -123,7 +123,7 @@ void ENGINE_load_builtin_engines(void)
ENGINE_register_all_complete();
}
-#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/eng_rsax.c b/crypto/engine/eng_rsax.c
index 173aaf8d34..96e63477ee 100644
--- a/crypto/engine/eng_rsax.c
+++ b/crypto/engine/eng_rsax.c
@@ -399,6 +399,7 @@ static int mod_exp_pre_compute_data_512(UINT64 *m, struct mod_ctx_512 *data)
/* Some tmps */
UINT64 _t[8];
int i, j, ret = 0;
+
/* Init _m with m */
BN_init(&_m);
interleaved_array_to_bn_512(&_m, m);
@@ -492,6 +493,7 @@ static int e_rsax_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx
BIGNUM local_dmp1,local_dmq1,local_c,local_r1;
BIGNUM *dmp1,*dmq1,*c,*pr1;
int ret=0;
+
BN_CTX_start(ctx);
r1 = BN_CTX_get(ctx);
m1 = BN_CTX_get(ctx);
diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h
index 1d8ab738ef..f8be497724 100644
--- a/crypto/engine/engine.h
+++ b/crypto/engine/engine.h
@@ -740,7 +740,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/engine/enginetest.c b/crypto/engine/enginetest.c
index 857403ddf9..f4d70e7e0a 100644
--- a/crypto/engine/enginetest.c
+++ b/crypto/engine/enginetest.c
@@ -58,7 +58,6 @@
#include <stdio.h>
#include <string.h>
-#include <openssl/crypto.h>
#include <openssl/e_os2.h>
#ifdef OPENSSL_NO_ENGINE