From e7cabffe491d8d0e6da84d05cf52ddc96d3d57ab Mon Sep 17 00:00:00 2001 From: lersveen <7195448+lersveen@users.noreply.github.com> Date: Thu, 16 Apr 2026 15:35:15 +0200 Subject: [PATCH] fix: call cert functions directly on existing tlsConn --- lib/remote/jsonrpcconnection-pki.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/remote/jsonrpcconnection-pki.cpp b/lib/remote/jsonrpcconnection-pki.cpp index 197f05083..4d1643d12 100644 --- a/lib/remote/jsonrpcconnection-pki.cpp +++ b/lib/remote/jsonrpcconnection-pki.cpp @@ -38,9 +38,8 @@ Value RequestCertificateHandler(const MessageOrigin::Ptr& origin, const Dictiona /* Use the presented client certificate if not provided. */ if (certText.IsEmpty()) { - auto stream (origin->FromClient->GetStream()); - cert = stream->next_layer().GetPeerCertificate(); - chain = stream->next_layer().GetPeerCertificateChain(); + cert = tlsConn.GetPeerCertificate(); + chain = tlsConn.GetPeerCertificateChain(); } else { cert = StringToCertificate(certText); chain = nullptr;