From 25376579b7910644f725778989e5750e7f1f2c86 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 19 Jan 2017 17:54:00 +0100 Subject: [PATCH] Disable SSL cert check in ISPConfig mail user import tool to allow connections to ISPConfig servers with self-signed SSL certificates. --- interface/web/tools/import_ispconfig.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/interface/web/tools/import_ispconfig.php b/interface/web/tools/import_ispconfig.php index efcf022506..c43b15b7eb 100644 --- a/interface/web/tools/import_ispconfig.php +++ b/interface/web/tools/import_ispconfig.php @@ -63,10 +63,23 @@ if(isset($_POST['connected'])) { if($error == '') { try { + + //* Allow connections to self signed SSL certs + $context = stream_context_create( + array( + 'ssl' => array ( + 'verify_peer' => false, + 'verify_peer_name' => false, + 'allow_self_signed' => true + ) + ) + ); + $client = new SoapClient(null, array('location' => $_POST['remote_server'], 'uri' => $_POST['remote_server'].'/index.php', 'trace' => 1, - 'exceptions' => 1)); + 'exceptions' => 1, + 'stream_context' => $context)); if($remote_session_id = $client->login($_POST['remote_user'], $_POST['remote_password'])) { $connected = 1; -- GitLab