Skip to content
Snippets Groups Projects
Commit f9fe17df authored by Adrien Béraud's avatar Adrien Béraud Committed by Guillaume Roguez
Browse files

tls: handle unknown cipher

Prevents nullptr from pj_ssl_cipher_name()

Refs #67228

Change-Id: I01e5f10563ea86be0b95b88eadedad4284aa8bfa
parent 7365d895
Branches
Tags
No related merge requests found
......@@ -920,8 +920,11 @@ SIPCall::getDetails() const
auto details = Call::getDetails();
if (transport_ and transport_->isSecure()) {
const auto& tlsInfos = transport_->getTlsInfos();
auto cipher = pj_ssl_cipher_name(tlsInfos.cipher);
if (tlsInfos.cipher and not cipher)
RING_WARN("Unknown cipher: %d", tlsInfos.cipher);
details.emplace(DRing::Call::Details::TLS_CIPHER, cipher ? cipher : "");
details.emplace(DRing::Call::Details::TLS_PEER_CERT, tlsInfos.peerCert.toString());
details.emplace(DRing::Call::Details::TLS_CIPHER, pj_ssl_cipher_name(tlsInfos.cipher));
}
return details;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment