1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-10 00:42:40 +01:00

Pass global CA bundle to HTTPSFuture, T3668

Summary: Update and clarify precedence of CA bundles

Test Plan:
tested with "arc call-conduit user.whoami" from project root
Same from other subdirectory in project
Repeated tests with both https.cabundle and https.cacert settings, both in
.arcconfig and ~/.arcrc

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3668

Differential Revision: https://secure.phabricator.com/D6647
This commit is contained in:
Eric Stern 2013-08-04 08:21:35 -07:00 committed by epriestley
parent a680c55670
commit 5e3b436099
2 changed files with 15 additions and 0 deletions

View file

@ -201,6 +201,13 @@ try {
} }
$workflow->setConduitURI($conduit_uri); $workflow->setConduitURI($conduit_uri);
// Apply global CA bundle from configs.
if ($ca_bundle = $working_copy->getConfigFromAnySource('https.cabundle')) {
$ca_bundle = Filesystem::resolvePath(
$ca_bundle, $working_copy->getProjectRoot());
HTTPSFuture::setGlobalCABundleFromPath($ca_bundle);
}
if ($need_conduit) { if ($need_conduit) {
if (!$conduit_uri) { if (!$conduit_uri) {

View file

@ -95,6 +95,14 @@ final class ArcanistSettings {
"'vim'. This setting overrides the EDITOR environmental variable.", "'vim'. This setting overrides the EDITOR environmental variable.",
'example' => '"nano"', 'example' => '"nano"',
), ),
'https.cabundle' => array(
'type' => 'string',
'help' =>
"Path to a custom CA bundle file to be used for arcanist's cURL ".
"calls. This is used primarily when your conduit endpoint is ".
"behind https signed by your organization's internal CA.",
'example' => 'support/yourca.pem'
),
'browser' => array( 'browser' => array(
'type' => 'string', 'type' => 'string',
'help' => 'help' =>