Skip to content

Commit 9156d1d

Browse files
author
Duffey, Cliff
committed
Add argument for setting whether to validate peer SSL certificate
1 parent f97d1e8 commit 9156d1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Saml2/IdPMetadataParser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class OneLogin_Saml2_IdPMetadataParser
2525
*
2626
* @return array metadata info in php-saml settings format
2727
*/
28-
public static function parseRemoteXML($url, $entityId = null, $desiredNameIdFormat = null, $desiredSSOBinding = OneLogin_Saml2_Constants::BINDING_HTTP_REDIRECT, $desiredSLOBinding = OneLogin_Saml2_Constants::BINDING_HTTP_REDIRECT)
28+
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)
2929
{
3030
$metadataInfo = array();
3131

@@ -37,7 +37,7 @@ public static function parseRemoteXML($url, $entityId = null, $desiredNameIdForm
3737
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
3838
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
3939
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
40-
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
40+
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $validatePeer);
4141
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
4242

4343
$xml = curl_exec($ch);

0 commit comments

Comments
 (0)