diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index eec31ec2ef9b158e740503f975eb9d542b0b6cce..f87a042b38600f4d1bfecd2b90119499e8cff4ac 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -270,6 +270,7 @@ class OC_Mount_Config {
 			fclose($fh);
 			if (strpos($data, 'BEGIN CERTIFICATE')) {
 				fwrite($fh_certs, $data);
+				fwrite($fh_certs, "\r\n");
 			}
 		}