From 8991c2c0c49f1d98b772a0197dde5f3dfb7124f0 Mon Sep 17 00:00:00 2001 From: Jean Paul Galea Date: Fri, 17 Jul 2015 23:01:36 +0200 Subject: [PATCH] Cosmetic changes. --- ykval-verify.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ykval-verify.php b/ykval-verify.php index 4813ded..0b9a23a 100644 --- a/ykval-verify.php +++ b/ykval-verify.php @@ -250,25 +250,25 @@ if ($h != '') } } -/* We need to add necessary parameters not available at earlier protocols after signature is computed. +/** + * We need to add necessary parameters not available at + * earlier protocols after signature is computed. */ if ($protocol_version < 2.0) { - /* We need to create a nonce manually here */ + // we need to create a nonce manually here $nonce = md5(uniqid(rand())); $myLog->log(LOG_INFO, 'protocol version below 2.0. Created nonce ' . $nonce); } -//// Which YK-KSM should we talk to? -// -$urls = otp2ksmurls ($otp, $client); +// which YK-KSM should we talk to? +$urls = otp2ksmurls($otp, $client); if (!is_array($urls)) { sendResp(S_BACKEND_ERROR, $myLog, $apiKey); } -//// Decode OTP from input -// +// decode OTP from input $curlopts = array(); if (array_key_exists('__YKVAL_KSM_CURL_OPTS__', $baseParams)) { @@ -280,8 +280,7 @@ if (($otpinfo = KSMdecryptOTP($urls, $myLog, $curlopts)) === FALSE) } $myLog->log(LOG_DEBUG, "Decrypted OTP:", $otpinfo); -//// Get Yubikey from DB -// +// get Yubikey from DB $devId = substr($otp, 0, strlen ($otp) - TOKEN_LEN); $yk_publicname = $devId; $localParams = $sync->getLocalParams($yk_publicname);