From df6fa02e6128123cceb7714a586ec2d8f3366f17 Mon Sep 17 00:00:00 2001 From: Robert de Vries Date: Wed, 8 Apr 2026 16:15:46 +0200 Subject: [PATCH] Add missing import of WolfCryptError. --- wolfcrypt/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/__init__.py b/wolfcrypt/__init__.py index 6879589..d7e8721 100644 --- a/wolfcrypt/__init__.py +++ b/wolfcrypt/__init__.py @@ -46,6 +46,7 @@ if top_level_py not in ["setup.py", "build_ffi.py"]: from wolfcrypt._ffi import ffi as _ffi from wolfcrypt._ffi import lib as _lib + from wolfcrypt.exceptions import WolfCryptError if hasattr(_lib, 'WC_RNG_SEED_CB_ENABLED'): if _lib.WC_RNG_SEED_CB_ENABLED: @@ -53,8 +54,7 @@ if ret < 0: raise WolfCryptError("wc_SetSeed_Cb failed (%d)" % ret) if _lib.FIPS_ENABLED and _lib.FIPS_VERSION >= 5: - ret = _lib.wolfCrypt_SetPrivateKeyReadEnable_fips(1, - _lib.WC_KEYTYPE_ALL); + ret = _lib.wolfCrypt_SetPrivateKeyReadEnable_fips(1, _lib.WC_KEYTYPE_ALL) if ret < 0: raise WolfCryptError("wolfCrypt_SetPrivateKeyReadEnable_fips failed" " (%d)" % ret)