File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -415,14 +415,13 @@ function ssl($event_name, $data) {
415415 //* Write new ssl files
416416 if (trim ($ data ["new " ]["ssl_request " ]) != '' ) $ app ->system ->file_put_contents ($ csr_file , $ data ["new " ]["ssl_request " ]);
417417 if (version_compare ($ app ->system ->getapacheversion (true ), '2.4.8 ' , '>= ' )) {
418+ // In apache 2.4.8 and newer, the ssl crt file contains the bundle, so we need no separate bundle file
418419 $ tmp_data = '' ;
419420 if (trim ($ data ["new " ]["ssl_cert " ]) != '' ) $ tmp_data .= $ data ["new " ]["ssl_cert " ] . "\n" ;
420- if (trim ($ data ["new " ]["ssl_bundle " ]) != '' ) {
421- $ tmp_data .= $ data ["new " ]["ssl_bundle " ];
422- $ app ->system ->file_put_contents ($ bundle_file , $ data ["new " ]["ssl_bundle " ]);
423- }
421+ if (trim ($ data ["new " ]["ssl_bundle " ]) != '' ) $ tmp_data .= $ data ["new " ]["ssl_bundle " ];
424422 if (trim ($ tmp_data ) != '' ) $ app ->system ->file_put_contents ($ crt_file , $ tmp_data );
425423 } else {
424+ // Write separate crt and bundle file
426425 if (trim ($ data ["new " ]["ssl_cert " ]) != '' ) $ app ->system ->file_put_contents ($ crt_file , $ data ["new " ]["ssl_cert " ]);
427426 if (trim ($ data ["new " ]["ssl_bundle " ]) != '' ) $ app ->system ->file_put_contents ($ bundle_file , $ data ["new " ]["ssl_bundle " ]);
428427 }
You can’t perform that action at this time.
0 commit comments