Skip to content
Snippets Groups Projects
Commit b9bcc819 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #4758 from nextcloud/fix_3470

Do not write and read rootcerts.crt at the same time
parents 04a5c34c 5a61a794
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,8 @@ class CertificateManager implements ICertificateManager {
return;
}
$fhCerts = $this->view->fopen($path . '/rootcerts.crt', 'w');
$certPath = $path . 'rootcerts.crt';
$fhCerts = $this->view->fopen($certPath, 'w');
// Write user certificates
foreach ($certs as $cert) {
......@@ -136,7 +137,7 @@ class CertificateManager implements ICertificateManager {
// Append the system certificate bundle
$systemBundle = $this->getCertificateBundle(null);
if ($this->view->file_exists($systemBundle)) {
if ($systemBundle !== $certPath && $this->view->file_exists($systemBundle)) {
$systemCertificates = $this->view->file_get_contents($systemBundle);
fwrite($fhCerts, $systemCertificates);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment