Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Manna <kyle@kylemanna.com>2014-05-26 11:46:41 +0400
committerKyle Manna <kyle@kylemanna.com>2017-01-08 10:20:27 +0300
commit9556d8e6dad2143a8af0bbd9620ae06f8329c953 (patch)
tree8c7b2365b3a03e7889db2e73b3ff432f0eb75405 /tests/TestYkChallengeResponseKey.h
parent5b8b4c8c7b877227cb7b6602450aaaa3e859a14e (diff)
tests: Add YubiKey Tests
* Basic testing for YubiKey code. Signed-off-by: Kyle Manna <kyle@kylemanna.com>
Diffstat (limited to 'tests/TestYkChallengeResponseKey.h')
-rw-r--r--tests/TestYkChallengeResponseKey.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/TestYkChallengeResponseKey.h b/tests/TestYkChallengeResponseKey.h
new file mode 100644
index 000000000..4699b9101
--- /dev/null
+++ b/tests/TestYkChallengeResponseKey.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2014 Kyle Manna <kyle@kylemanna.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 or (at your option)
+ * version 3 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef KEEPASSX_TESTYUBIKEYCHALRESP_H
+#define KEEPASSX_TESTYUBIKEYCHALRESP_H
+
+#include <QObject>
+
+#include "keys/YkChallengeResponseKey.h"
+
+class TestYubiKeyChalResp: public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void initTestCase();
+ void cleanupTestCase();
+
+ void init();
+
+ /* Order is important!
+ * Need to init and detectDevices() before proceeding
+ */
+ void detectDevices();
+
+ void getSerial();
+ void keyGetName();
+ void keyIssueChallenge();
+
+ void deinit();
+
+ /* Callback for detectDevices() */
+ void ykDetected(int slot, bool blocking);
+
+private:
+ int m_detected;
+ YkChallengeResponseKey *m_key;
+};
+
+#endif // KEEPASSX_TESTYUBIKEYCHALRESP_H