Commit cd47920e authored by Francois Marier's avatar Francois Marier
Browse files

MNet: Remove unnecessary SSL certificate checks (bug #888436)



These CA checks prevent the use of self-signed certificates with
MNet despite the fact that we wrap everything inside public key
crypto.

This change makes the Mahara implementation match the way that this
is done in Moodle.

Change-Id: Ia190cd4d40da5e7a5acf3c0fe2104f80c6df9f78
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 204ca1c4
......@@ -65,6 +65,8 @@ class Client {
CURLOPT_USERAGENT => 'Mahara',
CURLOPT_POSTFIELDS => $this->encryptedrequest,
CURLOPT_HTTPHEADER => array("Content-Type: text/xml charset=UTF-8", 'Expect: '),
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => 0,
);
$result = mahara_http_request($config);
......
......@@ -752,6 +752,8 @@ function get_public_key($uri, $application=null) {
CURLOPT_USERAGENT => 'Moodle',
CURLOPT_POSTFIELDS => $rq,
CURLOPT_HTTPHEADER => array("Content-Type: text/xml charset=UTF-8", 'Expect: '),
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => 0,
);
$result = mahara_http_request($config);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment