Skip to content

Commit

Permalink
adding code that disappeared during sequential rebasing and squashing
Browse files Browse the repository at this point in the history
  • Loading branch information
dr7ana committed Feb 14, 2023
1 parent 802ad46 commit c9c37c8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions llarp/rpc/rpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ namespace llarp::rpc
LogInfo("Bound RPC server to ", addr.full_address());
}

for (const auto& [address, allowed_keys] : r->GetConfig()->api.m_rpcEncryptedAddresses)
{
m_LMQ->listen_curve(address.zmq_address(), [allowed_keys = allowed_keys](auto pk, ...) {
if (std::find(allowed_keys.begin(), allowed_keys.end(), pk) != allowed_keys.end())
return oxenmq::AuthLevel::admin;

LogInfo("Curve pubkey not found in whitelist");
return oxenmq::AuthLevel::denied;
});
}

AddCategories();
}

Expand Down

0 comments on commit c9c37c8

Please sign in to comment.