[SUCS Devel] [Git][sucssite/sucs-site][beta] 3 commits: Disable cert checking when talking to the SU-API
Imran Hussain
imranh at sucs.org
Thu Sep 24 19:12:28 BST 2015
Imran Hussain pushed to branch beta at sucssite / sucs-site
Commits:
9c458ae5 by Imran Hussain at 2015-09-24T16:46:43Z
Disable cert checking when talking to the SU-API
Disable verifying of the cert wehn talking to the SU-API VM. We don't need it,
as long as the data is sent down a secure connection that's all we really care
about. Also this makes tings easier to admin as we don't need to worry about
renewing certs during freshers.
- - - - -
0758bd46 by Callum Massey at 2015-09-24T17:23:10Z
Merge branch 'master' into 'master'
Disable cert checking when talking to the SU-API
Disable verifying of the cert wehn talking to the SU-API VM. We don't need it,
as long as the data is sent down a secure connection that's all we really care
about. Also this makes tings easier to admin as we don't need to worry about
renewing certs during freshers.
See merge request !13
- - - - -
d13fa5d2 by Imran Hussain at 2015-09-24T19:12:24Z
Merge branch 'master' into 'beta'
Push "Disable cert checking when talking to the SU-API" onto beta
Push "Disable cert checking when talking to the SU-API onto" beta
See merge request !14
- - - - -
2 changed files:
- components/susignup-admin.php
- components/susignup.php
Changes:
=====================================
components/susignup-admin.php
=====================================
--- a/components/susignup-admin.php
+++ b/components/susignup-admin.php
@@ -38,6 +38,8 @@ if (isset($session->groups[$permission])) {
$apiReq = curl_init();
curl_setopt($apiReq, CURLOPT_URL, $url);
curl_setopt($apiReq, CURLOPT_RETURNTRANSFER, TRUE);
+ curl_setopt($apiReq, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($apiReq, CURLOPT_SSL_VERIFYHOST, false);
$apiResult = curl_exec($apiReq);
if ($apiResult === FALSE) {
@@ -171,6 +173,8 @@ if (isset($session->groups[$permission])) {
$apiReq = curl_init();
curl_setopt($apiReq, CURLOPT_URL, $url);
curl_setopt($apiReq, CURLOPT_RETURNTRANSFER, TRUE);
+ curl_setopt($apiReq, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($apiReq, CURLOPT_SSL_VERIFYHOST, false);
$apiResult = curl_exec($apiReq);
libxml_use_internal_errors(true);
@@ -207,6 +211,8 @@ if (isset($session->groups[$permission])) {
$apiReq = curl_init();
curl_setopt($apiReq, CURLOPT_URL, $url);
curl_setopt($apiReq, CURLOPT_RETURNTRANSFER, TRUE);
+ curl_setopt($apiReq, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($apiReq, CURLOPT_SSL_VERIFYHOST, false);
$apiResult = curl_exec($apiReq);
$sumembers = su_response_decode($apiResult);
@@ -260,6 +266,8 @@ if (isset($session->groups[$permission])) {
$apiReq = curl_init();
curl_setopt($apiReq, CURLOPT_URL, $url);
curl_setopt($apiReq, CURLOPT_RETURNTRANSFER, TRUE);
+ curl_setopt($apiReq, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($apiReq, CURLOPT_SSL_VERIFYHOST, false);
$apiResult = curl_exec($apiReq);
$sumembers = su_response_decode($apiResult);
=====================================
components/susignup.php
=====================================
--- a/components/susignup.php
+++ b/components/susignup.php
@@ -34,6 +34,8 @@ if(!empty($_REQUEST['sid'])&&!empty($_REQUEST['transactionID'])){
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
//execute post
$result = curl_exec($ch);
View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/compare/6d4a65e5afaacb53b155e03bf245ef23c99a95ab...d13fa5d27b26f3412d19e0254f9ae975df060cde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20150924/baf5eed7/attachment.html>
More information about the Devel
mailing list