wallet: rpc; dont allow startup with missing ssl params
What changed, and why it matters
This change makes the Monero wallet RPC server refuse to start if its SSL/TLS-related settings are incomplete or invalid. Previously, the server may have started anyway when only a wallet directory was supplied, potentially leaving the RPC interface in an unintended security state. The fix validates the configuration early by running a dummy wallet creation check before proceeding.
Apply the patch and ensure wallet RPC deployments are configured with complete, valid SSL/TLS parameters. Review any automated startup scripts that rely on the previous permissive behavior.
Security signals we found
Prevents service startup with invalid or missing SSL/TLS configuration
Adds early validation of RPC wallet configuration
Reduces risk of unintended plaintext or partially-secured RPC exposure
Evidence from the diff
In src/wallet/wallet_rpc_server.cpp, before entering the wallet_dir-only startup path, the code now calls tools::wallet2::make_dummy(vm, true, password_prompt) inside a try/catch. If this throws (e.g., due to missing or inconsistent SSL parameters), the server logs an error and returns false, preventing startup. This is a hardening/validation patch rather than a full rewrite of SSL handling.
Changed components
src/wallet/wallet_rpc_server.cppMonero wallet RPC server startup pathInspect captured patch +9 / −0
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 2dae20f..1ea9060 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -4988,6 +4988,15 @@ public:
if (!wallet_dir.empty())
{
+ try
+ {
+ tools::wallet2::make_dummy(vm, true, password_prompt);
+ }
+ catch (const std::exception &e)
+ {
+ LOG_ERROR(tools::wallet_rpc_server::tr("Invalid configuration: ") << e.what());
+ return false;
+ }
wal = NULL;
goto just_dir;
}
Why this scored 45/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.