LSauthCAS : added possibility to set CURLOPT_SSLVERSION option with parameter LSAUTH_...
[ldapsaisie.git] / public_html / includes / class / class.LSauthMethod_CAS.php
index fe9f71b..b41256f 100644 (file)
@@ -42,14 +42,18 @@ class LSauthMethod_CAS extends LSauthMethod {
                                phpCAS::setNoCasServerValidation();
                        }
 
-                       if (defined(LSAUTH_CAS_SERVER_SSL_CERT)) {
+                       if (defined('LSAUTH_CAS_SERVER_SSL_CERT')) {
                                phpCAS::setCasServerCert(LSAUTH_CAS_SERVER_SSL_CERT);
                        }
 
-                       if (defined(LSAUTH_CAS_SERVER_SSL_CACERT)) {
+                       if (defined('LSAUTH_CAS_SERVER_SSL_CACERT')) {
                                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();
                        }