1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-20 12:54:23 +01:00

More curl debugging.

This commit is contained in:
Simon Josefsson 2009-03-11 11:14:50 +00:00
parent b568a72892
commit 49c122436c

View File

@ -104,12 +104,15 @@ function decryptOTP($otp, $base_url) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERAGENT, "YK-VAL");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
$response = curl_exec($ch);
$error = curl_error ($ch);
debug("YK-KSM response: $response error: " . $error);
$info = curl_getinfo ($ch);
debug($info);
curl_close($ch);
debug("YK-KSM response: $response (url $url)");
if (sscanf ($response,
"OK counter=%04x high=%02x low=%04x use=%02x",
$ret["session_counter"], $ret["high"],