Skip to content

Commit

Permalink
Remove unused bindings (#10427)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Feb 19, 2024
1 parent 83c6010 commit 48290a5
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 34 deletions.
7 changes: 0 additions & 7 deletions src/_cffi_src/openssl/err.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
static const int EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH;
static const int ERR_LIB_EVP;
static const int ERR_LIB_PROV;
static const int SSL_TLSEXT_ERR_OK;
static const int SSL_TLSEXT_ERR_ALERT_FATAL;
Expand All @@ -37,12 +36,6 @@
"""

CUSTOMIZATIONS = """
/* This define is tied to provider support and is conditionally
removed if Cryptography_HAS_PROVIDERS is false */
#ifndef ERR_LIB_PROV
#define ERR_LIB_PROV 0
#endif
#if CRYPTOGRAPHY_IS_BORINGSSL
static const int EVP_F_EVP_ENCRYPTFINAL_EX = 0;
static const int EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH = 0;
Expand Down
15 changes: 0 additions & 15 deletions src/_cffi_src/openssl/evp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
static const int EVP_PKEY_EC;
static const int EVP_PKEY_X25519;
static const int EVP_PKEY_ED25519;
static const int EVP_PKEY_X448;
static const int EVP_PKEY_ED448;
static const int EVP_MAX_MD_SIZE;
static const int Cryptography_HAS_EVP_PKEY_DHX;
Expand Down Expand Up @@ -73,19 +71,6 @@
const long Cryptography_HAS_EVP_PKEY_DHX = 0;
#endif
/* This is tied to X448 support so we reuse the Cryptography_HAS_X448
conditional to remove it. OpenSSL 1.1.1 adds this define. We can remove
this in the distant future when we drop 1.1.0 support. */
#ifndef EVP_PKEY_X448
#define EVP_PKEY_X448 NID_X448
#endif
/* This is tied to ED448 support so we reuse the Cryptography_HAS_ED448
conditional to remove it. */
#ifndef EVP_PKEY_ED448
#define EVP_PKEY_ED448 0
#endif
#if CRYPTOGRAPHY_OPENSSL_300_OR_GREATER
static const long Cryptography_HAS_300_FIPS = 1;
#else
Expand Down
3 changes: 0 additions & 3 deletions src/_cffi_src/openssl/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
typedef ... OSSL_PROVIDER;
typedef ... OSSL_LIB_CTX;
static const long PROV_R_BAD_DECRYPT;
"""

FUNCTIONS = """
Expand All @@ -32,7 +30,6 @@
static const long Cryptography_HAS_PROVIDERS = 0;
typedef void OSSL_PROVIDER;
typedef void OSSL_LIB_CTX;
static const long PROV_R_BAD_DECRYPT = 0;
OSSL_PROVIDER *(*OSSL_PROVIDER_load)(OSSL_LIB_CTX *, const char *) = NULL;
int (*OSSL_PROVIDER_unload)(OSSL_PROVIDER *) = NULL;
#endif
Expand Down
9 changes: 0 additions & 9 deletions src/cryptography/hazmat/bindings/openssl/_conditional.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ def cryptography_has_tls_st() -> list[str]:
]


def cryptography_has_ed448() -> list[str]:
return [
"EVP_PKEY_ED448",
]


def cryptography_has_ssl_sigalgs() -> list[str]:
return [
"SSL_CTX_set1_sigalgs_list",
Expand Down Expand Up @@ -119,8 +113,6 @@ def cryptography_has_providers() -> list[str]:
return [
"OSSL_PROVIDER_load",
"OSSL_PROVIDER_unload",
"ERR_LIB_PROV",
"PROV_R_BAD_DECRYPT",
]


Expand Down Expand Up @@ -191,7 +183,6 @@ def cryptography_has_get_extms_support() -> list[str]:
"Cryptography_HAS_SET_CERT_CB": cryptography_has_set_cert_cb,
"Cryptography_HAS_SSL_ST": cryptography_has_ssl_st,
"Cryptography_HAS_TLS_ST": cryptography_has_tls_st,
"Cryptography_HAS_ED448": cryptography_has_ed448,
"Cryptography_HAS_SIGALGS": cryptography_has_ssl_sigalgs,
"Cryptography_HAS_PSK": cryptography_has_psk,
"Cryptography_HAS_PSK_TLSv1_3": cryptography_has_psk_tlsv13,
Expand Down

0 comments on commit 48290a5

Please sign in to comment.