public static function XMLSecurityDSig::staticGet509XCerts in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8
Parameters
string $certs:
bool $isPEMFormat:
Return value
array
2 calls to XMLSecurityDSig::staticGet509XCerts()
File
- src/
XMLSecurityKey.php, line 1593
Class
Namespace
Drupal\miniorange_samlCode
public static function staticGet509XCerts($certs, $isPEMFormat = true) {
if ($isPEMFormat) {
$data = '';
$certlist = array();
$arCert = explode("\n", $certs);
$inData = false;
foreach ($arCert as $curData) {
if (!$inData) {
if (strncmp($curData, '-----BEGIN CERTIFICATE', 22) == 0) {
$inData = true;
}
}
else {
if (strncmp($curData, '-----END CERTIFICATE', 20) == 0) {
$inData = false;
$certlist[] = $data;
$data = '';
continue;
}
$data .= trim($curData);
}
}
return $certlist;
}
else {
return array(
$certs,
);
}
}