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.

54 lines
1.7 KiB

  1. From 93317e7835acf40a9b8b0f7af417240b57ab690a Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Thu, 5 Dec 2019 12:52:13 -0800
  4. Subject: [PATCH] Add defines for totally deprecated functions
  5. ---
  6. src/_cffi_src/openssl/conf.py | 4 ++++
  7. src/_cffi_src/openssl/crypto.py | 4 ++++
  8. src/_cffi_src/openssl/ssl.py | 5 +++++
  9. 3 files changed, 13 insertions(+)
  10. diff --git a/src/_cffi_src/openssl/conf.py b/src/_cffi_src/openssl/conf.py
  11. index 9db0162a..6b474d42 100644
  12. --- a/src/_cffi_src/openssl/conf.py
  13. +++ b/src/_cffi_src/openssl/conf.py
  14. @@ -18,4 +18,8 @@ void OPENSSL_no_config(void);
  15. """
  16. CUSTOMIZATIONS = """
  17. +#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
  18. +#define OPENSSL_config(x) 0
  19. +#define OPENSSL_no_config() 0
  20. +#endif
  21. """
  22. diff --git a/src/_cffi_src/openssl/crypto.py b/src/_cffi_src/openssl/crypto.py
  23. index f3623b21..85541b31 100644
  24. --- a/src/_cffi_src/openssl/crypto.py
  25. +++ b/src/_cffi_src/openssl/crypto.py
  26. @@ -124,4 +124,8 @@ void *Cryptography_realloc_wrapper(void *ptr, size_t size, const char *path,
  27. void Cryptography_free_wrapper(void *ptr, const char *path, int line) {
  28. free(ptr);
  29. }
  30. +
  31. +#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
  32. +#define CRYPTO_get_locking_callback() 0
  33. +#endif
  34. """
  35. diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
  36. index e726417d..68c42160 100644
  37. --- a/src/_cffi_src/openssl/ssl.py
  38. +++ b/src/_cffi_src/openssl/ssl.py
  39. @@ -792,4 +792,9 @@ int (*SSL_CTX_set_max_early_data)(SSL_CTX *, uint32_t) = NULL;
  40. #else
  41. static const long Cryptography_HAS_TLSv1_3 = 1;
  42. #endif
  43. +
  44. +#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
  45. +#define SSL_library_init() 1
  46. +#define SSL_load_error_strings() 0
  47. +#endif
  48. """
  49. --
  50. 2.26.2