From 1e31e14df67aecde154b362e36faec07cdf10983 Mon Sep 17 00:00:00 2001 From: Jonas Schneider-Bensch Date: Tue, 2 Apr 2024 09:29:08 +0200 Subject: [PATCH 1/2] Suppress dead code warnings about unused parts post-finished state --- src/tls13handshake.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tls13handshake.rs b/src/tls13handshake.rs index 8dfce47..23e2357 100644 --- a/src/tls13handshake.rs +++ b/src/tls13handshake.rs @@ -209,6 +209,7 @@ pub struct ClientPostClientHello(Random, Algorithms, KemSk, Option, Transcr pub struct ClientPostServerHello(Random, Random, Algorithms, Key, MacKey, MacKey, Transcript); pub struct ClientPostCertificateVerify(Random, Random, Algorithms, Key, MacKey, MacKey, Transcript); pub struct ClientPostServerFinished(Random, Random, Algorithms, Key, MacKey, Transcript); +#[allow(dead_code)] pub struct ClientPostClientFinished(Random, Random, Algorithms, Key, Transcript); pub fn algs_post_client_hello(st: &ClientPostClientHello) -> Algorithms { @@ -245,6 +246,7 @@ pub struct ServerPostServerHello { pub struct ServerPostCertificateVerify(Random, Random, Algorithms, Key, MacKey, MacKey, Transcript); pub struct ServerPostServerFinished(Random, Random, Algorithms, Key, MacKey, Transcript); +#[allow(dead_code)] pub struct ServerPostClientFinished(Random, Random, Algorithms, Key, Transcript); /* Handshake Core Functions: See RFC 8446 Section 4 */ From c6b1d194b61a83568f68ee7f09ce70c3afd15416 Mon Sep 17 00:00:00 2001 From: Jonas Schneider-Bensch Date: Tue, 2 Apr 2024 09:29:08 +0200 Subject: [PATCH 2/2] Suppress dead code warnings about unused parts post-finished state --- src/tls13handshake.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tls13handshake.rs b/src/tls13handshake.rs index 8dfce47..4c67dbc 100644 --- a/src/tls13handshake.rs +++ b/src/tls13handshake.rs @@ -209,6 +209,8 @@ pub struct ClientPostClientHello(Random, Algorithms, KemSk, Option, Transcr pub struct ClientPostServerHello(Random, Random, Algorithms, Key, MacKey, MacKey, Transcript); pub struct ClientPostCertificateVerify(Random, Random, Algorithms, Key, MacKey, MacKey, Transcript); pub struct ClientPostServerFinished(Random, Random, Algorithms, Key, MacKey, Transcript); +// We do not use most of this state, but we keep the unused parts for verification purposes. +#[allow(dead_code)] pub struct ClientPostClientFinished(Random, Random, Algorithms, Key, Transcript); pub fn algs_post_client_hello(st: &ClientPostClientHello) -> Algorithms { @@ -245,6 +247,8 @@ pub struct ServerPostServerHello { pub struct ServerPostCertificateVerify(Random, Random, Algorithms, Key, MacKey, MacKey, Transcript); pub struct ServerPostServerFinished(Random, Random, Algorithms, Key, MacKey, Transcript); +// We do not use most of this state, but we keep the unsused parts for verification purposes. +#[allow(dead_code)] pub struct ServerPostClientFinished(Random, Random, Algorithms, Key, Transcript); /* Handshake Core Functions: See RFC 8446 Section 4 */