Skip to content

Commit

Permalink
Merge pull request #173 from jakubkarolczyk/fix_crash_invalid_cert_paths
Browse files Browse the repository at this point in the history
Fix crash when certificate file is not accessible
  • Loading branch information
andywolk authored Sep 21, 2022
2 parents f6ee306 + c2e60cf commit 4b84300
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libsofia-sip-ua/tport/tport_type_ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,11 @@ static int tport_ws_init_primary_secure(tport_primary_t *pri,
if (access(chain, R_OK) != 0) chain = NULL;
}

if (!(key && cert && chain)) {
tls_log_errors(3, "tport_ws_init_primary_secure", 0);
goto done;
}

init_ssl();

// OpenSSL_add_all_algorithms(); /* load & register cryptos */
Expand Down

0 comments on commit 4b84300

Please sign in to comment.