Skip to content

Commit ab15863

Browse files
authored
Merge pull request #96 from roberthdevries/add-missing-import
Add missing import of WolfCryptError.
2 parents 5b13e52 + df6fa02 commit ab15863

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wolfcrypt/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@
4646
if top_level_py not in ["setup.py", "build_ffi.py"]:
4747
from wolfcrypt._ffi import ffi as _ffi
4848
from wolfcrypt._ffi import lib as _lib
49+
from wolfcrypt.exceptions import WolfCryptError
4950

5051
if hasattr(_lib, 'WC_RNG_SEED_CB_ENABLED'):
5152
if _lib.WC_RNG_SEED_CB_ENABLED:
5253
ret = _lib.wc_SetSeed_Cb(_ffi.addressof(_lib, "wc_GenerateSeed"))
5354
if ret < 0:
5455
raise WolfCryptError("wc_SetSeed_Cb failed (%d)" % ret)
5556
if _lib.FIPS_ENABLED and _lib.FIPS_VERSION >= 5:
56-
ret = _lib.wolfCrypt_SetPrivateKeyReadEnable_fips(1,
57-
_lib.WC_KEYTYPE_ALL);
57+
ret = _lib.wolfCrypt_SetPrivateKeyReadEnable_fips(1, _lib.WC_KEYTYPE_ALL)
5858
if ret < 0:
5959
raise WolfCryptError("wolfCrypt_SetPrivateKeyReadEnable_fips failed"
6060
" (%d)" % ret)

0 commit comments

Comments
 (0)