Skip to content

Commit

Permalink
Define away deprecated OpenSSL functions
Browse files Browse the repository at this point in the history
Deprecated in 1.1
  • Loading branch information
neheb committed Nov 25, 2019
1 parent d9c3b53 commit 986fd20
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/_cffi_src/openssl/evp.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,5 +283,6 @@
#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
#define EVP_CIPHER_CTX_cleanup EVP_CIPHER_CTX_reset
#define OpenSSL_add_all_algorithms() do {} while(0)
#endif
"""
3 changes: 3 additions & 0 deletions src/_cffi_src/openssl/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@
"""

CUSTOMIZATIONS = """
#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
#define OBJ_cleanup() do {} while (0)
#endif
"""
4 changes: 4 additions & 0 deletions src/_cffi_src/openssl/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,4 +902,8 @@
#else
static const long Cryptography_HAS_TLSv1_3 = 1;
#endif
#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
#define SSL_library_init() 1
#endif
"""

0 comments on commit 986fd20

Please sign in to comment.