From 4f3eb2f7bb3d60f09ea24febe389d2887c76c531 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 7 Oct 2017 10:47:42 +0200 Subject: [PATCH] fixed import of yet untrusted certificates --- lam/lib/account.inc | 2 +- lam/tmp/.gitignore | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 83474914..68e11c72 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -1269,7 +1269,7 @@ function getRandomNumber() { * @return mixed false on error and certificate if extracted successfully */ function getLDAPSSLCertificate($server, $port) { - $stream = @stream_context_create(array("ssl" => array("capture_peer_cert_chain" => true))); + $stream = @stream_context_create(array("ssl" => array("capture_peer_cert_chain" => true, "verify_peer" => false, "allow_self_signed" => true))); if (!$stream) { return false; } diff --git a/lam/tmp/.gitignore b/lam/tmp/.gitignore index 66b83c12..468f7ed5 100644 --- a/lam/tmp/.gitignore +++ b/lam/tmp/.gitignore @@ -1 +1,2 @@ /*.jpg +/*.pem