From fa622f0922ee0cd1ba26a70587e0bf0f56a08897 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 19 Feb 2024 17:02:33 -0800 Subject: [PATCH] remove a useless function --- src/cryptography/hazmat/backends/openssl/backend.py | 2 +- src/cryptography/hazmat/bindings/openssl/binding.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index 56d8206612e6..406b1ea990a2 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -99,7 +99,7 @@ def openssl_assert(self, ok: bool) -> None: def _enable_fips(self) -> None: # This function enables FIPS mode for OpenSSL 3.0.0 on installs that # have the FIPS provider installed properly. - self._binding._enable_fips() + rust_openssl.enable_fips(rust_openssl._providers) assert rust_openssl.is_fips_enabled() self._fips_enabled = rust_openssl.is_fips_enabled() diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py index 65eb5829134a..f5d8cb0b7d9f 100644 --- a/src/cryptography/hazmat/bindings/openssl/binding.py +++ b/src/cryptography/hazmat/bindings/openssl/binding.py @@ -64,9 +64,6 @@ class Binding: def __init__(self) -> None: self._ensure_ffi_initialized() - def _enable_fips(self) -> None: - openssl.enable_fips(openssl._providers) - @classmethod def _ensure_ffi_initialized(cls) -> None: with cls._init_lock: