Fix wc_ecc_import_unsigned cdef to match wolfSSL header
scripts/build_ffi.py declared qx, qy, and d as `byte*` while the wolfSSL header (ecc.h) declares all three as `const byte*`. wolfSSL is const-correct here and does not mutate the inputs, so there is no observable bug today, but the non-const cdef let CFFI hand a writable pointer into Python bytes storage on EccPublic.decode_key_raw and EccPrivate.decode_key_raw calls. Update the cdef to match the header. F-3087pull/118/head
parent
000472761c
commit
cd9cdeba5f
|
|
@ -1092,8 +1092,8 @@ def build_ffi(local_wolfssl, features):
|
|||
int wc_ecc_import_x963(const byte* in, word32 inLen, ecc_key* key);
|
||||
int wc_ecc_export_private_raw(ecc_key* key, byte* qx, word32* qxLen,
|
||||
byte* qy, word32* qyLen, byte* d, word32* dLen);
|
||||
int wc_ecc_import_unsigned(ecc_key* key, byte* qx, byte* qy,
|
||||
byte* d, int curve_id);
|
||||
int wc_ecc_import_unsigned(ecc_key* key, const byte* qx, const byte* qy,
|
||||
const byte* d, int curve_id);
|
||||
int wc_ecc_export_public_raw(ecc_key* key, byte* qx, word32* qxLen,
|
||||
byte* qy, word32* qyLen);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue