Skip to content

Commit

Permalink
Trim some more unused bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jul 2, 2023
1 parent c3a313a commit ffdada3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 27 deletions.
9 changes: 0 additions & 9 deletions src/_cffi_src/openssl/evp.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
static const int EVP_PKEY_ED25519;
static const int EVP_PKEY_X448;
static const int EVP_PKEY_ED448;
static const int EVP_PKEY_POLY1305;
static const int EVP_MAX_MD_SIZE;
static const int EVP_CTRL_AEAD_SET_IVLEN;
static const int EVP_CTRL_AEAD_GET_TAG;
Expand Down Expand Up @@ -109,7 +108,6 @@
int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *, const EVP_MD *);
int EVP_default_properties_is_fips_enabled(OSSL_LIB_CTX *);
int EVP_default_properties_enable_fips(OSSL_LIB_CTX *, int);
"""

Expand Down Expand Up @@ -154,19 +152,12 @@
#define EVP_PKEY_ED448 NID_ED448
#endif
/* This is tied to poly1305 support so we reuse the Cryptography_HAS_POLY1305
conditional to remove it. */
#ifndef EVP_PKEY_POLY1305
#define EVP_PKEY_POLY1305 NID_poly1305
#endif
#if CRYPTOGRAPHY_OPENSSL_300_OR_GREATER
static const long Cryptography_HAS_300_FIPS = 1;
static const long Cryptography_HAS_300_EVP_CIPHER = 1;
#else
static const long Cryptography_HAS_300_FIPS = 0;
static const long Cryptography_HAS_300_EVP_CIPHER = 0;
int (*EVP_default_properties_is_fips_enabled)(OSSL_LIB_CTX *) = NULL;
int (*EVP_default_properties_enable_fips)(OSSL_LIB_CTX *, int) = NULL;
EVP_CIPHER * (*EVP_CIPHER_fetch)(OSSL_LIB_CTX *, const char *,
const char *) = NULL;
Expand Down
6 changes: 0 additions & 6 deletions src/_cffi_src/openssl/nid.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
static const int NID_undef;
static const int NID_aes_256_cbc;
static const int NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
static const int NID_ED25519;
static const int NID_ED448;
static const int NID_poly1305;
static const int NID_subject_alt_name;
static const int NID_crl_reason;
Expand All @@ -32,19 +29,16 @@
CUSTOMIZATIONS = """
#ifndef NID_ED25519
static const long Cryptography_HAS_ED25519 = 0;
static const int NID_ED25519 = 0;
#else
static const long Cryptography_HAS_ED25519 = 1;
#endif
#ifndef NID_ED448
static const long Cryptography_HAS_ED448 = 0;
static const int NID_ED448 = 0;
#else
static const long Cryptography_HAS_ED448 = 1;
#endif
#ifndef NID_poly1305
static const long Cryptography_HAS_POLY1305 = 0;
static const int NID_poly1305 = 0;
#else
static const long Cryptography_HAS_POLY1305 = 1;
#endif
Expand Down
1 change: 0 additions & 1 deletion src/_cffi_src/openssl/rsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
int RSA_generate_key_ex(RSA *, int, BIGNUM *, BN_GENCB *);
int RSA_check_key(const RSA *);
RSA *RSAPublicKey_dup(RSA *);
int RSA_blinding_on(RSA *, BN_CTX *);
int RSA_print(BIO *, const RSA *, int);
int RSA_set0_key(RSA *, BIGNUM *, BIGNUM *, BIGNUM *);
Expand Down
11 changes: 0 additions & 11 deletions src/cryptography/hazmat/bindings/openssl/_conditional.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,15 @@ def cryptography_has_x509_store_ctx_get_issuer() -> typing.List[str]:
def cryptography_has_ed448() -> typing.List[str]:
return [
"EVP_PKEY_ED448",
"NID_ED448",
]


def cryptography_has_ed25519() -> typing.List[str]:
return [
"NID_ED25519",
"EVP_PKEY_ED25519",
]


def cryptography_has_poly1305() -> typing.List[str]:
return [
"NID_poly1305",
"EVP_PKEY_POLY1305",
]


def cryptography_has_fips() -> typing.List[str]:
return [
"FIPS_mode_set",
Expand Down Expand Up @@ -181,7 +172,6 @@ def cryptography_has_dtls_get_data_mtu() -> typing.List[str]:

def cryptography_has_300_fips() -> typing.List[str]:
return [
"EVP_default_properties_is_fips_enabled",
"EVP_default_properties_enable_fips",
]

Expand Down Expand Up @@ -262,7 +252,6 @@ def cryptography_has_evp_aead() -> typing.List[str]:
),
"Cryptography_HAS_ED448": cryptography_has_ed448,
"Cryptography_HAS_ED25519": cryptography_has_ed25519,
"Cryptography_HAS_POLY1305": cryptography_has_poly1305,
"Cryptography_HAS_FIPS": cryptography_has_fips,
"Cryptography_HAS_SIGALGS": cryptography_has_ssl_sigalgs,
"Cryptography_HAS_PSK": cryptography_has_psk,
Expand Down

0 comments on commit ffdada3

Please sign in to comment.