From 7e34c61b2a8913c70b41f108cb17426af9c83d6d Mon Sep 17 00:00:00 2001 From: neckfire Date: Thu, 16 Jul 2026 23:33:33 +0200 Subject: [PATCH] =?UTF-8?q?test(dtls):=20EncryptionAck=20sans=20activer=20?= =?UTF-8?q?DTLS=20=E2=80=94=20le=20client=20continue=20le=20login=20EN=20C?= =?UTF-8?q?LAIR=20apr=C3=A8s=20l'ack=20(observ=C3=A9=20live)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Prospect.Unreal/Runtime/UWorld.cs | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/Prospect.Unreal/Runtime/UWorld.cs b/src/Prospect.Unreal/Runtime/UWorld.cs index fed91c0..381a0cd 100644 --- a/src/Prospect.Unreal/Runtime/UWorld.cs +++ b/src/Prospect.Unreal/Runtime/UWorld.cs @@ -314,22 +314,16 @@ public abstract partial class UWorld : FNetworkNotify, IAsyncDisposable // Chiffrement DTLS-PSK requis par le client. Si on connaît la // PSK de cette identité (user_id), on répond NMT_EncryptionAck et // on établit le DTLS côté serveur (BouncyCastle). Cf. DTLSHandlerComponent. - var psks = DtlsPsks.Value; - if (psks.Get(encryptionToken) != null && connection.DtlsComponent != null) - { - Logger.Information("DTLS-PSK: identité {Token} connue -> EncryptionAck + handshake", encryptionToken); - NMT_EncryptionAck.Send(connection); - connection.FlushNet(); - connection.DtlsComponent.BeginHandshake( - psks, encryptionToken, - rec => connection.LowLevelSend(rec, rec.Length * 8, new FOutPacketTraits())); - connection.SendChallengeControlMessage(); - } - else - { - Logger.Warning("DTLS-PSK requis mais aucune PSK pour {Token} (renseigner PROSPECT_DTLS_PSKS) — le client fermera la connexion", encryptionToken); - connection.SendChallengeControlMessage(); - } + // OBSERVÉ EN LIVE : après NMT_EncryptionAck, le client envoie son + // NMT_Login EN CLAIR (paquet UE de 18o, jamais de ClientHello DTLS + // 16fefd). Hypothèse : l'EncryptionAck suffit à satisfaire son check + // « chiffrement acquitté » et le canal de contrôle reste en clair. + // => on ACQUITTE mais on N'ACTIVE PAS DTLS (sinon on mange le Login), + // et on laisse le flux login se poursuivre normalement. + Logger.Information("DTLS-PSK: identité {Token} — EncryptionAck (canal de contrôle laissé en clair, test)", encryptionToken); + NMT_EncryptionAck.Send(connection); + connection.FlushNet(); + connection.SendChallengeControlMessage(); } } break;