diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-03-16 11:28:23 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-03-25 16:04:41 +0100 |
commit | 5f044ebf1bc6f45acec2e79dc05185acd0405f42 (patch) | |
tree | 8bc8797ef55588d3aab1b160acb3e2f5576d460f /lib/private/security | |
parent | 13904a7f8979a87492ac765e05017eb1e4b69588 (diff) | |
download | nextcloud-server-5f044ebf1bc6f45acec2e79dc05185acd0405f42.tar.gz nextcloud-server-5f044ebf1bc6f45acec2e79dc05185acd0405f42.zip |
Add wrapper for Guzzle
Diffstat (limited to 'lib/private/security')
-rw-r--r-- | lib/private/security/certificatemanager.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/security/certificatemanager.php b/lib/private/security/certificatemanager.php index 7bc83766365..d3a6dcd71eb 100644 --- a/lib/private/security/certificatemanager.php +++ b/lib/private/security/certificatemanager.php @@ -63,11 +63,13 @@ class CertificateManager implements ICertificateManager { /** * create the certificate bundle of all trusted certificated */ - protected function createCertificateBundle() { + public function createCertificateBundle() { $path = $this->getPathToCertificates(); $certs = $this->listCertificates(); $fh_certs = $this->view->fopen($path . '/rootcerts.crt', 'w'); + + // Write user certificates foreach ($certs as $cert) { $file = $path . '/uploads/' . $cert->getName(); $data = $this->view->file_get_contents($file); @@ -77,6 +79,9 @@ class CertificateManager implements ICertificateManager { } } + // Append the default certificates + $defaultCertificates = file_get_contents(\OC::$SERVERROOT . '/config/ca-bundle.crt'); + fwrite($fh_certs, $defaultCertificates); fclose($fh_certs); } @@ -137,6 +142,9 @@ class CertificateManager implements ICertificateManager { return $this->getPathToCertificates() . 'rootcerts.crt'; } + /** + * @return string + */ private function getPathToCertificates() { $path = is_null($this->uid) ? '/files_external/' : '/' . $this->uid . '/files_external/'; |