protected $userName;
protected $password;
protected $proxy;
+ protected $capath;
/**
* Constructor
'proxy'
);
+ $this->capath = '';
+ if (isset($settings['capath'])) {
+ $this->capath = $settings['capath'];
+ }
+
foreach($validSettings as $validSetting) {
if (isset($settings[$validSetting])) {
$this->$validSetting = $settings[$validSetting];
// Automatically follow redirects
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_MAXREDIRS => 5,
+ CURLOPT_SSL_VERIFYPEER => true,
//CURLOPT_SSL_VERIFYPEER => false,
);
+ if ($this->capath != '') $curlSettings[CURLOPT_CAPATH] = $this->capath;
+
switch ($method) {
case 'PUT':
$curlSettings[CURLOPT_PUT] = true;
$this->root.='/';
}
+ $caview = \OCP\Files::getStorage('files_external');\r
+ $capath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("");
$settings = array(
'baseUri' => $this->createBaseUri(),
'userName' => $this->user,
'password' => $this->password,
+ 'capath' => $capath,
);
$this->client = new Sabre_DAV_Client($settings);