]>
Commit | Line | Data |
---|---|---|
071084a9 AF |
1 | diff -Naur openssl-0.9.8n.org/crypto/engine/eng_all.c openssl-0.9.8n/crypto/engine/eng_all.c |
2 | --- openssl-0.9.8n.org/crypto/engine/eng_all.c 2010-03-01 01:30:11.000000000 +0100 | |
3 | +++ openssl-0.9.8n/crypto/engine/eng_all.c 2010-03-30 08:11:26.000000000 +0200 | |
4 | @@ -104,16 +104,13 @@ | |
fb25052f MT |
5 | #endif |
6 | #endif | |
7 | #ifndef OPENSSL_NO_HW | |
071084a9 | 8 | -#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) |
fb25052f MT |
9 | ENGINE_load_cryptodev(); |
10 | -#endif | |
fb25052f MT |
11 | #if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG) |
12 | ENGINE_load_capi(); | |
13 | #endif | |
14 | #endif | |
15 | } | |
16 | ||
17 | -#if defined(__OpenBSD__) || defined(__FreeBSD__) | |
18 | void ENGINE_setup_bsd_cryptodev(void) { | |
19 | static int bsd_cryptodev_default_loaded = 0; | |
20 | if (!bsd_cryptodev_default_loaded) { | |
071084a9 | 21 | @@ -122,4 +119,3 @@ |
fb25052f MT |
22 | } |
23 | bsd_cryptodev_default_loaded=1; | |
24 | } | |
25 | -#endif | |
071084a9 AF |
26 | diff -Naur openssl-0.9.8n.org/crypto/engine/eng_cryptodev.c openssl-0.9.8n/crypto/engine/eng_cryptodev.c |
27 | --- openssl-0.9.8n.org/crypto/engine/eng_cryptodev.c 2010-03-03 16:30:05.000000000 +0100 | |
28 | +++ openssl-0.9.8n/crypto/engine/eng_cryptodev.c 2010-03-30 08:01:11.000000000 +0200 | |
29 | @@ -38,14 +38,15 @@ | |
fb25052f | 30 | #if (defined(__unix__) || defined(unix)) && !defined(USG) && \ |
071084a9 | 31 | (defined(OpenBSD) || defined(__FreeBSD__)) |
fb25052f MT |
32 | #include <sys/param.h> |
33 | -# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041) | |
34 | -# define HAVE_CRYPTODEV | |
35 | -# endif | |
36 | # if (OpenBSD >= 200110) | |
37 | # define HAVE_SYSLOG_R | |
38 | # endif | |
39 | #endif | |
40 | ||
41 | +#if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041) || defined(__linux__) | |
42 | +# define HAVE_CRYPTODEV | |
43 | +#endif | |
44 | + | |
45 | #ifndef HAVE_CRYPTODEV | |
46 | ||
47 | void | |
071084a9 | 48 | @@ -58,7 +59,12 @@ |
fb25052f MT |
49 | #else |
50 | ||
51 | #include <sys/types.h> | |
52 | -#include <crypto/cryptodev.h> | |
53 | +#if defined(__linux__) | |
54 | +# include <linux/cryptodev.h> | |
55 | +# define HAVE_CRYPTODEV_NAME | |
56 | +#else | |
57 | +# include <crypto/cryptodev.h> | |
58 | +#endif | |
59 | #include <sys/ioctl.h> | |
60 | #include <errno.h> | |
61 | #include <stdio.h> | |
071084a9 | 62 | @@ -81,7 +87,11 @@ |
fb25052f MT |
63 | static int get_dev_crypto(void); |
64 | static int cryptodev_max_iv(int cipher); | |
65 | static int cryptodev_key_length_valid(int cipher, int len); | |
66 | -static int cipher_nid_to_cryptodev(int nid); | |
67 | +#ifndef HAVE_CRYPTODEV_NAME | |
68 | + static int cipher_nid_to_cryptodev(int nid); | |
69 | +#else | |
70 | + static char *cipher_nid_to_cryptodev_name(int nid); | |
71 | +#endif | |
72 | static int get_cryptodev_ciphers(const int **cnids); | |
071084a9 | 73 | /*static int get_cryptodev_digests(const int **cnids);*/ |
fb25052f | 74 | static int cryptodev_usable_ciphers(const int **nids); |
071084a9 AF |
75 | diff -Naur openssl-0.9.8n.org/crypto/engine/engine.h openssl-0.9.8n/crypto/engine/engine.h |
76 | --- openssl-0.9.8n.org/crypto/engine/engine.h 2010-02-09 15:18:15.000000000 +0100 | |
77 | +++ openssl-0.9.8n/crypto/engine/engine.h 2010-03-30 08:01:11.000000000 +0200 | |
78 | @@ -705,9 +705,7 @@ | |
fb25052f MT |
79 | * values. */ |
80 | void *ENGINE_get_static_state(void); | |
81 | ||
82 | -#if defined(__OpenBSD__) || defined(__FreeBSD__) | |
83 | void ENGINE_setup_bsd_cryptodev(void); | |
84 | -#endif | |
85 | ||
86 | /* BEGIN ERROR CODES */ | |
87 | /* The following lines are auto generated by the script mkerr.pl. Any changes | |
071084a9 AF |
88 | diff -Naur openssl-0.9.8n.org/crypto/evp/c_all.c openssl-0.9.8n/crypto/evp/c_all.c |
89 | --- openssl-0.9.8n.org/crypto/evp/c_all.c 2004-08-29 18:36:04.000000000 +0200 | |
90 | +++ openssl-0.9.8n/crypto/evp/c_all.c 2010-03-30 08:01:11.000000000 +0200 | |
fb25052f MT |
91 | @@ -83,8 +83,6 @@ |
92 | OpenSSL_add_all_ciphers(); | |
93 | OpenSSL_add_all_digests(); | |
94 | #ifndef OPENSSL_NO_ENGINE | |
95 | -# if defined(__OpenBSD__) || defined(__FreeBSD__) | |
96 | ENGINE_setup_bsd_cryptodev(); | |
97 | -# endif | |
98 | #endif | |
99 | } |