Skip to content

Commit b18f3d4

Browse files
bjorn3djc
authored andcommitted
Make *KeyExchange::advance consume self
This enforces that the key exchange can't be arbitrarily restarted in the middle.
1 parent 587562f commit b18f3d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/key_exchange.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub(crate) struct EcdhKeyExchange {
6565

6666
impl EcdhKeyExchange {
6767
pub(crate) async fn advance(
68-
&self,
68+
self,
6969
mut exchange: digest::Context,
7070
conn: &mut Connection,
7171
) -> Result<(), ()> {
@@ -275,7 +275,7 @@ impl KeyExchange {
275275
}
276276

277277
pub(crate) async fn advance(
278-
&self,
278+
self,
279279
exchange: &mut digest::Context,
280280
conn: &mut Connection,
281281
) -> Result<EcdhKeyExchange, ()> {

0 commit comments

Comments
 (0)