fix: call cert functions directly on existing tlsConn

This commit is contained in:
lersveen 2026-04-16 15:35:15 +02:00
parent b0df597e36
commit e7cabffe49
No known key found for this signature in database
GPG key ID: 0B980AC28046C444

View file

@ -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;