mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-6736-guardia-ticket-10925-omnishell-falla-con-certificados-autofirmados' into 'develop'
allowing self signed certs for quickshell See merge request artica/pandorafms!3625
This commit is contained in:
commit
64ec705f2c
@ -94,12 +94,23 @@ function quickShell()
|
|||||||
config_update_value('gotty_ssh_port', 8081);
|
config_update_value('gotty_ssh_port', 8081);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Context to allow self-signed certs.
|
||||||
|
$context = stream_context_create(
|
||||||
|
[
|
||||||
|
'http' => [ 'method' => 'GET'],
|
||||||
|
'ssl' => [
|
||||||
|
'verify_peer' => false,
|
||||||
|
'verify_peer_name' => false,
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
// Username. Retrieve from form.
|
// Username. Retrieve from form.
|
||||||
if (empty($username) === true) {
|
if (empty($username) === true) {
|
||||||
// No username provided, ask for it.
|
// No username provided, ask for it.
|
||||||
$wiz = new Wizard();
|
$wiz = new Wizard();
|
||||||
|
|
||||||
$test = file_get_contents($ws_url);
|
$test = file_get_contents($ws_url, false, $context);
|
||||||
if ($test === false) {
|
if ($test === false) {
|
||||||
ui_print_error_message(__('WebService engine has not been started, please check documentation.'));
|
ui_print_error_message(__('WebService engine has not been started, please check documentation.'));
|
||||||
$wiz->printForm(
|
$wiz->printForm(
|
||||||
@ -197,8 +208,9 @@ function quickShell()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If rediretion is enabled, we will try to connect to http:// or https:// endpoint.
|
// If rediretion is enabled, we will try to connect using
|
||||||
$test = get_headers($ws_url);
|
// http:// or https:// endpoint.
|
||||||
|
$test = get_headers($ws_url, null, $context);
|
||||||
if ($test === false) {
|
if ($test === false) {
|
||||||
if (empty($wiz) === true) {
|
if (empty($wiz) === true) {
|
||||||
$wiz = new Wizard();
|
$wiz = new Wizard();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user