Commit 25fe0db6 authored by Simon Josefsson's avatar Simon Josefsson

Imported Upstream version 3.1.10

parent 19546627
2013-07-04 Klas Lindfors <klas@yubico.com>
* NEWS: release 3.1.10
2013-07-02 Klas Lindfors <klas@yubico.com>
* src/yubikeylogger.cpp: don't try to open file if we don't have a
filename
2013-07-02 Klas Lindfors <klas@yubico.com>
* src/yubikeywriter.cpp: drop the write_config way and only write it
out with qDebug()
2013-07-01 Klas Lindfors <klas@yubico.com>
* src/ui/settingpage.ui: make sure all text is shown
2013-07-01 Klas Lindfors <klas@yubico.com>
* src/yubikeywriter.cpp: set acces code mode to the library
2013-07-01 Klas Lindfors <klas@yubico.com>
* src/common.h, src/ui/chalresppage.cpp, src/ui/oathpage.cpp,
src/ui/otppage.cpp, src/ui/settingpage.cpp, src/ui/staticpage.cpp,
src/ui/yubiaccbox.cpp, src/ui/yubiaccbox.h, src/yubikeyconfig.cpp,
src/yubikeyconfig.h: code to set the mode of acccode in the
yubikeyconfig object
2013-07-01 Klas Lindfors <klas@yubico.com>
* src/common.h, src/main.cpp, src/ui/aboutpage.cpp,
src/ui/chalresppage.cpp, src/ui/mainwindow.cpp,
src/ui/oathpage.cpp, src/ui/otppage.cpp, src/ui/scanedit.cpp,
src/ui/settingpage.cpp, src/ui/staticpage.cpp, src/ui/toolpage.cpp,
src/ui/yubiaccbox.cpp, src/yubikeyconfig.h, src/yubikeyfinder.cpp,
src/yubikeyfinder.h, src/yubikeylogger.h, src/yubikeyutil.cpp,
src/yubikeywriter.cpp, src/yubikeywriter.h: include cleanup.
2013-07-01 Klas Lindfors <klas@yubico.com>
* src/ui/yubiaccbox.cpp: if we want to keep accCode, return the old
one as new
2013-07-01 Klas Lindfors <klas@yubico.com>
* src/ui/mainwindow.cpp, src/ui/mainwindow.h: move around inclusions
of "other" forms to avoid unnecessary re-compilations
2013-06-28 Klas Lindfors <klas@yubico.com>
* src/ui/toolpage.cpp, src/ui/toolpage.ui: disable import when no
key is inserted
2013-06-28 Klas Lindfors <klas@yubico.com>
* src/ui/toolpage.cpp, src/ui/toolpage.h, src/ui/toolpage.ui: add
serial checkbox for ndef and zap acc code
2013-06-28 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: move around
2013-06-28 Klas Lindfors <klas@yubico.com>
* src/ui/chalresppage.cpp, src/ui/oathpage.cpp, src/ui/otppage.cpp,
src/ui/staticpage.cpp, src/ui/toolpage.cpp, src/ui/yubiaccbox.cpp:
mark unused parameters as unused
2013-06-28 Klas Lindfors <klas@yubico.com>
* src/ui/scanedit.cpp: use toUInt() to get an unsigned variable for
comparison
2013-06-28 Klas Lindfors <klas@yubico.com>
* src/yubikeywriter.cpp: fix warning
2013-06-28 Klas Lindfors <klas@yubico.com>
* src/yubikeyutil.cpp: fix warnings
2013-06-25 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: add build config flag force_pkgconfig
2013-06-25 Klas Lindfors <klas@yubico.com>
* README: we now depend on 1.14.0 of yubikey-personalization
2013-06-24 Klas Lindfors <klas@yubico.com>
* src/ui/toolpage.cpp, src/ui/toolpage.ui: try to make uri example
clearer with a placeholder on ndefEdit
2013-06-07 Klas Lindfors <klas@yubico.com>
* src/ui/yubiaccbox.cpp: remove unecessary check if m_serial is set
2013-06-07 Klas Lindfors <klas@yubico.com>
* src/ui/yubiaccbox.cpp, src/ui/yubiaccbox.h: implement serial
functionality
2013-06-07 Klas Lindfors <klas@yubico.com>
* src/ui/yubiaccbox.cpp, src/ui/yubiaccbox.ui: add serial checkboxes
2013-06-06 Klas Lindfors <klas@yubico.com>
* src/ui/yubiaccbox.ui: set stylesheet for the accbox
2013-06-05 Klas Lindfors <klas@yubico.com>
* src/ui/settingpage.cpp, src/ui/settingpage.h,
src/ui/settingpage.ui: refactor settingpage usage of access code to
use new box
2013-06-05 Klas Lindfors <klas@yubico.com>
* src/ui/chalresppage.cpp, src/ui/chalresppage.h,
src/ui/chalresppage.ui: refactor chalresppage to use new access code
box
2013-06-05 Klas Lindfors <klas@yubico.com>
* src/ui/staticpage.cpp, src/ui/staticpage.h, src/ui/staticpage.ui:
refactor staticpage to use new access box
2013-06-05 Klas Lindfors <klas@yubico.com>
* src/ui/oathpage.cpp, src/ui/oathpage.h, src/ui/oathpage.ui:
refactor the oath page to use new access code box
2013-06-05 Klas Lindfors <klas@yubico.com>
* src/ui/otppage.cpp, src/ui/otppage.h, src/ui/otppage.ui: refactor
to use the broken-out config protection box
2013-06-05 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro, src/ui/yubiaccbox.cpp,
src/ui/yubiaccbox.h, src/ui/yubiaccbox.ui: break out the config
protection box into it's own widget
2013-06-03 Klas Lindfors <klas@yubico.com>
* src/ui/toolpage.cpp: make sure the buffer for decoding hex/modhex
into is large enough it has to be number of bytes * 2 for decoding. fixes #18
2013-05-03 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: only enable silent if nosilent isn't set
2013-05-03 Klas Lindfors <klas@yubico.com>
* src/ui/scanedit.cpp: old bug make sure we don't access after end
of array code was changed earlier to xor with SHIFT before and store it
2013-05-03 Klas Lindfors <klas@yubico.com>
* src/ui/settingpage.ui: move box around to fix ui issues
2013-05-02 Klas Lindfors <klas@yubico.com>
* src/common.h, src/ui/mainwindow.cpp, src/ui/settingpage.cpp,
src/ui/staticpage.cpp, src/ui/staticpage.h, src/ui/toolpage.cpp:
handle strong_pw stuff as settings
2013-05-02 Klas Lindfors <klas@yubico.com>
* src/ui/chalresppage.cpp, src/ui/chalresppage.h,
src/ui/mainwindow.cpp, src/ui/mainwindow.h, src/ui/oathpage.cpp,
src/ui/oathpage.h, src/ui/otppage.cpp, src/ui/otppage.h,
src/ui/staticpage.cpp, src/ui/staticpage.h, src/ui/toolpage.cpp,
src/ui/toolpage.h: let the import feature select slots
2013-05-02 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: only use productbuild for app store builds
2013-04-30 Klas Lindfors <klas@yubico.com>
* src/common.h, src/ui/chalresppage.cpp, src/ui/chalresppage.h,
src/ui/settingpage.cpp, src/ui/toolpage.cpp: handle hmac_lt64 as a
setting
2013-04-30 Klas Lindfors <klas@yubico.com>
* src/common.h, src/ui/chalresppage.cpp, src/ui/chalresppage.h,
src/ui/settingpage.cpp, src/ui/toolpage.cpp: treat btn_trig as a
setting
2013-04-30 Klas Lindfors <klas@yubico.com>
* src/common.h, src/ui/oathpage.cpp, src/ui/oathpage.h,
src/ui/settingpage.cpp, src/ui/toolpage.cpp: handle oath digits by
remembering the setting
2013-04-29 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro, do-source-release.sh, src/version.h: only
keep version in YKPersonalization.pro
2013-04-29 Klas Lindfors <klas@yubico.com>
* src/ui/settingpage.ui: export and import
2013-04-26 Klas Lindfors <klas@yubico.com>
* src/ui/toolpage.cpp: save filename if import was ok
2013-04-26 Klas Lindfors <klas@yubico.com>
* src/ui/toolpage.cpp: import alot of settings
2013-04-26 Klas Lindfors <klas@yubico.com>
* src/ui/mainwindow.cpp, src/ui/toolpage.cpp, src/ui/toolpage.h:
switch page according to inmported cfg
2013-04-26 Klas Lindfors <klas@yubico.com>
* src/ui/mainwindow.cpp, src/ui/mainwindow.h: add code to switch to
specific tab on page
2013-04-26 Klas Lindfors <klas@yubico.com>
* src/ui/chalresppage.h, src/ui/oathpage.h, src/ui/otppage.h,
src/ui/settingpage.h, src/ui/staticpage.h, src/ui/toolpage.h: make
setCurrentPage a public slot
2013-04-26 Klas Lindfors <klas@yubico.com>
* src/ui/mainwindow.cpp, src/ui/settingpage.cpp,
src/ui/settingpage.h, src/ui/toolpage.h: add a reloadSettings
slot/signal
2013-04-26 Klas Lindfors <klas@yubico.com>
* src/ui/chalresppage.h, src/ui/oathpage.h, src/ui/otppage.h,
src/ui/settingpage.h, src/ui/staticpage.h, src/ui/toolpage.h: move
all Page elements to public
2013-04-26 Klas Lindfors <klas@yubico.com>
* src/yubikeywriter.cpp: use YK_STATUS object from yubikeyfinder
instead
2013-04-26 Klas Lindfors <klas@yubico.com>
* src/yubikeyfinder.cpp, src/yubikeyfinder.h: move the ykstatus
object to class level and make it fetchable for others
2013-04-25 Klas Lindfors <klas@yubico.com>
* src/ui/toolpage.cpp: start on importing configuration
2013-04-25 Klas Lindfors <klas@yubico.com>
* src/common.h, src/ui/settingpage.cpp, src/ui/toolpage.cpp,
src/ui/toolpage.h: filenames for import
2013-04-25 Klas Lindfors <klas@yubico.com>
* src/ui/mainwindow.cpp, src/ui/toolpage.cpp, src/ui/toolpage.h,
src/ui/toolpage.ui: add basis of import tab to toolpage
2013-04-22 Klas Lindfors <klas@yubico.com>
* : re-generate .icns file for mac
2013-04-22 Klas Lindfors <klas@yubico.com>
* resources/mac/Info.plist.in: add CFBundleShortVersionString
2013-04-22 Klas Lindfors <klas@yubico.com>
* NEWS, YKPersonalization.pro, src/version.h: bump versions
2013-04-22 Klas Lindfors <klas@yubico.com>
* NEWS: NEWS
......
yubikey-personalization-gui NEWS -- History of user-visible changes. -*- outline -*-
* Version 3.1.10 (released 2013-07-04)
** Add import page under tools for importing ycfg.
** Minor UI fixes.
** Fix for crash on scan-code entry.
** Fix for crash on the number-converter.
** Add serial-number checkbox for access code entry.
* Version 3.1.9 (released 2013-04-22)
** Add experimental export support to ycfg-json format.
......
......@@ -47,7 +47,7 @@ directory:
Dependencies
------------
yubikey-personalization-gui depends on version 1.13.0 or higher of
yubikey-personalization-gui depends on version 1.14.0 or higher of
libykpers.
When building on Windows and mac you will need a binary buikd of libykpers,
......
#
# global definitions
#
VERSION = "3.1.9"
VERSION_MAJOR = 3
VERSION_MINOR = 1
VERSION_BUILD = 10
VERSION = "$${VERSION_MAJOR}.$${VERSION_MINOR}.$${VERSION_BUILD}"
APP_NAME = $$quote(YubiKey Personalization Tool)
#
......@@ -12,11 +15,13 @@ DEPLOYMENT_PLUGIN += qmng
TEMPLATE = app
TARGET = yubikey-personalization-gui
DEFINES += VERSION=\\\"$${VERSION}\\\"
DEFINES += VERSION_MAJOR=\\\"$${VERSION_MAJOR}\\\" VERSION_MINOR=\\\"$${VERSION_MINOR}\\\" VERSION_BUILD=\\\"$${VERSION_BUILD}\\\"
CONFIG += exceptions
CONFIG += silent
!nosilent {
CONFIG += silent
}
CONFIG(debug, debug|release) {
message("Debug build")
......@@ -55,7 +60,8 @@ FORMS += \
src/ui/helpbox.ui \
src/ui/confirmbox.ui \
src/ui/chalresppage.ui \
src/ui/aboutpage.ui
src/ui/aboutpage.ui \
src/ui/yubiaccbox.ui
HEADERS += \
src/ui/toolpage.h \
......@@ -69,6 +75,7 @@ HEADERS += \
src/ui/confirmbox.h \
src/ui/chalresppage.h \
src/ui/aboutpage.h \
src/ui/yubiaccbox.h \
src/yubikeywriter.h \
src/yubikeyutil.h \
src/yubikeylogger.h \
......@@ -91,6 +98,7 @@ SOURCES += \
src/ui/confirmbox.cpp \
src/ui/chalresppage.cpp \
src/ui/aboutpage.cpp \
src/ui/yubiaccbox.cpp \
src/yubikeywriter.cpp \
src/yubikeyutil.cpp \
src/yubikeylogger.cpp \
......@@ -240,7 +248,7 @@ win32 {
#
# *nix specific configuration
#
unix:!macx {
unix:!macx|force_pkgconfig {
message("Unix build")
LIBS += -lyubikey
......@@ -255,7 +263,7 @@ unix:!macx {
#
# MacOS X specific configuration
#
macx {
macx:!force_pkgconfig {
message("Mac build")
INCLUDEPATH += libs/macx/include libs/macx/include/ykpers-1
......@@ -347,9 +355,18 @@ macx {
$$_INSTALL_NAME_TOOL -change $$_QTGUI $$_BASE/$$_QTGUI $$_PLUGINDIR/imageformats/libqmng.dylib)
build_installer {
# the productbuild path doesn't work pre 10.8
for_store {
_INSTALLER_CMD = "productbuild --sign \'$$INSTALLER_SIGN_IDENTITY\' --component $${DESTDIR}/$${TARGET_MAC}.app /Applications/ $${DESTDIR}/$${TARGET_MAC}-$${VERSION}.pkg"
} else {
_INSTALLER_CMD = "rm -rf $${DESTDIR}/temp && \
mkdir -p $${DESTDIR}/temp/ && \
cp -R $${DESTDIR}/$${TARGET_MAC}.app $${DESTDIR}/temp && \
pkgbuild --sign \'$$INSTALLER_SIGN_IDENTITY\' --root ${DESTDIR}/temp/ --component-plist resources/mac/installer.plist --install-location '/Applications/' $${DESTDIR}/$${TARGET_MAC}-$${VERSION}.pkg"
}
QMAKE_POST_LINK += $$quote( && codesign -s \'$$PACKAGE_SIGN_IDENTITY\' $${DESTDIR}/$${TARGET_MAC}.app \
--entitlements resources/mac/Entitlements.plist && \
productbuild --sign \'$$INSTALLER_SIGN_IDENTITY\' --component $${DESTDIR}/$${TARGET_MAC}.app /Applications $${DESTDIR}/$${TARGET_MAC}-$${VERSION}.pkg)
$$_INSTALLER_CMD)
}
}
......
......@@ -21,11 +21,6 @@ if ! head -5 YKPersonalization.pro | grep -q "VERSION.*= \"$VERSION\""; then
exit
fi
if ! cat src/version.h | grep -q "#define VER_PRODUCTVERSION.*$VERSION"; then
echo "You need to update version in src/version.h"
exit
fi
if [ "x$YUBICO_GITHUB_REPO" = "x" ]; then
echo "you need to define YUBICO_GITHUB_REPO"
exit
......
......@@ -16,6 +16,8 @@
<string>YubiKey Personalization Tool</string>
<key>CFBundleVersion</key>
<string>@@version@@</string>
<key>CFBundleShortVersionString</key>
<string>@@version@@</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
</dict>
......
......@@ -32,13 +32,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QtGui>
#include "otpdef.h"
#include "yubikeylogger.h"
#include "yubikeyutil.h"
#include "yubikeyfinder.h"
#include "yubikeywriter.h"
typedef std::vector<int>::size_type size_t;
enum AccMode {
Acc_None,
Acc_Serial,
Acc_Random,
};
#define MAX_SIZE 256
#define SCHEME_INCR_ID_RAND_SECRET 0
......@@ -149,6 +151,7 @@ typedef std::vector<int>::size_type size_t;
#define SG_LOG_FORMAT "Log/Format"
#define SG_EXPORT_FILENAME "Export/Filename"
#define SG_IMPORT_FILENAME "Import/Filename"
#define SG_TAB_FIRST "Flag/TabTirst"
#define SG_APPEND_TAB1 "Flag/AppendTab1"
......@@ -171,6 +174,14 @@ typedef std::vector<int>::size_type size_t;
#define SG_USE_NUMERIC_KEYPAD "Flag/UseNumericKeypad"
#define SG_LED_INVERT "Flag/LedInvert"
#define SG_OATH_HOTP8 "Flag/OathHotp8"
#define SG_REQUIRE_INPUT "Flag/RequireInput"
#define SG_HMAC_LT64 "Flag/HmacLt64"
#define SG_STRONG_PW1 "Flag/StrongPw1"
#define SG_STRONG_PW2 "Flag/StrongPw2"
#define SG_STRONG_PW3 "Flag/StrongPw3"
#define SG_OVERWRITE_CONF_SLOT1 "DontAsk/Slot1Overwriting"
#define SG_DIFF_PUBLIC_ID_LEN "DontAsk/PublicIdLen"
#define SG_ENABLE_CONF_PROTECTION "DontAsk/ConfProtection"
......
......@@ -26,7 +26,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <QtGui/QApplication>
#include <QApplication>
#include "ui/mainwindow.h"
#include "version.h"
......
......@@ -29,6 +29,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "aboutpage.h"
#include "ui_aboutpage.h"
#include "ui/mainwindow.h"
#include "yubikeyfinder.h"
#include "common.h"
#include "version.h"
......
This diff is collapsed.
......@@ -43,17 +43,20 @@ public:
explicit ChalRespPage(QWidget *parent = 0);
~ChalRespPage();
enum Page {
Page_Base,
Page_Quick, //Yubico OTP
Page_Advanced //HMAC-SHA1
};
public slots:
void loadSettings();
void setCurrentPage(int pageIndex);
void setCurrentSlot(int slot);
private:
Ui::ChalRespPage *ui;
enum Page {
Page_Base,
Page_Quick, //Yubico OTP
Page_Advanced //HMAC-SHA1
};
int m_currentPage;
enum State {
......@@ -72,7 +75,6 @@ private:
private slots:
void connectPages();
void connectHelpButtons();
void setCurrentPage(int pageIndex);
void helpBtn_pressed(int helpIndex);
void keyFound(bool found, bool* featuresMatrix);
......@@ -85,10 +87,6 @@ private slots:
void on_quickProgramMulKeysBox_clicked(bool checked);
void on_quickConfigParamsCombo_currentIndexChanged(int index);
void on_quickConfigProtectionCombo_currentIndexChanged(int index);
void on_quickCurrentAccessCodeTxt_editingFinished();
void on_quickNewAccessCodeTxt_editingFinished();
void on_quickPvtIdCheck_stateChanged(int state);
void on_quickPvtIdTxt_editingFinished();
void on_quickPvtIdGenerateBtn_clicked();
......@@ -116,10 +114,6 @@ private slots:
void on_advProgramMulKeysBox_clicked(bool checked);
void on_advConfigParamsCombo_currentIndexChanged(int index);
void on_advConfigProtectionCombo_currentIndexChanged(int index);
void on_advCurrentAccessCodeTxt_editingFinished();
void on_advNewAccessCodeTxt_editingFinished();
void on_advSecretKeyTxt_editingFinished();
void on_advSecretKeyGenerateBtn_clicked();
......@@ -136,6 +130,9 @@ private slots:
void advUpdateResults(bool written, const QString &msg);
void requireInput_clicked(bool checked);
void hmac_lt64_clicked();
signals:
void showStatusMessage(const QString &text, int status = 0);
};
......
This diff is collapsed.
......@@ -28,6 +28,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ui/mainwindow.h"
#include "ui/ui_mainwindow.h"
#include "yubikeyfinder.h"
#include "yubikeywriter.h"
#include "yubikeyutil.h"
#include "ui/otppage.h"
#include "ui/oathpage.h"
#include "ui/staticpage.h"
#include "ui/chalresppage.h"
#include "ui/toolpage.h"
#include "ui/settingpage.h"
#include "ui/aboutpage.h"
#include "common.h"
#include "version.h"
......@@ -77,6 +87,16 @@ MainWindow::MainWindow(QWidget *parent) :
m_oathPage, SLOT(loadSettings()));
connect(m_settingPage, SIGNAL(settingsChanged()),
m_chalRespPage, SLOT(loadSettings()));
connect(m_settingPage, SIGNAL(settingsChanged()),
m_staticPage, SLOT(loadSettings()));
connect(m_settingPage, SIGNAL(settingsChanged()),
m_toolPage, SLOT(loadSettings()));
connect(m_toolPage, SIGNAL(reloadSettings()),
m_settingPage, SLOT(reloadSettings()));
connect(m_toolPage, SIGNAL(switchPage(int, int, int)),
this, SLOT(setCurrentPage(int, int, int)));
//Intialize settings
m_settingPage->init();
......@@ -174,7 +194,7 @@ void MainWindow::createPages() {
setCurrentPage(Page_About);
}
void MainWindow::setCurrentPage(int pageIndex) {
void MainWindow::setCurrentPage(int pageIndex, int tab, int slot) {
// Page changed...
// Clear status message
......@@ -224,21 +244,31 @@ void MainWindow::setCurrentPage(int pageIndex) {
switch(pageIndex){
case Page_Otp:
ui->otpMenuBtn->setStyleSheet(checkedMenuBtnSS);
if(tab) m_otpPage->setCurrentPage(tab);
if(slot) m_otpPage->setCurrentSlot(slot);
break;
case Page_Oath:
ui->oathHotpMenuBtn->setStyleSheet(checkedMenuBtnSS);
if(tab) m_oathPage->setCurrentPage(tab);
if(slot) m_oathPage->setCurrentSlot(slot);
break;
case Page_Static:
ui->staticMenuBtn->setStyleSheet(checkedMenuBtnSS);
if(tab) m_staticPage->setCurrentPage(tab);
if(slot) m_staticPage->setCurrentSlot(slot);
break;
case Page_ChalResp:
ui->chalRespMenuBtn->setStyleSheet(checkedMenuBtnSS);
if(tab) m_chalRespPage->setCurrentPage(tab);
if(slot) m_chalRespPage->setCurrentSlot(slot);
break;
case Page_Settings:
ui->settingsMenuBtn->setStyleSheet(checkedMenuBtnSS);
if(tab) m_settingPage->setCurrentPage(tab);
break;
case Page_Tools:
ui->toolsMenuBtn->setStyleSheet(checkedMenuBtnSS);
if(tab) m_toolPage->setCurrentPage(tab);
break;
case Page_About:
ui->aboutMenuBtn->setStyleSheet(checkedMenuBtnSS);
......
......@@ -30,15 +30,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define MAINWINDOW_H
#include <QMainWindow>
#include "ui/otppage.h"
#include "ui/oathpage.h"
#include "ui/staticpage.h"
#include "ui/chalresppage.h"
#include "ui/settingpage.h"
#include "ui/toolpage.h"
#include "ui/aboutpage.h"
#include "qtimer.h"
class ToolPage;
class OtpPage;
class OathPage;
class StaticPage;
class ChalRespPage;
class SettingPage;
class AboutPage;
class QStackedWidget;
namespace Ui {
......@@ -82,7 +83,7 @@ private:
void createPages();
private slots:
void setCurrentPage(int pageIndex);
void setCurrentPage(int pageIndex, int tab = 0, int slot = 0);
// Device Widget
void resetDeviceInfo();
......
......@@ -27,6 +27,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "oathpage.h"
#include "yubikeyutil.h"
#include "yubikeyfinder.h"
#include "yubikeywriter.h"
#include "ui_oathpage.h"
#include "ui/helpbox.h"
#include "ui/confirmbox.h"
......@@ -71,6 +74,15 @@ OathPage::OathPage(QWidget *parent) :
connect(ui->advMovingFactorSeedTxt, SIGNAL(editingFinished()),
this, SLOT(on_advMovingFactorSeedTxt_editingFinished()));
connect(ui->advHotpLen6Radio, SIGNAL(clicked()),
this, SLOT(hotpLen_clicked()));
connect(ui->advHotpLen8Radio, SIGNAL(clicked()),
this, SLOT(hotpLen_clicked()));
connect(ui->quickHotpLen6Radio, SIGNAL(clicked()),
this, SLOT(hotpLen_clicked()));
connect(ui->quickHotpLen8Radio, SIGNAL(clicked()),
this, SLOT(hotpLen_clicked()));
//Load settings
loadSettings();
......@@ -156,7 +168,6 @@ void OathPage::connectHelpButtons() {
connect(ui->advConfigHelpBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->advParamGenSchemeHelpBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->advConfigProtectionHelpBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->advPubIdHelpBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->advHotpLenHelpBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->advHotpParamsHelpBtn, SIGNAL(clicked()), mapper, SLOT(map()));
......@@ -170,7 +181,6 @@ void OathPage::connectHelpButtons() {
mapper->setMapping(ui->advConfigHelpBtn, HelpBox::Help_ConfigurationSlot);
mapper->setMapping(ui->advParamGenSchemeHelpBtn, HelpBox::Help_ParameterGeneration);
mapper->setMapping(ui->advConfigProtectionHelpBtn, HelpBox::Help_ConfigurationProtection);
mapper->setMapping(ui->advPubIdHelpBtn, HelpBox::Help_OathPublicID);
mapper->setMapping(ui->advHotpLenHelpBtn, HelpBox::Help_HotpLen);
mapper->setMapping(ui->advHotpParamsHelpBtn, HelpBox::Help_HotpParam);
......@@ -358,6 +368,12 @@ void OathPage::loadSettings() {
ui->advTTTxt->setEnabled(customerPrefixFlag);
ui->advExportConfigBtn->setVisible(settings.value(SG_EXPORT_PREFERENCE).toBool());
bool hotp8 = settings.value(SG_OATH_HOTP8).toBool();
ui->advHotpLen6Radio->setChecked(!hotp8);
ui->quickHotpLen6Radio->setChecked(!hotp8);
ui->advHotpLen8Radio->setChecked(hotp8);
ui->quickHotpLen8Radio->setChecked(hotp8);
}
/*
......@@ -371,7 +387,6 @@ void OathPage::resetQuickPage() {
}
ui->quickPubIdCheck->setChecked(true);
ui->quickHotpLen6Radio->setChecked(true);
on_quickResetBtn_clicked();
}
......@@ -526,7 +541,7 @@ void OathPage::writeQuickConfig() {
YubiKeyWriter::getInstance()->writeConfig(m_ykConfig);
}
void OathPage::quickConfigWritten(bool written, const QString &msg) {
void OathPage::quickConfigWritten(bool written, __attribute__((unused)) const QString &msg) {
disconnect(YubiKeyWriter::getInstance(), SIGNAL(configWritten(bool, const QString &)),
this, SLOT(quickConfigWritten(bool, const QString &)));
......@@ -567,7 +582,7 @@ void OathPage::resetAdvPage() {
ui->advAutoProgramKeysCheck->setChecked(false);
ui->advProgramMulKeysBox->setChecked(false);
ui->advConfigProtectionCombo->setCurrentIndex(0);
ui->advConfigProtectionBox->reset();