From a516c5be746e4490ddfb77825e487adb7f5420bd Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 29 Mar 2012 18:33:12 +0200 Subject: [PATCH] LSauthCAS : added possibility to set CURLOPT_SSLVERSION option with parameter LSAUTH_CAS_CURL_SSLVERION --- public_html/conf/LSauth/config.LSauthMethod_CAS.php | 5 +++++ public_html/includes/class/class.LSauthMethod_CAS.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/public_html/conf/LSauth/config.LSauthMethod_CAS.php b/public_html/conf/LSauth/config.LSauthMethod_CAS.php index 6e4af98e..f923ae38 100644 --- a/public_html/conf/LSauth/config.LSauthMethod_CAS.php +++ b/public_html/conf/LSauth/config.LSauthMethod_CAS.php @@ -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); + ?> diff --git a/public_html/includes/class/class.LSauthMethod_CAS.php b/public_html/includes/class/class.LSauthMethod_CAS.php index 9e904b1b..b41256f9 100644 --- a/public_html/includes/class/class.LSauthMethod_CAS.php +++ b/public_html/includes/class/class.LSauthMethod_CAS.php @@ -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(); }