From 3787a8d3db42eb1004325686328de6e2c1d97157 Mon Sep 17 00:00:00 2001 From: Eric Stern Date: Tue, 4 Mar 2014 11:54:47 -0800 Subject: [PATCH] allow https.cabundle in IRC bot Summary: Adds support for custom SSL certs in the IRC bot config, same as in .arcconfig Test Plan: Bot wouldn't connect before. Added this code and corresponding line in bot config, now it does. Reviewers: #blessed_reviewers, epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8393 --- src/infrastructure/daemon/bot/PhabricatorBot.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/infrastructure/daemon/bot/PhabricatorBot.php b/src/infrastructure/daemon/bot/PhabricatorBot.php index d4bac41ff5..fb30fa7b7c 100644 --- a/src/infrastructure/daemon/bot/PhabricatorBot.php +++ b/src/infrastructure/daemon/bot/PhabricatorBot.php @@ -45,6 +45,11 @@ final class PhabricatorBot extends PhabricatorDaemon { $this->handlers[] = $obj; } + $ca_bundle = idx($config, 'https.cabundle'); + if ($ca_bundle) { + HTTPSFuture::setGlobalCABundleFromPath($ca_bundle); + } + $conduit_uri = idx($config, 'conduit.uri'); if ($conduit_uri) { $conduit_user = idx($config, 'conduit.user');