Commit 35a054dc authored by Klas Lindfors's avatar Klas Lindfors

Imported Upstream version 3.1.0

parent a877273d
YKPersonalization.pro.user
Makefile
Makefile.Release
Makefile.Debug
src/ui/ui_*.h
build/
deps/
libs/
object_script.yubikey-personalization-gui.Debug
object_script.yubikey-personalization-gui.Release
This diff is collapsed.
yubikey-personalization-gui NEWS -- History of user-visible changes. -*- outline -*-
* Version 3.1.0 (released 2012-09-28)
** Support for features in YubiKey 2.3.
Requires updating the ykpers library to version 1.8.0.
** Support for writing NDEF of YubiKey NEO.
** Removes the dj prefix that was added for customer prefixes.
** Support for entering customer prefix in modhex or hex as well, show all
formats.
** Option to allow public id to be based on key serial.
** View for testing out challenge response with YubiKey.
** Autosave settings when changing.
** Don't write HMAC-SHA1 without variable input on 2.2 key.
** Oath IMF is set as direct number, not as what was entered * 16, also
use higher ceiling for this.
** New windows installer based on nsis.
** New pictures, and changing picture depending on YubiKey version.
* Version 3.0.6 (released 2012-06-07)
** Bump copyright years.
......
......@@ -54,6 +54,9 @@ appears to not be needed for command-line builds.)
Dependencies
============
yubikey-personalization-gui depends on atleast version 1.8.0 of
libykpers.
When building on Windows you will need binary releases of libykpers
and libyubikey, these can be downloaded from
http://code.google.com/p/yubikey-personalization/, the dlls
......@@ -82,6 +85,33 @@ Run these commands:
qmake
make
==========================
Cross Compiling from Linux
==========================
The project can be cross compiled from linux for osX and windows. As
a first step you need a cross-compiler chain for that OS, for windows
you want mingw-w64 and for osX you can follow directions at
https://github.com/Tatsh/xchain/.
Then you need unpacked qt binaries for that platform, fetchable
from http://qt-project.org/.
You can then do (for windows):
TARGET_ARCH=i686-w64-mingw32 QTDIR=<qt location> qmake \
-spec win32-g++-4.6 "CONFIG+=cross"
or (for osX):
TARGET_ARCH=x86_64-apple-darwin11 OSX_SDK=<osx sdk location> \
QT_LIBDIR=<qt libs> QT_PLUGINDIR=<qt plugins> qmake -spec macx-g++ \
"CONFIG +=cross"
Note that you need to point QT_LIBDIR and QT_PLUGINDIR at the
/Library/Frameworks directory of the unpacked distribution.
To build installers you can add build_installer to the CONFIG variable
for qmake. This requires makensis to be in path for windows and
genisoimage and dmg (from libhfs-dmg) for mac.
==================================
Opening the project in Qt designer
......
This diff is collapsed.
......@@ -17,6 +17,16 @@ if ! head -3 NEWS | grep -q "Version $VERSION .released `date -I`"; then
exit
fi
if ! head -5 YKPersonalization.pro | grep -q "VERSION.*= \"$VERSION\""; then
echo "You need to update version in YKPersonalization.pro"
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
releasename=yubikey-personalization-gui-${VERSION}
git push
......
!include "MUI.nsh"
; The name of the installer
Name "YubiKey Personalization Tool"
; The file to write
OutFile "../../build/release/yubikey-personalization-gui-${YKPERS_VERSION}.exe"
; The default installation directory
InstallDir "$PROGRAMFILES\Yubico\YubiKey Personalization Tool"
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\Yubico\yubikey-personalization-gui" "Install_Dir"
SetCompressor /SOLID lzma
ShowInstDetails show
Var MUI_TEMP
Var STARTMENU_FOLDER
Function .onInit
# Display splash image.
InitPluginsDir
File /oname=$PLUGINSDIR\splash.bmp "yubico_logo.bmp"
advsplash::show 1000 600 400 0x04025C $PLUGINSDIR\splash
Pop $0
Delete $PLUGINSDIR\splash.bmp
FunctionEnd
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
; Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "../../COPYING"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Yubico\YubiKey Personalization Tool"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
Section "YubiKey Personalization Tool"
SectionIn RO
SetOutPath $INSTDIR
FILE ../../build/release/yubikey-personalization-gui.exe
FILE ../../build/release/libyubikey-0.dll
FILE ../../build/release/libykpers-1-1.dll
FILE ../../build/release/QtCore4.dll
FILE ../../build/release/QtGui4.dll
FILE ../../build/release/libgcc_s_dw2-1.dll
FILE ../../build/release/mingwm10.dll
SetOutPath $INSTDIR\imageformats
FILE ../../build/release/qgif4.dll
SectionEnd
Var MYTMP
# Last section is a hidden one.
Section
WriteUninstaller "$INSTDIR\uninstall.exe"
; Write the installation path into the registry
WriteRegStr HKLM "Software\Yubico\yubikey-personalization-gui" "Install_Dir" "$INSTDIR"
# Windows Add/Remove Programs support
StrCpy $MYTMP "Software\Microsoft\Windows\CurrentVersion\Uninstall\yubikey-personalization-gui"
WriteRegStr HKLM $MYTMP "DisplayName" "YubiKey Personalization Tool"
WriteRegExpandStr HKLM $MYTMP "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegExpandStr HKLM $MYTMP "InstallLocation" "$INSTDIR"
WriteRegStr HKLM $MYTMP "DisplayVersion" "${YKPERS_VERSION}"
WriteRegStr HKLM $MYTMP "Publisher" "Yubico AB"
WriteRegStr HKLM $MYTMP "URLInfoAbout" "http://www.yubico.com"
WriteRegDWORD HKLM $MYTMP "NoModify" "1"
WriteRegDWORD HKLM $MYTMP "NoRepair" "1"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\YubiKey Personalization Tool.lnk" "$INSTDIR\yubikey-personalization-gui.exe" "" "$INSTDIR\yubikey-personalization-gui.exe" 0
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 1
WriteINIStr "$SMPROGRAMS\$STARTMENU_FOLDER\Yubico Web page.url" \
"InternetShortcut" "URL" "http://www.yubico.com/"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\yubikey-personalization-gui"
DeleteRegKey HKLM "Software\Yubico\yubikey-personalization-gui"
DELETE "$INSTDIR\yubikey-personalization-gui.exe"
DELETE "$INSTDIR\libyubikey-0.dll"
DELETE "$INSTDIR\libykpers-1-1.dll"
DELETE "$INSTDIR\QtCore4.dll"
DELETE "$INSTDIR\QtGui4.dll"
DELETE "$INSTDIR\libgcc_s_dw2-1.dll"
DELETE "$INSTDIR\libgcc_s_sjlj-1.dll"
DELETE "$INSTDIR\libstdc++-6.dll"
DELETE "$INSTDIR\mingwm10.dll"
DELETE "$INSTDIR\imageformats\qgif4.dll"
RMDir "$INSTDIR\imageformats"
; Remove uninstaller
Delete $INSTDIR\uninstall.exe
; Remove shortcuts, if any
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\Yubico Web page.url"
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors startMenuDeleteLoopDone
StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
startMenuDeleteLoopDone:
DeleteRegKey /ifempty HKCU "Software\Yubico\yubikey-personalization-gui"
; Remove directories used
RMDir "$INSTDIR"
SectionEnd
resources/images/logo.png

3.77 KB | W: | H:

resources/images/logo.png

30.5 KB | W: | H:

resources/images/logo.png
resources/images/logo.png
resources/images/logo.png
resources/images/logo.png
  • 2-up
  • Swipe
  • Onion skin
[Paths]
Plugins = PlugIns
......@@ -5,10 +5,15 @@
<file>images/recommend.png</file>
<file>images/right.png</file>
<file>images/tick.png</file>
<file>images/yk.png</file>
<file>win/Yubico.ico</file>
<file>images/clipboard.png</file>
<file>images/blank.png</file>
<file>images/logo.png</file>
<file>images/v1-3-not-animated.png</file>
<file>images/V2-0-2-1-animated.gif</file>
<file>images/v2-2-animated.gif</file>
<file>images/v2-3-animated.gif</file>
<file>images/neo_transparent.png</file>
<file>images/yubikey_devel.png</file>
</qresource>
</RCC>
......@@ -44,11 +44,13 @@ typedef std::vector<int>::size_type size_t;
#define SCHEME_INCR_ID_RAND_SECRET 0
#define SCHEME_RAND_SECRET 0
#define SCHEME_RAND_ALL 1
#define SCHEME_ID_FROM_SERIAL_RAND_SECRET 2
#define SCHEME_FIXED 2
#define GEN_SCHEME_FIXED 0
#define GEN_SCHEME_INCR 1
#define GEN_SCHEME_RAND 2
#define GEN_SCHEME_SERIAL 3
#define CONFIG_PROTECTION_DISABLED 0
#define CONFIG_PROTECTION_ENABLE 1
......@@ -86,8 +88,8 @@ typedef std::vector<int>::size_type size_t;
#define SS_COPY_BTN "background-image: url(:/res/images/clipboard.png); border-radius: 2px;"
#define SS_BLANK_BTN "background-image: url(:/res/images/blank.png); border-radius: 2px;"
#define SS_LINK_ENABLED "font: 12px \"Verdana\"; text-decoration: underline; color: rgb(5, 67, 168);"
#define SS_LINK_DISABLED "font: 12px \"Verdana\"; text-decoration: underline; color: rgb(118,116,108);"
#define SS_LINK_ENABLED "font: 12px \"Verdana\"; text-decoration: underline; text-align: left; color: rgb(5, 67, 168);"
#define SS_LINK_DISABLED "font: 12px \"Verdana\"; text-decoration: underline; text-align: left; color: rgb(118,116,108);"
//Messages
......@@ -111,6 +113,7 @@ typedef std::vector<int>::size_type size_t;
#define ERR_FIRMWARE_NOT_SUPPORTED tr("This YubiKey firmware version is not supported")
#define ERR_PROCESSING tr("YubiKey could not be configured. Perhaps protected with configuration protection access code?")
#define ERR_CONF_SLOT_NOT_SELECTED tr("No configuration slot selected. Please select the configuration slot to be programmed")
#define ERR_CHAL_TYPE_NOT_SELECTED tr("No Challenge-Response Type selected. Please select the one to use")
//Warnings
......@@ -152,6 +155,10 @@ typedef std::vector<int>::size_type size_t;
#define SG_MAN_UPDATE "Flag/ManUpdate"
#define SG_ALLOW_UPDATE "Flag/AllowUpdate"
#define SG_FAST_TRIG "Flag/FastTrig"
#define SG_USE_NUMERIC_KEYPAD "Flag/UseNumericKeypad"
#define SG_OVERWRITE_CONF_SLOT1 "DontAsk/Slot1Overwriting"
#define SG_DIFF_PUBLIC_ID_LEN "DontAsk/PublicIdLen"
#define SG_ENABLE_CONF_PROTECTION "DontAsk/ConfProtection"
......@@ -190,4 +197,9 @@ typedef std::vector<int>::size_type size_t;
#define HELP_CHALRESP_OPTION tr("<p>If this option is selected, when a client-side interface software presents a Challenge to the YubiKey, the light starts flashing and the user has to touch the YubiKey button to acknowledge the challenge-response operation before the computed Response is sent back.</p>")
#define HELP_ALLOW_UPDATE_OPTION tr("<p>If this option is selected the YubiKey configuration will be updatable, without rewriting the aes-key. Only non-security related settings are changeable with this.</p>")
#define HELP_SWAP_OPTION tr("<p>If both slots are configured to allow updates they can be swapped with this option. That is slot 1 and slot 2 will change places.</p>")
#define HELP_MAN_UPDATE_OPTION tr("<p>The manual update setting is to allow the static password in the YubiKey to be changed without reprogramming the key. If it is set it can be triggered by holding the button for 10 seconds, releasing and then tapping it again, the YubiKey will then generate a new static password.</p>")
#endif // COMMON_H
......@@ -28,9 +28,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QtGui/QApplication>
#include "ui/mainwindow.h"
#include "version.h"
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
a.setOrganizationName(VER_COMPANYNAME_STR);
a.setOrganizationDomain(VER_COMPANYDOMAIN_STR);
a.setApplicationName(VER_PRODUCTNAME_STR);
MainWindow w;
w.show();
......
......@@ -46,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define MAX_YUBICO_SERIAL 0x00ffffffUL
#define MAX_OATH_SERIAL 99999UL
#define YUBICO_OTP_CUSTOMER_PREFIX_CODE 0x28
#define OATH_HOTP_CUSTOMER_PREFIX_START 190
// openauthentication.org assigned manufacturer prefix
......
......@@ -83,12 +83,14 @@ void AboutPage::connectButtons() {
connect(ui->oathBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->staticBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->chalRespBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->settingsBtn, SIGNAL(clicked()), mapper, SLOT(map()));
//Set a value for each button
mapper->setMapping(ui->otpBtn, MainWindow::Page_Otp);
mapper->setMapping(ui->oathBtn, MainWindow::Page_Oath);
mapper->setMapping(ui->staticBtn, MainWindow::Page_Static);
mapper->setMapping(ui->chalRespBtn, MainWindow::Page_ChalResp);
mapper->setMapping(ui->settingsBtn, MainWindow::Page_Settings);
//Connect the mapper
connect(mapper, SIGNAL(mapped(int)), this, SLOT(btn_pressed(int)));
......
......@@ -56,7 +56,7 @@ border-radius: 5px;</string>
<rect>
<x>71</x>
<y>121</y>
<width>106</width>
<width>168</width>
<height>23</height>
</rect>
</property>
......@@ -81,6 +81,7 @@ border-radius: 5px;</string>
<property name="styleSheet">
<string notr="true">font: 12px &quot;Verdana&quot;;
text-decoration: underline;
text-align: left;
color: rgb(5, 67, 168);</string>
</property>
<property name="text">
......@@ -129,6 +130,7 @@ color: rgb(5, 67, 168);</string>
<property name="styleSheet">
<string notr="true">font: 12px &quot;Verdana&quot;;
text-decoration: underline;
text-align: left;
color: rgb(5, 67, 168);</string>
</property>
<property name="text">
......@@ -149,7 +151,7 @@ color: rgb(5, 67, 168);</string>
<rect>
<x>70</x>
<y>181</y>
<width>139</width>
<width>168</width>
<height>23</height>
</rect>
</property>
......@@ -174,6 +176,7 @@ color: rgb(5, 67, 168);</string>
<property name="styleSheet">
<string notr="true">font: 12px &quot;Verdana&quot;;
text-decoration: underline;
text-align: left;
color: rgb(5, 67, 168);</string>
</property>
<property name="text">
......@@ -194,7 +197,7 @@ color: rgb(5, 67, 168);</string>
<rect>
<x>71</x>
<y>151</y>
<width>110</width>
<width>168</width>
<height>23</height>
</rect>
</property>
......@@ -219,6 +222,7 @@ color: rgb(5, 67, 168);</string>
<property name="styleSheet">
<string notr="true">font: 12px &quot;Verdana&quot;;
text-decoration: underline;
text-align: left;
color: rgb(5, 67, 168);</string>
</property>
<property name="text">
......@@ -301,7 +305,7 @@ color: rgb(5, 67, 168);</string>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(122, 171, 32);</string>
<string notr="true">background-color: rgb(140, 192, 65);</string>
</property>
<property name="lineWidth">
<number>1</number>
......@@ -322,7 +326,7 @@ color: rgb(5, 67, 168);</string>
<property name="styleSheet">
<string notr="true">font: 18px &quot;Verdana&quot;;
font-weight: bold;
color: rgb(122, 171, 32);</string>
color: rgb(140, 192, 65);</string>
</property>
<property name="text">
<string>The Swiss Army Knife for the YubiKey</string>
......@@ -341,7 +345,7 @@ color: rgb(122, 171, 32);</string>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(122, 171, 32);</string>
<string notr="true">background-color: rgb(140, 192, 65);</string>
</property>
<property name="lineWidth">
<number>1</number>
......@@ -448,7 +452,7 @@ color: rgb(118, 116, 108);</string>
<property name="geometry">
<rect>
<x>20</x>
<y>260</y>
<y>290</y>
<width>385</width>
<height>20</height>
</rect>
......@@ -461,7 +465,7 @@ color: rgb(118, 116, 108);</string>
<property name="geometry">
<rect>
<x>410</x>
<y>259</y>
<y>289</y>
<width>131</width>
<height>20</height>
</rect>
......@@ -502,6 +506,71 @@ color: rgb(5, 67, 168);</string>
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="right5">
<property name="geometry">
<rect>
<x>33</x>
<y>241</y>
<width>24</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../resources/resources.qrc">:/res/images/right.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QPushButton" name="settingsBtn">
<property name="geometry">
<rect>
<x>70</x>
<y>241</y>
<width>168</width>
<height>23</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">font: 12px &quot;Verdana&quot;;
text-decoration: underline;
text-align: left;
color: rgb(5, 67, 168);</string>
</property>
<property name="text">
<string>Update Settings</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</widget>
</widget>
<tabstops>
......@@ -509,6 +578,7 @@ color: rgb(5, 67, 168);</string>
<tabstop>oathBtn</tabstop>
<tabstop>staticBtn</tabstop>
<tabstop>chalRespBtn</tabstop>
<tabstop>settingsBtn</tabstop>
</tabstops>
<resources>
<include location="../../resources/resources.qrc"/>
......
......@@ -31,7 +31,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ui/helpbox.h"
#include "ui/confirmbox.h"
#include <QDesktopServices>
#include "common.h"
ChalRespPage::ChalRespPage(QWidget *parent) :
......@@ -188,6 +187,12 @@ void ChalRespPage::keyFound(bool found, bool* featuresMatrix) {
ui->quickConfigSlot2Radio->setEnabled(true);
ui->advConfigSlot2Radio->setEnabled(true);
}
if(!featuresMatrix[YubiKeyFinder::Feature_ChallengeResponseFixed]) {
ui->advHmacFixedInputRadio->setEnabled(false);
ui->advHmacVarInputRadio->setChecked(true);
} else {
ui->advHmacFixedInputRadio->setEnabled(true);
}
if(!featuresMatrix[YubiKeyFinder::Feature_ChallengeResponse]) {
this->setEnabled(false);
......@@ -211,6 +216,7 @@ void ChalRespPage::keyFound(bool found, bool* featuresMatrix) {
} else {
ui->quickWriteConfigBtn->setEnabled(false);
ui->advWriteConfigBtn->setEnabled(false);
ui->advHmacFixedInputRadio->setEnabled(true);
if(m_state == State_Initial) {
ui->quickConfigSlot2Radio->setEnabled(true);
......@@ -406,7 +412,7 @@ void ChalRespPage::on_quickStopBtn_clicked() {
}
void ChalRespPage::stopQuickConfigWritting() {
qDebug() << "Stopping quick confgiuration writing...";
qDebug() << "Stopping quick configuration writing...";
if(m_state >= State_Programming_Multiple) {
ui->quickStopBtn->setEnabled(true);
......@@ -771,7 +777,7 @@ void ChalRespPage::on_advStopBtn_clicked() {
}
void ChalRespPage::stopAdvConfigWritting() {
qDebug() << "Stopping adv confgiuration writing...";
qDebug() << "Stopping adv configuration writing...";
if(m_state >= State_Programming_Multiple) {
ui->advStopBtn->setEnabled(true);
......@@ -786,11 +792,15 @@ void ChalRespPage::stopAdvConfigWritting() {
}
void ChalRespPage::changeAdvConfigParams() {
//Secret Key...
QString secretKeyTxt = YubiKeyUtil::getNextHex(
int index = ui->advConfigParamsCombo->currentIndex();
// else we use a static secret.
if(index == SCHEME_INCR_ID_RAND_SECRET) {
//Secret Key...
QString secretKeyTxt = YubiKeyUtil::getNextHex(
KEY_SIZE_OATH * 2,
ui->advSecretKeyTxt->text(), GEN_SCHEME_RAND);
ui->advSecretKeyTxt->setText(secretKeyTxt);
ui->advSecretKeyTxt->setText(secretKeyTxt);
}
on_advSecretKeyTxt_editingFinished();
m_ready = true;
}
......
......@@ -45,7 +45,7 @@ color: rgb(0, 0, 0);</string>
<property name="styleSheet">
<string notr="true">font: 18px &quot;Verdana&quot;;
font-weight: bold;
color: rgb(122, 171, 32);</string>
color: rgb(140, 192, 65);</string>
</property>
<property name="text">
<string>Program in Challenge-Response mode</string>
......@@ -266,7 +266,7 @@ border-radius: 10px;
<property name="styleSheet">
<string notr="true">font: 18px &quot;Verdana&quot;;
font-weight: bold;
color: rgb(122, 171, 32);</string>
color: rgb(140, 192, 65);</string>
</property>
<property name="text">
<string>Program in Challenge-Response mode - Yubico OTP</string>
......@@ -1268,7 +1268,7 @@ color: rgb(0, 0, 0);</string>
<property name="styleSheet">
<string notr="true">font: 18px &quot;Verdana&quot;;
font-weight: bold;
color: rgb(122, 171, 32);</string>
color: rgb(140, 192, 65);</string>
</property>
<property name="text">
<string>Program in Challenge-Response mode - HMAC-SHA1</string>
......@@ -1817,6 +1817,11 @@ font-weight: bold;</string>
<string>Randomize Secret</string>
</property>
</item>
<item>
<property name="text">
<string>Same Secret for all Keys</string>
</property>
</item>
</widget>
</widget>
<widget class="QGroupBox" name="advKeyParamsBox">
......
......@@ -111,6 +111,18 @@ void HelpBox::setHelpIndex(Help helpIndex) {
title = tr("Challenge-Response Options");
helpMsg = HELP_CHALRESP_OPTION;
break;
case Help_AllowUpdate:
title = tr("Allow Update");
helpMsg = HELP_ALLOW_UPDATE_OPTION;
break;
case Help_Swap:
title = tr("Swap");
helpMsg = HELP_SWAP_OPTION;
break;
case Help_ManUpdate:
title = tr("Manual Update");
helpMsg = HELP_MAN_UPDATE_OPTION;
break;
default:
helpMsg = tr("");
......
......@@ -59,6 +59,9 @@ public:
Help_ChalRespYubico,
Help_ChalRespHmac,
Help_ChalRespOption,
Help_AllowUpdate,
Help_Swap,
Help_ManUpdate,
};
void setHelpIndex(Help helpIndex);
......
......@@ -260,6 +260,10 @@ void MainWindow::resetDeviceInfo() {
ui->scanCodeSupportLbl->setText(NA);
ui->chalRespSupportLbl->setPixmap(NULL);
ui->chalRespSupportLbl->setText(NA);
ui->updatableSupportLbl->setPixmap(NULL);
ui->updatableSupportLbl->setText(NA);
ui->ndefSupportLbl->setPixmap(NULL);
ui->ndefSupportLbl->setText(NA);
}
void MainWindow::keyFound(bool found, bool* featuresMatrix) {
......@@ -272,10 +276,38 @@ void MainWindow::keyFound(bool found, bool* featuresMatrix) {
resetDeviceInfo();
if(found) {
YubiKeyFinder *finder = YubiKeyFinder::getInstance();
unsigned int version = finder->version();
ui->statusLbl->setText(KEY_FOUND);
ui->statusLbl->setStyleSheet(QString::fromUtf8(SS_YKSTATUS_SUCCESS));
ui->versionLbl->setText(YubiKeyFinder::getInstance()->versionStr());
ui->versionLbl->setText(finder->versionStr());
qDebug() << "version is" << finder->versionStr();
QPixmap pixmap;
QMovie *movie = new QMovie();
if(version < YK_VERSION(2,0,0)) {
pixmap.load(":/res/images/v1-3-not-animated.png");
} else if(version < YK_VERSION(2,1,4)) {
movie->setFileName(":/res/images/V2-0-2-1-animated.gif");
} else if(version < YK_VERSION(2,2,0)) {
// YubiKey NEO
pixmap.load(":/res/images/neo_transparent.png");
} else if(version % 10 == 9){
pixmap.load(":/res/images/yubikey_devel.png");
} else if(version < YK_VERSION(2,3,0)){
movie->setFileName(":/res/images/v2-2-animated.gif");
} else {
movie->setFileName(":/res/images/v2-3-animated.gif");
}
if(pixmap.isNull()) {
ui->deviceImage->setMovie(movie);