mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-22 09:54:14 +01:00
More curl debugging.
This commit is contained in:
parent
b568a72892
commit
49c122436c
@ -104,12 +104,15 @@ function decryptOTP($otp, $base_url) {
|
|||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
curl_setopt($ch, CURLOPT_USERAGENT, "YK-VAL");
|
curl_setopt($ch, CURLOPT_USERAGENT, "YK-VAL");
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_FAILONERROR, true);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
|
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
|
||||||
$response = curl_exec($ch);
|
$response = curl_exec($ch);
|
||||||
|
$error = curl_error ($ch);
|
||||||
|
debug("YK-KSM response: $response error: " . $error);
|
||||||
|
$info = curl_getinfo ($ch);
|
||||||
|
debug($info);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
|
||||||
debug("YK-KSM response: $response (url $url)");
|
|
||||||
|
|
||||||
if (sscanf ($response,
|
if (sscanf ($response,
|
||||||
"OK counter=%04x high=%02x low=%04x use=%02x",
|
"OK counter=%04x high=%02x low=%04x use=%02x",
|
||||||
$ret["session_counter"], $ret["high"],
|
$ret["session_counter"], $ret["high"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user