Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/build_ffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ def build_ffi(local_wolfssl, features):

int mp_init (mp_int * a);
int mp_to_unsigned_bin (mp_int * a, unsigned char *b);
int mp_to_unsigned_bin_len (mp_int * a, unsigned char *b, int c);
int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c);
"""

Expand Down
4 changes: 2 additions & 2 deletions wolfcrypt/ciphers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1390,11 +1390,11 @@ def sign_raw(self, plaintext, rng=Random()):
if ret != 0: # pragma: no cover
raise WolfCryptError("Signature error (%d)" % ret)

ret = _lib.mp_to_unsigned_bin(R, R_bin)
ret = _lib.mp_to_unsigned_bin_len(R, R_bin, self.size)
if ret != 0: # pragma: no cover
raise WolfCryptError("wolfCrypt error (%d)" % ret)

ret = _lib.mp_to_unsigned_bin(S, S_bin)
ret = _lib.mp_to_unsigned_bin_len(S, S_bin, self.size)
if ret != 0: # pragma: no cover
raise WolfCryptError("wolfCrypt error (%d)" % ret)

Expand Down