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.

56 lines
1.7 KiB

  1. From e96af1cee523c5551c7fc5f36eba8e271fa51b20 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 7/7] 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/ecdh.py | 3 +++
  9. src/_cffi_src/openssl/ssl.py | 5 +++++
  10. 4 files changed, 16 insertions(+)
  11. --- a/src/_cffi_src/openssl/conf.py
  12. +++ b/src/_cffi_src/openssl/conf.py
  13. @@ -18,4 +18,8 @@ void OPENSSL_no_config(void);
  14. """
  15. CUSTOMIZATIONS = """
  16. +#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
  17. +#define OPENSSL_config(x) 0
  18. +#define OPENSSL_no_config() 0
  19. +#endif
  20. """
  21. --- a/src/_cffi_src/openssl/crypto.py
  22. +++ b/src/_cffi_src/openssl/crypto.py
  23. @@ -114,4 +114,8 @@ void *Cryptography_realloc_wrapper(void
  24. void Cryptography_free_wrapper(void *ptr, const char *path, int line) {
  25. free(ptr);
  26. }
  27. +
  28. +#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
  29. +#define CRYPTO_get_locking_callback() 0
  30. +#endif
  31. """
  32. --- a/src/_cffi_src/openssl/ecdh.py
  33. +++ b/src/_cffi_src/openssl/ecdh.py
  34. @@ -18,4 +18,7 @@ long SSL_CTX_set_ecdh_auto(SSL_CTX *, in
  35. """
  36. CUSTOMIZATIONS = """
  37. +#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
  38. +#define SSL_CTX_set_ecdh_auto(a, b) ((b) != 0)
  39. +#endif
  40. """
  41. --- a/src/_cffi_src/openssl/ssl.py
  42. +++ b/src/_cffi_src/openssl/ssl.py
  43. @@ -739,4 +739,9 @@ long (*SSL_get_max_proto_version)(SSL *)
  44. #else
  45. static const long Cryptography_HAS_GET_PROTO_VERSION = 1;
  46. #endif
  47. +
  48. +#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
  49. +#define SSL_library_init() 1
  50. +#define SSL_load_error_strings() 0
  51. +#endif
  52. """