Remove bsd_cryptodev engine

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3699)
This commit is contained in:
Rich Salz 2017-06-13 16:33:33 -04:00
parent 3ac6d5ee53
commit f39a5501ce
8 changed files with 6 additions and 2067 deletions

View file

@ -9,6 +9,9 @@
Changes between 1.1.0f and 1.1.1 [xx XXX xxxx] Changes between 1.1.0f and 1.1.1 [xx XXX xxxx]
*) Removed BSD cryptodev engine.
[Rich Salz]
*) Add a build target 'build_all_generated', to build all generated files *) Add a build target 'build_all_generated', to build all generated files
and only that. This can be used to prepare everything that requires and only that. This can be used to prepare everything that requires
things like perl for a system that lacks perl and then move everything things like perl for a system that lacks perl and then move everything

View file

@ -13,7 +13,6 @@
There are currently built-in ENGINE implementations for the following There are currently built-in ENGINE implementations for the following
crypto devices: crypto devices:
o Cryptodev
o Microsoft CryptoAPI o Microsoft CryptoAPI
o VIA Padlock o VIA Padlock
o nCipher CHIL o nCipher CHIL

View file

@ -4,5 +4,5 @@ SOURCE[../../libcrypto]=\
eng_table.c eng_pkey.c eng_fat.c eng_all.c \ eng_table.c eng_pkey.c eng_fat.c eng_all.c \
tb_rsa.c tb_dsa.c tb_dh.c tb_rand.c \ tb_rsa.c tb_dsa.c tb_dh.c tb_rand.c \
tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c tb_eckey.c \ tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c tb_eckey.c \
eng_openssl.c eng_cnf.c eng_dyn.c eng_cryptodev.c \ eng_openssl.c eng_cnf.c eng_dyn.c \
eng_rdrand.c eng_rdrand.c

View file

@ -18,14 +18,8 @@ void ENGINE_load_builtin_engines(void)
OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL); OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL);
} }
#if (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(HAVE_CRYPTODEV)) && !defined(OPENSSL_NO_DEPRECATED) #if (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)) && !defined(OPENSSL_NO_DEPRECATED)
void ENGINE_setup_bsd_cryptodev(void) void ENGINE_setup_bsd_cryptodev(void)
{ {
static int bsd_cryptodev_default_loaded = 0;
if (!bsd_cryptodev_default_loaded) {
OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_CRYPTODEV, NULL);
ENGINE_register_all_complete();
}
bsd_cryptodev_default_loaded = 1;
} }
#endif #endif

File diff suppressed because it is too large Load diff

View file

@ -10,7 +10,6 @@
#include <openssl/engine.h> #include <openssl/engine.h>
void engine_load_openssl_int(void); void engine_load_openssl_int(void);
void engine_load_cryptodev_int(void);
void engine_load_rdrand_int(void); void engine_load_rdrand_int(void);
void engine_load_dynamic_int(void); void engine_load_dynamic_int(void);
void engine_load_padlock_int(void); void engine_load_padlock_int(void);

View file

@ -241,19 +241,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl)
engine_load_openssl_int(); engine_load_openssl_int();
return 1; return 1;
} }
# if !defined(OPENSSL_NO_HW) && \
(defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(HAVE_CRYPTODEV))
static CRYPTO_ONCE engine_cryptodev = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE_STATIC(ossl_init_engine_cryptodev)
{
# ifdef OPENSSL_INIT_DEBUG
fprintf(stderr, "OPENSSL_INIT: ossl_init_engine_cryptodev: "
"engine_load_cryptodev_int()\n");
# endif
engine_load_cryptodev_int();
return 1;
}
# endif
# ifndef OPENSSL_NO_RDRAND # ifndef OPENSSL_NO_RDRAND
static CRYPTO_ONCE engine_rdrand = CRYPTO_ONCE_STATIC_INIT; static CRYPTO_ONCE engine_rdrand = CRYPTO_ONCE_STATIC_INIT;
@ -573,12 +560,6 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
if ((opts & OPENSSL_INIT_ENGINE_OPENSSL) if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
&& !RUN_ONCE(&engine_openssl, ossl_init_engine_openssl)) && !RUN_ONCE(&engine_openssl, ossl_init_engine_openssl))
return 0; return 0;
# if !defined(OPENSSL_NO_HW) && \
(defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(HAVE_CRYPTODEV))
if ((opts & OPENSSL_INIT_ENGINE_CRYPTODEV)
&& !RUN_ONCE(&engine_cryptodev, ossl_init_engine_cryptodev))
return 0;
# endif
# ifndef OPENSSL_NO_RDRAND # ifndef OPENSSL_NO_RDRAND
if ((opts & OPENSSL_INIT_ENGINE_RDRAND) if ((opts & OPENSSL_INIT_ENGINE_RDRAND)
&& !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand)) && !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand))

View file

@ -744,7 +744,7 @@ typedef int (*dynamic_bind_engine) (ENGINE *e, const char *id,
*/ */
void *ENGINE_get_static_state(void); void *ENGINE_get_static_state(void);
# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(HAVE_CRYPTODEV) # if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
DEPRECATEDIN_1_1_0(void ENGINE_setup_bsd_cryptodev(void)) DEPRECATEDIN_1_1_0(void ENGINE_setup_bsd_cryptodev(void))
# endif # endif