Skip to content

Commit

Permalink
c/opendht: check for server_ca null
Browse files Browse the repository at this point in the history
  • Loading branch information
sim590 authored and aberaud committed Jan 25, 2025
1 parent b8d6fdc commit 5c18c98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion c/opendht.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ int dht_runner_run_config(dht_runner* r, in_port_t port, const dht_runner_config
config.proxy_user_agent = conf->proxy_user_agent ? std::string(conf->proxy_user_agent) : std::string{};
config.peer_discovery = conf->peer_discovery;
config.peer_publish = conf->peer_publish;
config.server_ca = *reinterpret_cast<const CertSp*>(conf->server_ca);
if (conf->server_ca)
config.server_ca = *reinterpret_cast<const CertSp*>(conf->server_ca);
config.client_identity = dht_identity_from_c(&conf->client_identity);

dht::DhtRunner::Context context;
Expand Down

0 comments on commit 5c18c98

Please sign in to comment.