mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-11 09:48:24 +02:00
100 lines
3.3 KiB
Diff
100 lines
3.3 KiB
Diff
diff -Naur openssl-0.9.8n.org/crypto/engine/eng_all.c openssl-0.9.8n/crypto/engine/eng_all.c
|
|
--- openssl-0.9.8n.org/crypto/engine/eng_all.c 2010-03-01 01:30:11.000000000 +0100
|
|
+++ openssl-0.9.8n/crypto/engine/eng_all.c 2010-03-30 08:11:26.000000000 +0200
|
|
@@ -104,16 +104,13 @@
|
|
#endif
|
|
#endif
|
|
#ifndef OPENSSL_NO_HW
|
|
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
|
|
ENGINE_load_cryptodev();
|
|
-#endif
|
|
#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
|
|
ENGINE_load_capi();
|
|
#endif
|
|
#endif
|
|
}
|
|
|
|
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
|
|
void ENGINE_setup_bsd_cryptodev(void) {
|
|
static int bsd_cryptodev_default_loaded = 0;
|
|
if (!bsd_cryptodev_default_loaded) {
|
|
@@ -122,4 +119,3 @@
|
|
}
|
|
bsd_cryptodev_default_loaded=1;
|
|
}
|
|
-#endif
|
|
diff -Naur openssl-0.9.8n.org/crypto/engine/eng_cryptodev.c openssl-0.9.8n/crypto/engine/eng_cryptodev.c
|
|
--- openssl-0.9.8n.org/crypto/engine/eng_cryptodev.c 2010-03-03 16:30:05.000000000 +0100
|
|
+++ openssl-0.9.8n/crypto/engine/eng_cryptodev.c 2010-03-30 08:01:11.000000000 +0200
|
|
@@ -38,14 +38,15 @@
|
|
#if (defined(__unix__) || defined(unix)) && !defined(USG) && \
|
|
(defined(OpenBSD) || defined(__FreeBSD__))
|
|
#include <sys/param.h>
|
|
-# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041)
|
|
-# define HAVE_CRYPTODEV
|
|
-# endif
|
|
# if (OpenBSD >= 200110)
|
|
# define HAVE_SYSLOG_R
|
|
# endif
|
|
#endif
|
|
|
|
+#if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041) || defined(__linux__)
|
|
+# define HAVE_CRYPTODEV
|
|
+#endif
|
|
+
|
|
#ifndef HAVE_CRYPTODEV
|
|
|
|
void
|
|
@@ -58,7 +59,12 @@
|
|
#else
|
|
|
|
#include <sys/types.h>
|
|
-#include <crypto/cryptodev.h>
|
|
+#if defined(__linux__)
|
|
+# include <linux/cryptodev.h>
|
|
+# define HAVE_CRYPTODEV_NAME
|
|
+#else
|
|
+# include <crypto/cryptodev.h>
|
|
+#endif
|
|
#include <sys/ioctl.h>
|
|
#include <errno.h>
|
|
#include <stdio.h>
|
|
@@ -81,7 +87,11 @@
|
|
static int get_dev_crypto(void);
|
|
static int cryptodev_max_iv(int cipher);
|
|
static int cryptodev_key_length_valid(int cipher, int len);
|
|
-static int cipher_nid_to_cryptodev(int nid);
|
|
+#ifndef HAVE_CRYPTODEV_NAME
|
|
+ static int cipher_nid_to_cryptodev(int nid);
|
|
+#else
|
|
+ static char *cipher_nid_to_cryptodev_name(int nid);
|
|
+#endif
|
|
static int get_cryptodev_ciphers(const int **cnids);
|
|
/*static int get_cryptodev_digests(const int **cnids);*/
|
|
static int cryptodev_usable_ciphers(const int **nids);
|
|
diff -Naur openssl-0.9.8n.org/crypto/engine/engine.h openssl-0.9.8n/crypto/engine/engine.h
|
|
--- openssl-0.9.8n.org/crypto/engine/engine.h 2010-02-09 15:18:15.000000000 +0100
|
|
+++ openssl-0.9.8n/crypto/engine/engine.h 2010-03-30 08:01:11.000000000 +0200
|
|
@@ -705,9 +705,7 @@
|
|
* values. */
|
|
void *ENGINE_get_static_state(void);
|
|
|
|
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
|
|
void ENGINE_setup_bsd_cryptodev(void);
|
|
-#endif
|
|
|
|
/* BEGIN ERROR CODES */
|
|
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
|
diff -Naur openssl-0.9.8n.org/crypto/evp/c_all.c openssl-0.9.8n/crypto/evp/c_all.c
|
|
--- openssl-0.9.8n.org/crypto/evp/c_all.c 2004-08-29 18:36:04.000000000 +0200
|
|
+++ openssl-0.9.8n/crypto/evp/c_all.c 2010-03-30 08:01:11.000000000 +0200
|
|
@@ -83,8 +83,6 @@
|
|
OpenSSL_add_all_ciphers();
|
|
OpenSSL_add_all_digests();
|
|
#ifndef OPENSSL_NO_ENGINE
|
|
-# if defined(__OpenBSD__) || defined(__FreeBSD__)
|
|
ENGINE_setup_bsd_cryptodev();
|
|
-# endif
|
|
#endif
|
|
}
|