From 4f5d52ada47a15532766b2ff3d3781be629648d8 Mon Sep 17 00:00:00 2001 From: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:57:26 +0200 Subject: [PATCH] Do not allow rejected client certificate (#893) --- src/Simplex/RemoteControl/Client.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Simplex/RemoteControl/Client.hs b/src/Simplex/RemoteControl/Client.hs index e6ab65516..d4ba60e88 100644 --- a/src/Simplex/RemoteControl/Client.hs +++ b/src/Simplex/RemoteControl/Client.hs @@ -138,8 +138,7 @@ connectRCHost drg pairing@RCHostPairing {caKey, caCert, idPrivKey, knownHost} ct tlsHooks :: TMVar a -> Maybe KnownHostPairing -> TMVar C.KeyHash -> TLS.ServerHooks tlsHooks r knownHost_ hostCAHash = def - { TLS.onUnverifiedClientCert = pure True, - TLS.onNewHandshake = \_ -> atomically $ isNothing <$> tryReadTMVar r, + { TLS.onNewHandshake = \_ -> atomically $ isNothing <$> tryReadTMVar r, TLS.onClientCertificate = \(X509.CertificateChain chain) -> case chain of [_leaf, ca] -> do