Skip to content

Commit e2d09f3

Browse files
Rust wrapper: use consistent rc check in ECC::shared_secret
Fixes F-2676
1 parent 30cdcca commit e2d09f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • wrapper/rust/wolfssl-wolfcrypt/src

wrapper/rust/wolfssl-wolfcrypt/src/ecc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,7 @@ impl ECC {
18231823
sys::wc_ecc_shared_secret(&mut self.wc_ecc_key,
18241824
&mut peer_key.wc_ecc_key, dout.as_mut_ptr(), &mut out_len)
18251825
};
1826-
if rc < 0 {
1826+
if rc != 0 {
18271827
return Err(rc);
18281828
}
18291829
Ok(out_len as usize)

0 commit comments

Comments
 (0)