Rust wrapper: use consistent rc check in ECC::shared_secret

Fixes F-2676
This commit is contained in:
Josh Holtrop
2026-04-24 10:46:46 -04:00
parent cf199c9ab8
commit ca3c779182
+1 -1
View File
@@ -1823,7 +1823,7 @@ impl ECC {
sys::wc_ecc_shared_secret(&mut self.wc_ecc_key,
&mut peer_key.wc_ecc_key, dout.as_mut_ptr(), &mut out_len)
};
if rc < 0 {
if rc != 0 {
return Err(rc);
}
Ok(out_len as usize)