LSauthCAS : added possibility to set CURLOPT_SSLVERSION option with parameter LSAUTH_...
authorBenjamin Renard <brenard@easter-eggs.com>
Thu, 29 Mar 2012 16:33:12 +0000 (18:33 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Thu, 29 Mar 2012 16:33:12 +0000 (18:33 +0200)
public_html/conf/LSauth/config.LSauthMethod_CAS.php
public_html/includes/class/class.LSauthMethod_CAS.php

index 6e4af98..f923ae3 100644 (file)
@@ -56,4 +56,9 @@ define('LSAUTH_CAS_SERVER_NO_SSL_VALIDATION',false);
 // CAS server SSL CA Certificate path
 //define('LSAUTH_CAS_SERVER_SSL_CACERT','');
 
+// phpCAS use cURL to validate ticket from the CAS server.
+// You could have to set SSLVERSION manualy if you have cURL
+// error on ticket validation. Possibles values : 2 or 3
+//define('LSAUTH_CAS_CURL_SSLVERION',3);
+
 ?>
index 9e904b1..b41256f 100644 (file)
@@ -50,6 +50,10 @@ class LSauthMethod_CAS extends LSauthMethod {
                                phpCAS::setCasServerCACert(LSAUTH_CAS_SERVER_SSL_CACERT);
                        }
 
+                       if (defined('LSAUTH_CAS_CURL_SSLVERION')) {
+                               phpCAS::setExtraCurlOption(CURLOPT_SSLVERSION,LSAUTH_CAS_CURL_SSLVERION);
+                       }
+
                        if (LSAUTH_CAS_DISABLE_LOGOUT) {
                                LSauth :: disableLogoutBtn();
                        }