Require manual override for user chain certificates.

An override for the wallet to daemon connection is provided, but not for
other SSL contexts. The intent is to prevent users from supplying a
system CA as the "user" whitelisted certificate, which is less secure
since the key is controlled by a third party.
This commit is contained in:
Lee Clagett 2019-04-04 13:35:33 -04:00
parent 97cd1fa98d
commit d58f368289
3 changed files with 10 additions and 1 deletions

View file

@ -221,6 +221,9 @@ boost::asio::ssl::context ssl_options_t::create_context() const
ssl_context.set_default_verify_paths();
break;
case ssl_verification_t::user_certificates:
ssl_context.set_verify_depth(0);
/* fallthrough */
case ssl_verification_t::user_ca:
if (!ca_path.empty())
{
const boost::system::error_code err = load_ca_file(ssl_context, ca_path);