Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/openssl/crypto Patch OpenSSL to use opencrypto (...



details:   https://anonhg.NetBSD.org/src/rev/2d74c1357356
branches:  trunk
changeset: 555516:2d74c1357356
user:      jonathan <jonathan%NetBSD.org@localhost>
date:      Thu Nov 20 00:55:51 2003 +0000

description:
Patch OpenSSL to use opencrypto (aka /dev/crypto), if configured and
(per kernel policy) for crypto transforms for which hardware
acceleration is available. Affects:

   crypto/dist/openssl/crypto/engine/eng_all.c
   crypto/dist/openssl/crypto/engine/hw_cryptodev.c
   crypto/dist/openssl/crypto/evp/c_all.c

as posted to tech-crypto for review/comment on 2003-08-21.

diffstat:

 crypto/dist/openssl/crypto/engine/eng_all.c      |  4 ++--
 crypto/dist/openssl/crypto/engine/hw_cryptodev.c |  4 ++--
 crypto/dist/openssl/crypto/evp/c_all.c           |  2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r 62799825bde0 -r 2d74c1357356 crypto/dist/openssl/crypto/engine/eng_all.c
--- a/crypto/dist/openssl/crypto/engine/eng_all.c       Wed Nov 19 23:45:25 2003 +0000
+++ b/crypto/dist/openssl/crypto/engine/eng_all.c       Thu Nov 20 00:55:51 2003 +0000
@@ -95,13 +95,13 @@
 #ifndef OPENSSL_NO_HW_4758_CCA
        ENGINE_load_4758cca();
 #endif
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
        ENGINE_load_cryptodev();
 #endif
 #endif
        }
 
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
 void ENGINE_setup_bsd_cryptodev(void) {
        static int bsd_cryptodev_default_loaded = 0;
        if (!bsd_cryptodev_default_loaded) {
diff -r 62799825bde0 -r 2d74c1357356 crypto/dist/openssl/crypto/engine/hw_cryptodev.c
--- a/crypto/dist/openssl/crypto/engine/hw_cryptodev.c  Wed Nov 19 23:45:25 2003 +0000
+++ b/crypto/dist/openssl/crypto/engine/hw_cryptodev.c  Thu Nov 20 00:55:51 2003 +0000
@@ -33,9 +33,9 @@
 #include <openssl/engine.h>
 #include <openssl/evp.h>
 
-#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#if (defined(__unix__) || defined(unix) || defined(__NetBSD__)) && !defined(USG)
 #include <sys/param.h>
-# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041)
+# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041) || (__NetBSD_Version__ >= 106210000)
 # define HAVE_CRYPTODEV
 # endif
 # if (OpenBSD >= 200110)
diff -r 62799825bde0 -r 2d74c1357356 crypto/dist/openssl/crypto/evp/c_all.c
--- a/crypto/dist/openssl/crypto/evp/c_all.c    Wed Nov 19 23:45:25 2003 +0000
+++ b/crypto/dist/openssl/crypto/evp/c_all.c    Thu Nov 20 00:55:51 2003 +0000
@@ -77,7 +77,7 @@
        OpenSSL_add_all_ciphers();
        OpenSSL_add_all_digests();
 #ifndef OPENSSL_NO_ENGINE
-# if defined(__OpenBSD__) || defined(__FreeBSD__)
+# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
        ENGINE_setup_bsd_cryptodev();
 # endif
 #endif



Home | Main Index | Thread Index | Old Index