You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

  1. From bca4ff53aef16d38aeb1569edaaca6ac4feac6e8 Mon Sep 17 00:00:00 2001
  2. From: Eneas U de Queiroz <cote2004-github@yahoo.com>
  3. Date: Tue, 5 Jun 2018 10:36:51 -0300
  4. Subject: [PATCH] Removed calls to AP deprecated in openssl 1.1
  5. In openssl 1.1, there is no need to initialize the library. It is
  6. automatically done when first used. This allows to compile openvswitch
  7. with openssl 1.1.0 with deprecated API disabled.
  8. Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
  9. Signed-off-by: Ben Pfaff <blp@ovn.org>
  10. ---
  11. lib/stream-ssl.c | 2 ++
  12. 1 file changed, 2 insertions(+)
  13. diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c
  14. index ebb6f3a6c8..c7443470f5 100644
  15. --- a/lib/stream-ssl.c
  16. +++ b/lib/stream-ssl.c
  17. @@ -947,12 +947,14 @@ do_ssl_init(void)
  18. {
  19. SSL_METHOD *method;
  20. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
  21. #ifdef _WIN32
  22. /* The following call is needed if we "#include <openssl/applink.c>". */
  23. CRYPTO_malloc_init();
  24. #endif
  25. SSL_library_init();
  26. SSL_load_error_strings();
  27. +#endif
  28. if (!RAND_status()) {
  29. /* We occasionally see OpenSSL fail to seed its random number generator