Skip to content

Commit

Permalink
write_all can't be used for a zero-length buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
lrstewart committed Sep 28, 2024
1 parent 65b6209 commit 24b8d88
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bindings/rust/s2n-tls/src/renegotiate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,12 @@ mod tests {

// SSL_renegotiate doesn't actually send the message.
// Like s2n-tls, a call to send / write is required.
self.server
.write_all(&[0; 0])
.expect("Failed to write hello request");
assert_eq!(
self.server
.write(&[0; 0])
.expect("Failed to write hello request"),
0
);

Ok(())
}
Expand Down

0 comments on commit 24b8d88

Please sign in to comment.