1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2024-12-01 15:24:16 +01:00

Timestamp responses.

This commit is contained in:
Simon Josefsson 2010-08-22 13:41:21 +00:00
parent 069092fd6b
commit 369a6e0fbc
2 changed files with 13 additions and 7 deletions

4
NEWS
View File

@ -1,7 +1,7 @@
* Version 2.7 unreleased * Version 2.7 unreleased
* Record complete timestamp when request is received * Timestamp request and response because syslog doesn't record year
(syslog doesn't record year nor sub-second resolution). nor sub-second resolution.
* Version 2.6 released 2010-08-02 * Version 2.6 released 2010-08-02

View File

@ -238,14 +238,20 @@ function sendResp($status, $apiKey = '', $extra = null) {
} }
$h = sign($a, $apiKey); $h = sign($a, $apiKey);
echo "h=" . $h . "\r\n"; $str = "h=" . $h . "\r\n";
echo "t=" . ($a['t']) . "\r\n"; $str .= "t=" . ($a['t']) . "\r\n";
if ($extra){ if ($extra){
foreach ($extra as $param => $value) { foreach ($extra as $param => $value) {
echo $param . "=" . $value . "\r\n"; $str .= $param . "=" . $value . "\r\n";
} }
} }
echo "status=" . ($a['status']) . "\r\n"; $str .= "status=" . ($a['status']) . "\r\n";
echo "\r\n"; $str .= "\r\n";
global $ykval_common_log;
$ykval_common_log->log(LOG_INFO, "Response: " . $str .
" (at " . date("c") . " " . microtime() . ")");
echo $str;
} }
?> ?>