Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
bc58de74
Commit
bc58de74
authored
Jan 22, 2017
by
Till Brehm
Browse files
Fixed:
#4359
SSL Bundle certificates can not be saved
parent
72c52298
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/apache2_plugin.inc.php
View file @
bc58de74
...
...
@@ -415,14 +415,13 @@ class apache2_plugin {
//* Write new ssl files
if
(
trim
(
$data
[
"new"
][
"ssl_request"
])
!=
''
)
$app
->
system
->
file_put_contents
(
$csr_file
,
$data
[
"new"
][
"ssl_request"
]);
if
(
version_compare
(
$app
->
system
->
getapacheversion
(
true
),
'2.4.8'
,
'>='
))
{
// In apache 2.4.8 and newer, the ssl crt file contains the bundle, so we need no separate bundle file
$tmp_data
=
''
;
if
(
trim
(
$data
[
"new"
][
"ssl_cert"
])
!=
''
)
$tmp_data
.
=
$data
[
"new"
][
"ssl_cert"
]
.
"
\n
"
;
if
(
trim
(
$data
[
"new"
][
"ssl_bundle"
])
!=
''
)
{
$tmp_data
.
=
$data
[
"new"
][
"ssl_bundle"
];
$app
->
system
->
file_put_contents
(
$bundle_file
,
$data
[
"new"
][
"ssl_bundle"
]);
}
if
(
trim
(
$data
[
"new"
][
"ssl_bundle"
])
!=
''
)
$tmp_data
.
=
$data
[
"new"
][
"ssl_bundle"
];
if
(
trim
(
$tmp_data
)
!=
''
)
$app
->
system
->
file_put_contents
(
$crt_file
,
$tmp_data
);
}
else
{
// Write separate crt and bundle file
if
(
trim
(
$data
[
"new"
][
"ssl_cert"
])
!=
''
)
$app
->
system
->
file_put_contents
(
$crt_file
,
$data
[
"new"
][
"ssl_cert"
]);
if
(
trim
(
$data
[
"new"
][
"ssl_bundle"
])
!=
''
)
$app
->
system
->
file_put_contents
(
$bundle_file
,
$data
[
"new"
][
"ssl_bundle"
]);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment