Skip to content

Commit

Permalink
Rename initiate_key_update -> force_key_update
Browse files Browse the repository at this point in the history
  • Loading branch information
gretchenfrage authored and djc committed Dec 21, 2024
1 parent 5992acf commit e7b5c6c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion quinn-proto/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ impl Connection {
/// Update traffic keys spontaneously
///
/// This can be useful for testing key updates, as they otherwise only happen infrequently.
pub fn initiate_key_update(&mut self) {
pub fn force_key_update(&mut self) {
self.update_keys(None, false);
}

Expand Down
2 changes: 1 addition & 1 deletion quinn-proto/src/connection/packet_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl PacketBuilder {
let sent_with_keys = conn.spaces[space_id].sent_with_keys;
if space_id == SpaceId::Data {
if sent_with_keys >= conn.key_phase_size {
conn.initiate_key_update();
conn.force_key_update();
}
} else {
let confidentiality_limit = conn.spaces[space_id]
Expand Down
4 changes: 2 additions & 2 deletions quinn-proto/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ fn key_update_simple() {
let _ = chunks.finalize();

info!("initiating key update");
pair.client_conn_mut(client_ch).initiate_key_update();
pair.client_conn_mut(client_ch).force_key_update();

const MSG2: &[u8] = b"hello2";
pair.client_send(client_ch, s).write(MSG2).unwrap();
Expand Down Expand Up @@ -1052,7 +1052,7 @@ fn key_update_reordered() {
assert!(!pair.client.outbound.is_empty());
pair.client.delay_outbound();

pair.client_conn_mut(client_ch).initiate_key_update();
pair.client_conn_mut(client_ch).force_key_update();
info!("updated keys");

const MSG2: &[u8] = b"two";
Expand Down
2 changes: 1 addition & 1 deletion quinn/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ impl Connection {
.state
.lock("force_key_update")
.inner
.initiate_key_update()
.force_key_update()
}

/// Derive keying material from this connection's TLS session secrets.
Expand Down

0 comments on commit e7b5c6c

Please sign in to comment.