Skip to content

Commit

Permalink
CLI - fix unchecked null pointer in diag proxy session tls-info
Browse files Browse the repository at this point in the history
  • Loading branch information
astibal committed Oct 22, 2024
1 parent 27513a9 commit 2b52659
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/service/cmd/diag/diag_cmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,12 @@ auto get_tls_info(MitmHostCX const* lf, MitmHostCX const* rg, int sl_flags, int

if (com && not com->opt.bypass) {
auto ssl = com->get_SSL();
auto const *session = SSL_get_session(ssl);

SSL_SESSION *session = nullptr;
if(ssl) {
session = SSL_get_session(ssl);
}

if (ssl and session) {

auto *cipher_str = SSL_CIPHER_get_name(SSL_SESSION_get0_cipher(session));
Expand Down

0 comments on commit 2b52659

Please sign in to comment.