fix: preserve authentication transcript order

Defer RSA, ECDH, and handshake completion until after each received packet
has been added to the authentication transcript, matching the upstream
workqueue ordering and preventing the controller from rejecting host secret.

Co-Authored-By: openai/gpt-5.6-luna: fixed GIP authentication ordering
This commit is contained in:
portersky
2026-08-29 13:54:23 +02:00
parent 0ed7a4bc3e
commit 1bcb038785
3 changed files with 34 additions and 4 deletions
+9
View File
@@ -69,6 +69,7 @@ private:
auto complete_handshake() -> void;
auto handle_pkt_acknowledge() -> int;
auto handle_pkt_data(std::span<u8 const> data) -> int;
auto run_deferred_action() -> void;
auto dispatch_pkt(u8 cmd, std::span<u8 const> data) -> int;
auto handle_hello(std::span<u8 const> data) -> int;
auto handle_certificate(std::span<u8 const> data) -> int;
@@ -87,6 +88,14 @@ private:
std::array<u8, k_pubkey_len> pubkey_client_{};
std::array<u8, k_pubkey2_len> pubkey_client2_{};
std::array<u8, k_secret_len> master_secret_{};
enum class deferred_action {
none,
exchange_rsa,
exchange_ecdh,
complete,
};
deferred_action deferred_action_ = deferred_action::none;
};
} // namespace xone::auth