Hi guys,

Do you have any comments on this patch?

Thanks,
Cristian S.

> -----Original Message-----
> From: Stoica Cristian-B18196
> Sent: Tuesday, September 10, 2013 1:57 PM
> To: [email protected]
> Cc: Stoica Cristian-B18196
> Subject: [PATCH] remove double initialization of cryptodev engine
> 
> cryptodev engine is initialized together with the other engines in
> ENGINE_load_builtin_engines. The initialization done through
> OpenSSL_add_all_algorithms is redundant.
> 
> Signed-off-by: Cristian Stoica <[email protected]>
> ---
>  crypto/engine/eng_all.c | 11 -----------
>  crypto/engine/engine.h  |  4 ----
>  crypto/evp/c_all.c      |  5 -----
>  util/libeay.num         |  2 +-
>  4 files changed, 1 insertion(+), 21 deletions(-)
> 
> diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c
> index 37ddcf9..81a7c94 100644
> --- a/crypto/engine/eng_all.c
> +++ b/crypto/engine/eng_all.c
> @@ -119,14 +119,3 @@ void ENGINE_load_builtin_engines(void)
>  #endif
>       ENGINE_register_all_complete();
>       }
> -
> -#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) {
> -             ENGINE_load_cryptodev();
> -             ENGINE_register_all_complete();
> -     }
> -     bsd_cryptodev_default_loaded=1;
> -}
> -#endif
> diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h
> index f8be497..237a6c9 100644
> --- a/crypto/engine/engine.h
> +++ b/crypto/engine/engine.h
> @@ -740,10 +740,6 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const
> char *id,
>   * values. */
>  void *ENGINE_get_static_state(void);
> 
> -#if defined(__OpenBSD__) || defined(__FreeBSD__) ||
> defined(HAVE_CRYPTODEV)
> -void ENGINE_setup_bsd_cryptodev(void);
> -#endif
> -
>  /* BEGIN ERROR CODES */
>  /* The following lines are auto generated by the script mkerr.pl. Any
> changes
>   * made after this point may be overwritten when the script is next run.
> diff --git a/crypto/evp/c_all.c b/crypto/evp/c_all.c
> index 766c4ce..5d6c21b 100644
> --- a/crypto/evp/c_all.c
> +++ b/crypto/evp/c_all.c
> @@ -82,9 +82,4 @@ void OPENSSL_add_all_algorithms_noconf(void)
>       OPENSSL_cpuid_setup();
>       OpenSSL_add_all_ciphers();
>       OpenSSL_add_all_digests();
> -#ifndef OPENSSL_NO_ENGINE
> -# if defined(__OpenBSD__) || defined(__FreeBSD__) ||
> defined(HAVE_CRYPTODEV)
> -     ENGINE_setup_bsd_cryptodev();
> -# endif
> -#endif
>       }
> diff --git a/util/libeay.num b/util/libeay.num
> index 51b9358..b2db69c 100755
> --- a/util/libeay.num
> +++ b/util/libeay.num
> @@ -2801,7 +2801,7 @@ BIO_indent                              3242
>       EXIST::FUNCTION:
>  BUF_strlcpy                             3243 EXIST::FUNCTION:
>  OpenSSLDie                              3244 EXIST::FUNCTION:
>  OPENSSL_cleanse                         3245 EXIST::FUNCTION:
> -ENGINE_setup_bsd_cryptodev              3246
>       EXIST:__FreeBSD__:FUNCTION:ENGINE
> +ENGINE_setup_bsd_cryptodev              3246 NOEXIST::FUNCTION:
>  ERR_release_err_state_table             3247 EXIST::FUNCTION:LHASH
>  EVP_aes_128_cfb8                        3248 EXIST::FUNCTION:AES
>  FIPS_corrupt_rsa                        3249 NOEXIST::FUNCTION:
> --
> 1.7.11.7


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to