Skip to content

Commit 2cf0b70

Browse files
committed
Also fix error message for ML-DSA verify
1 parent 1684984 commit 2cf0b70

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

wolfcrypt/ciphers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,6 +2151,8 @@ def verify(self, signature, message, ctx=None):
21512151
res,
21522152
self.native_object,
21532153
)
2154+
if ret < 0: # pragma: no cover
2155+
raise WolfCryptError("wc_dilithium_verify_ctx_msg() error (%d)" % ret)
21542156
else:
21552157
ret = _lib.wc_dilithium_verify_msg(
21562158
_ffi.from_buffer(sig_bytestype),
@@ -2160,9 +2162,8 @@ def verify(self, signature, message, ctx=None):
21602162
res,
21612163
self.native_object,
21622164
)
2163-
2164-
if ret < 0: # pragma: no cover
2165-
raise WolfCryptError("wc_dilithium_verify_msg() error (%d)" % ret)
2165+
if ret < 0: # pragma: no cover
2166+
raise WolfCryptError("wc_dilithium_verify_msg() error (%d)" % ret)
21662167

21672168
return res[0] == 1
21682169

0 commit comments

Comments
 (0)