Skip to content

Commit

Permalink
We always have Poly1305, I think (#10419)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Feb 19, 2024
1 parent a20d495 commit 090bdf0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
6 changes: 0 additions & 6 deletions src/_cffi_src/openssl/nid.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

TYPES = """
static const int Cryptography_HAS_ED448;
static const int Cryptography_HAS_POLY1305;
static const int NID_undef;
static const int NID_aes_256_cbc;
Expand All @@ -31,9 +30,4 @@
#else
static const long Cryptography_HAS_ED448 = 1;
#endif
#ifndef NID_poly1305
static const long Cryptography_HAS_POLY1305 = 0;
#else
static const long Cryptography_HAS_POLY1305 = 1;
#endif
"""
8 changes: 1 addition & 7 deletions src/cryptography/hazmat/backends/openssl/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,13 +649,7 @@ def serialize_key_and_certificates_to_pkcs12(
def poly1305_supported(self) -> bool:
if self._fips_enabled:
return False
elif (
rust_openssl.CRYPTOGRAPHY_IS_BORINGSSL
or rust_openssl.CRYPTOGRAPHY_IS_LIBRESSL
):
return True
else:
return self._lib.Cryptography_HAS_POLY1305 == 1
return True

def pkcs7_supported(self) -> bool:
return not rust_openssl.CRYPTOGRAPHY_IS_BORINGSSL
Expand Down

0 comments on commit 090bdf0

Please sign in to comment.