From 9a94c6d85e9d3c3dc9b3ef0acb7715c2b6a6129d Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Fri, 24 Feb 2017 20:44:06 +0100 Subject: [PATCH] Remove debug output to reduce console spam when running in debug mode --- src/keys/drivers/YubiKey.cpp | 8 -------- tests/TestYkChallengeResponseKey.cpp | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/keys/drivers/YubiKey.cpp b/src/keys/drivers/YubiKey.cpp index a490f0699..ffb48fc74 100644 --- a/src/keys/drivers/YubiKey.cpp +++ b/src/keys/drivers/YubiKey.cpp @@ -192,10 +192,6 @@ YubiKey::ChallengeResult YubiKey::challenge(int slot, bool mayBlock, const QByte c = reinterpret_cast(paddedChallenge.constData()); r = reinterpret_cast(response.data()); -#ifdef QT_DEBUG - qDebug().nospace() << __func__ << "(" << slot << ") c = " << printByteArray(paddedChallenge); -#endif - int ret = yk_challenge_response(m_yk, yk_cmd, mayBlock, paddedChallenge.size(), c, response.size(), r); emit challenged(); @@ -227,9 +223,5 @@ YubiKey::ChallengeResult YubiKey::challenge(int slot, bool mayBlock, const QByte // actual HMAC-SHA1 response is only 20 bytes response.resize(20); -#ifdef QT_DEBUG - qDebug().nospace() << __func__ << "(" << slot << ") r = " << printByteArray(response) << ", ret = " << ret; -#endif - return SUCCESS; } diff --git a/tests/TestYkChallengeResponseKey.cpp b/tests/TestYkChallengeResponseKey.cpp index bd58ac018..046c06660 100644 --- a/tests/TestYkChallengeResponseKey.cpp +++ b/tests/TestYkChallengeResponseKey.cpp @@ -46,7 +46,7 @@ void TestYubiKeyChalResp::init() QSKIP("Unable to connect to YubiKey", SkipAll); } - /* Crypto subsystem needs to be initalized for YubiKey testing */ + // crypto subsystem needs to be initialized for YubiKey testing QVERIFY(Crypto::init()); } @@ -57,7 +57,7 @@ void TestYubiKeyChalResp::detectDevices() Qt::QueuedConnection); QtConcurrent::run(YubiKey::instance(), &YubiKey::detect); - /* Need to wait for the hardware (that's hopefully plugged in)... */ + // need to wait for the hardware (that's hopefully plugged in)... QTest::qWait(2000); QVERIFY2(m_detected > 0, "Is a YubiKey attached?"); }