@icewind1991 @DeepDiver1975 I'm very confused now, so is the method createCertificateBundle from class OC_Mount_Config wrong too?


```
        /**
         * creates certificate bundle
         */
        public static function createCertificateBundle() {
                $view = \OCP\Files::getStorage("files_external");
                $path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("");

                $certs = OC_Mount_Config::getCertificates();
                $fh_certs = fopen($path."/rootcerts.crt", 'w');
                foreach ($certs as $cert) {
                        $file=$path.'/uploads/'.$cert;
                        $fh = fopen($file, "r");
                        $data = fread($fh, filesize($file));
                        fclose($fh);
                        if (strpos($data, 'BEGIN CERTIFICATE')) {
                                fwrite($fh_certs, $data);
                                fwrite($fh_certs, "\r\n");
                        }
                }

                fclose($fh_certs);

                return true;
        }

```