Skip to content

Commit

Permalink
Add argument for setting whether to validate peer SSL certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
Duffey, Cliff committed Apr 24, 2024
1 parent f97d1e8 commit 9156d1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Saml2/IdPMetadataParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class OneLogin_Saml2_IdPMetadataParser
*
* @return array metadata info in php-saml settings format
*/
public static function parseRemoteXML($url, $entityId = null, $desiredNameIdFormat = null, $desiredSSOBinding = OneLogin_Saml2_Constants::BINDING_HTTP_REDIRECT, $desiredSLOBinding = OneLogin_Saml2_Constants::BINDING_HTTP_REDIRECT)
public static function parseRemoteXML($url, $entityId = null, $desiredNameIdFormat = null, $desiredSSOBinding = OneLogin_Saml2_Constants::BINDING_HTTP_REDIRECT, $desiredSLOBinding = OneLogin_Saml2_Constants::BINDING_HTTP_REDIRECT, $validatePeer = false)
{
$metadataInfo = array();

Expand All @@ -37,7 +37,7 @@ public static function parseRemoteXML($url, $entityId = null, $desiredNameIdForm
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $validatePeer);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);

$xml = curl_exec($ch);
Expand Down

0 comments on commit 9156d1d

Please sign in to comment.