Skip to content
Snippets Groups Projects
Commit 7cd02d97 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Fixes for compatibility with PHP 5.4.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3193 44740490-163a-0410-bde0-09ae8108e29a
parent 1d3a030d
No related branches found
No related tags found
No related merge requests found
...@@ -360,7 +360,7 @@ class sspmod_InfoCard_STS { ...@@ -360,7 +360,7 @@ class sspmod_InfoCard_STS {
$canonicalbuf = sspmod_InfoCard_Utils::canonicalize($signedinfo); $canonicalbuf = sspmod_InfoCard_Utils::canonicalize($signedinfo);
$privkey = openssl_pkey_get_private(file_get_contents($config['sts_key'])); $privkey = openssl_pkey_get_private(file_get_contents($config['sts_key']));
$signature = ''; $signature = '';
openssl_sign($canonicalbuf, &$signature, $privkey); openssl_sign($canonicalbuf, $signature, $privkey);
openssl_free_key($privkey); openssl_free_key($privkey);
$samlsignature = base64_encode($signature); $samlsignature = base64_encode($signature);
...@@ -381,4 +381,4 @@ class sspmod_InfoCard_STS { ...@@ -381,4 +381,4 @@ class sspmod_InfoCard_STS {
} }
?> ?>
\ No newline at end of file
...@@ -121,7 +121,7 @@ class sspmod_expirycheck_Auth_Process_ExpiryDate extends SimpleSAML_Auth_Process ...@@ -121,7 +121,7 @@ class sspmod_expirycheck_Auth_Process_ExpiryDate extends SimpleSAML_Auth_Process
$netId = $state['Attributes'][$this->netid_attr][0]; $netId = $state['Attributes'][$this->netid_attr][0];
$expireOnDate = strtotime($state['Attributes'][$this->expirydate_attr][0]); $expireOnDate = strtotime($state['Attributes'][$this->expirydate_attr][0]);
if (self::shWarning(&$state, $expireOnDate, $this->warndaysbefore)) { if (self::shWarning($state, $expireOnDate, $this->warndaysbefore)) {
assert('is_array($state)'); assert('is_array($state)');
if (isset($state['isPassive']) && $state['isPassive'] === TRUE) { if (isset($state['isPassive']) && $state['isPassive'] === TRUE) {
/* We have a passive request. Skip the warning. */ /* We have a passive request. Skip the warning. */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<?php <?php
function readline($prompt = '') { function _readline($prompt = '') {
echo $prompt; echo $prompt;
return rtrim( fgets( STDIN ), "\n" ); return rtrim( fgets( STDIN ), "\n" );
} }
...@@ -40,7 +40,7 @@ try { ...@@ -40,7 +40,7 @@ try {
echo('Go to this URL to authenticate/authorize the request: ' . $url . "\n"); echo('Go to this URL to authenticate/authorize the request: ' . $url . "\n");
system('open ' . $url); system('open ' . $url);
readline('Click enter when you have completed the authorization step using your web browser...'); _readline('Click enter when you have completed the authorization step using your web browser...');
// Replace the request token with an access token // Replace the request token with an access token
$accessToken = $consumer->getAccessToken( $baseurl . '/module.php/oauth/accessToken.php', $requestToken); $accessToken = $consumer->getAccessToken( $baseurl . '/module.php/oauth/accessToken.php', $requestToken);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment