Imported Upstream version 3.1.17

parent 27b74e3f
2014-10-30 Klas Lindfors <klas@yubico.com>
* NEWS: NEWS for 3.1.17
2014-10-30 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro, resources/mac/Info.plist.in: add so a build
number can be set for osX builds
2014-10-30 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: try to get by with codesign --deep
2014-10-30 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: more mac fixups
2014-10-30 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: switch mac build to qt5
2014-10-29 Henrik Stråth <minisu@users.noreply.github.com>
* README: Update README
2014-10-29 Henrik Stråth <minisu@users.noreply.github.com>
* README: Update README
2014-10-29 Henrik Stråth <minisu@users.noreply.github.com>
* README: Update README
2014-10-29 Henrik Stråth <minisu@users.noreply.github.com>
* README: Update README
2014-10-29 Henrik Stråth <henrik@yubico.com>
* README.adoc: symlinked README
2014-10-23 Christian Hesse <mail@eworm.de>
* src/ui/mainwindow.cpp, src/ui/mainwindow.ui,
src/yubikeyfinder.cpp, src/yubikeyfinder.h: show U2F in supported
features
2014-10-23 Klas Lindfors <klas@yubico.com>
* src/common.h, src/help.h, src/ui/aboutpage.cpp,
src/ui/chalresppage.cpp, src/ui/confirmbox.cpp, src/ui/helpbox.cpp,
src/ui/mainwindow.cpp, src/ui/oathpage.cpp, src/ui/otppage.cpp,
src/ui/settingpage.cpp, src/ui/staticpage.cpp, src/ui/toolpage.cpp,
src/version.h, src/yubikeywriter.cpp: restructure to get rid of
lupdate warnings for translations relates to #42
2014-10-23 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro, installer/win-nsis/ykpers.nsi: include the
qtaccessiblewidgets plugin when bundling fixes #43
2014-10-23 Klas Lindfors <klas@yubico.com>
* src/yubikeylogger.h: Q_OBJECT has to be declared before public.. fixes #44
2014-10-22 Klas Lindfors <klas@yubico.com>
* src/yubikeylogger.cpp: add another tr()
2014-10-22 Klas Lindfors <klas@yubico.com>
* src/yubikeylogger.h: add forgotten Q_OBJECT macro to yubikeylogger
2014-10-01 Klas Lindfors <klas@yubico.com>
* src/yubikeylogger.cpp, src/yubikeylogger.h: add two new logfields,
accesscodes padded out with 12 characters to be used for the Yubico format that specifies that the access code
is always 12 characters, zeroes if unset. fixes #41
2014-09-16 Klas Lindfors <klas@yubico.com>
* NEWS, YKPersonalization.pro: bump versions
2014-09-16 Klas Lindfors <klas@yubico.com>
* NEWS: 3.1.16
......
yubikey-personalization-gui NEWS -- History of user-visible changes. -*- outline -*-
* Version 3.1.17 (released 2014-10-30)
** Fixup the Yubico logformat so accesscode is padded out with 0
** Make texts translatable.
** Include the accessibility plugin in bundles.
** Show U2F as a feature.
** Switch the mac bundle to qt5.
* Version 3.1.16 (released 2014-09-16)
** Fix bug where no random numbers where generated on windows.
......
......@@ -7,12 +7,12 @@ Introduction
The YubiKey Personalization Tool is a Qt based Cross-Platform utility
designed to facilitate re-configuration of YubiKeys on Windows, Linux
and MAC platforms. The tool provides a same simple step-by-step
and Mac platforms. The tool provides a same simple step-by-step
approach to make configuration of YubiKeys easy to follow and
understand, while still being powerful enough to exploit all
functionality both of the YubiKey 1 and YubiKey 2 generation of
keys. The tool provides the same functionality and user interface on
Windows, Linux and MAC platforms.
Windows, Linux and Mac platforms.
The Cross-Platform YubiKey Personalization Tool provides the following
main functions:
......@@ -50,8 +50,8 @@ Dependencies
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,
that can be downloaded from http://code.google.com/p/yubikey-personalization/,
When building on Windows and mac you will need a binary buikd of
https://developers.yubico.com/yubikey-personalization[yubikey-personalization],
the contents should then be places in libs/win32, libs/win64 and libs/macx
respectively.
......@@ -74,20 +74,19 @@ Run these commands:
Cross Compiling from Linux
--------------------------
The project can be cross compiled from linux for osX and windows. As
The project can be cross compiled from linux for OS X and Windows. As
a first step you need a cross-compiler chain for that OS, for windows
you want mingw-w64.
Then you need unpacked qt binaries for that platform, fetchable
from http://qt-project.org/.
Then you need unpacked http://qt-project.org[Qt binaries] for that platform.
You can then do (for windows):
You can then do (for Windows):
TARGET_ARCH=i686-w64-mingw32 QTDIR=<qt location> qmake \
-spec win32-g++-4.6 "CONFIG+=cross"
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.
genisoimage and dmg (from libhfs-dmg) for Mac.
Opening the project in Qt designer
......@@ -96,40 +95,35 @@ Opening the project in Qt designer
Locate the qtcreator executable file and click on it to open the Qt
Designer.
To open the project in Qt Designer, select "File" > "Open File or
Project" from the tool bar, navigate to the project folder, select
YKPersonalisation.pro file and click on the "Open" button.
To open the project in Qt Designer, select 'File' > 'Open File or
Project' from the tool bar, navigate to the project folder, select
YKPersonalisation.pro file and click on the 'Open' button.
To set the path of the "Build" diractory select "Projects" > "Build
Settings" Browse project folder path.
To set the path of the 'Build' diractory select 'Projects' > 'Build
Settings' Browse project folder path.
Building
~~~~~~~~
--------
To generate the build system, select "Build" > "Clean Project
YKPersonalization" option from the tool bar. Then select "Build" >
"Run qmake" option from the tool bar.
To generate the build system, select 'Build' > "Clean Project
YKPersonalization" option from the tool bar. Then select 'Build' >
'Run qmake' option from the tool bar.
To build the project, select "Build" > "Build Project
YKPersonalization" option from the tool bar.
To build the project, select 'Build' > 'Build Project
YKPersonalization' option from the tool bar.
Based on your platform, the successful build will create a "YubiKey
Personalization Tool" executable file into the respective build
folder. The build creates a "YKPersonalization.exe" file on Windows,
"YubiKey Personalization Tool.sh" file on Linux and "YubiKey
Personalization Tool.app" file on MAC.
Based on your platform, the successful build will create a 'YubiKey
Personalization Tool' executable file into the respective build
folder. The build creates a `YKPersonalization.exe` file on Windows,
`YubiKey Personalization Tool.sh` file on Linux and `YubiKey
Personalization Tool.app` file on Mac.
Example on Linux:
To run the YubiKey Personalization Tool, open the command shell and
execute the following command:
[source, sh]
-----------
$ build/release/yubikey-personalization-gui
-----------
Questions?
----------
Talk to <yubico-devel@googlegroups.com>.
README
\ No newline at end of file
This diff is collapsed.
......@@ -76,6 +76,8 @@ Section "YubiKey Personalization Tool"
FILE /r ../../build/release/licenses/
SetOutPath $INSTDIR\imageformats
FILE ../../build/release/qmng.dll
SetOutPath $INSTDIR\accessible
FILE ../../build/release/qtaccessiblewidgets.dll
SetOutPath $INSTDIR\platforms
FILE ../../build/release/qwindows.dll
SectionEnd
......@@ -136,10 +138,12 @@ Section "Uninstall"
DELETE "$INSTDIR\icudt52.dll"
DELETE "$INSTDIR\licenses\*"
DELETE "$INSTDIR\imageformats\qmng.dll"
DELETE "$INSTDIR\accessible\qtaccessiblewidgets.dll"
DELETE "$INSTDIR\platforms\qwindows.dll"
RMDir "$INSTDIR\licenses"
RMDir "$INSTDIR\imageformats"
RMDir "$INSTDIR\accessible"
RMDir "$INSTDIR\platforms"
; Remove uninstaller
......
......@@ -17,7 +17,7 @@
<key>CFBundleVersion</key>
<string>@@version@@</string>
<key>CFBundleShortVersionString</key>
<string>@@version@@</string>
<string>@@version@@-@@build@@</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
</dict>
......
......@@ -57,8 +57,8 @@ enum AccMode {
#define WRITE_CONFIG 0
#define EXPORT_CONFIG 1
#define SUPPORT_LINK tr("http://yubi.co/forum")
#define UPLOAD_URL tr("<!doctype html><html><head><title>upload</title></head><body><form action='https://upload.yubico.com/' method='post' id='upload'>serial:<input name='serial' value='%1'/><br/>prefix:<input name='prefix' value='%2'/><br/>uid:<input name='uid' value='%3'/><br/>aeskey:<input name='aeskey' value='%4'/><br/><input type='submit'/><br/></form><script type='text/javascript'>window.onload=function(){document.getElementById('upload').submit();}</script></body></html>")
#define SUPPORT_LINK "http://yubi.co/forum"
#define UPLOAD_URL "<!doctype html><html><head><title>upload</title></head><body><form action='https://upload.yubico.com/' method='post' id='upload'>serial:<input name='serial' value='%1'/><br/>prefix:<input name='prefix' value='%2'/><br/>uid:<input name='uid' value='%3'/><br/>aeskey:<input name='aeskey' value='%4'/><br/><input type='submit'/><br/></form><script type='text/javascript'>window.onload=function(){document.getElementById('upload').submit();}</script></body></html>"
#define ERR_NOERROR 0
#define ERR_OTHER 1
......@@ -93,50 +93,49 @@ enum AccMode {
//Messages
#define SUCCESS tr("Success")
#define ERR tr("Error")
#define NA tr("N/A")
#define TOVERFLOW tr("Overflow")
#define KEY_FOUND tr("YubiKey is inserted")
#define NO_KEY_FOUND tr("No YubiKey inserted")
#define MORE_THAN_ONE tr("More than one\nYubiKey inserted")
#define OTHER_ERROR tr("Unknown error occurred")
#define UNKNOWN_FIRMWARE tr("Unknown firmware")
#define KEY_CONFIGURED tr("YubiKey%1 has been successfully configured")
#define KEY_EXPORTED tr("YubiKey configuration has been successfully exported")
#define REMOVE_KEY tr("Please remove this YubiKey")
#define SETTINGS_SAVED tr("Settings have been successfully saved")
#define SETTINGS_RESTORED tr("Default settings have been restored")
#define VALUE_COPIED tr("Value copied to clipboard")
#define ERR_KEY_NOT_FOUND tr("YubiKey not found. Please insert YubiKey in USB port")
#define ERR_FEATURE_NOT_SUPPORTED tr("Selected configuration is not supported by the YubiKey being programmed")
#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_PROCESSING_CHALRESP tr("Challenge response could not be performed. Perhaps the YubiKey is not configured for challenge-response?")
#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")
#define ERR "Error"
#define NA "N/A"
#define TOVERFLOW "Overflow"
#define KEY_FOUND "YubiKey is inserted"
#define NO_KEY_FOUND "No YubiKey inserted"
#define MORE_THAN_ONE "More than one\nYubiKey inserted"
#define OTHER_ERROR "Unknown error occurred"
#define UNKNOWN_FIRMWARE "Unknown firmware"
#define KEY_CONFIGURED "YubiKey%1 has been successfully configured"
#define KEY_EXPORTED "YubiKey configuration has been successfully exported"
#define REMOVE_KEY "Please remove this YubiKey"
#define SETTINGS_SAVED "Settings have been successfully saved"
#define SETTINGS_RESTORED "Default settings have been restored"
#define VALUE_COPIED "Value copied to clipboard"
#define ERR_KEY_NOT_FOUND "YubiKey not found. Please insert YubiKey in USB port"
#define ERR_FEATURE_NOT_SUPPORTED "Selected configuration is not supported by the YubiKey being programmed"
#define ERR_FIRMWARE_NOT_SUPPORTED "This YubiKey firmware version is not supported"
#define ERR_PROCESSING "YubiKey could not be configured. Perhaps protected with configuration protection access code?"
#define ERR_PROCESSING_CHALRESP "Challenge response could not be performed. Perhaps the YubiKey is not configured for challenge-response?"
#define ERR_CONF_SLOT_NOT_SELECTED "No configuration slot selected. Please select the configuration slot to be programmed"
#define ERR_CHAL_TYPE_NOT_SELECTED "No Challenge-Response Type selected. Please select the one to use"
//Warnings
#define OVERWRITE_CONF_SLOT1 tr("Overwrite configuration slot 1?")
#define WARN_OVERWRITE_CONF_SLOT1 tr("If you have a YubiKey VIP, this slot should contain a Symantec VIP credential by default. You should refrain from rewriting this Slot as a Symantec VIP credential can only be programmed during manufacture - you will thus not be able to get a new one.\n\nIf you have any other YubiKey, this slot should contain a Yubico OTP credential by default. This credential is required for using the YubiKey with many of our services and that of our partners. If you overwrite this and want to use it again later, you will need to reprogram it and upload the new one to our YubiCloud validation service.\n\nAre you sure you want to overwrite the configuration slot 1?")
#define OVERWRITE_CONF_SLOT1 "Overwrite configuration slot 1?"
#define WARN_OVERWRITE_CONF_SLOT1 "If you have a YubiKey VIP, this slot should contain a Symantec VIP credential by default. You should refrain from rewriting this Slot as a Symantec VIP credential can only be programmed during manufacture - you will thus not be able to get a new one.\n\nIf you have any other YubiKey, this slot should contain a Yubico OTP credential by default. This credential is required for using the YubiKey with many of our services and that of our partners. If you overwrite this and want to use it again later, you will need to reprogram it and upload the new one to our YubiCloud validation service.\n\nAre you sure you want to overwrite the configuration slot 1?"
#define RESTORE_SETTING tr("Restore default settings?")
#define WARN_RESTORE_SETTING tr("Are you sure you want to restore the default settings?")
#define RESTORE_SETTING "Restore default settings?"
#define WARN_RESTORE_SETTING "Are you sure you want to restore the default settings?"
#define WARN_EMPTY_PASS tr("No password set. Please set the password")
#define WARN_EMPTY_PASS "No password set. Please set the password"
#define DIFF_PUBLIC_ID_LEN tr("Change Public Identity length?")
#define WARN_DIFF_PUBLIC_ID_LEN tr("Yubico OTP validation server requires Public Identity to be of 12 characters (6 bytes) in order to correctly extract the Secret Key. If you change the Public Identity to any other length, the Yubico OTP validation server won't be able to extract the Secret Key and the OTP validation will fail.\n\nAre you sure you want to change the default Public Idenity length?")
#define DIFF_PUBLIC_ID_LEN "Change Public Identity length?"
#define WARN_DIFF_PUBLIC_ID_LEN "Yubico OTP validation server requires Public Identity to be of 12 characters (6 bytes) in order to correctly extract the Secret Key. If you change the Public Identity to any other length, the Yubico OTP validation server won't be able to extract the Secret Key and the OTP validation will fail.\n\nAre you sure you want to change the default Public Idenity length?"
#define ENABLE_CONF_PROTECTION tr("Enable configuration protection?")
#define WARN_ENABLE_CONF_PROTECTION tr("YubiKey Personalization Tool logging is currently disabled. It is not possible to retrieve the configuration protection access code from the YubiKey. If protection access code is forgotten, you may not be able to program the YubiKey again. Yubico highly recommends to enable logging and archive the relevant log records. \n\nAre you sure you still want to enable the configuration protection?")
#define ENABLE_CONF_PROTECTION "Enable configuration protection?"
#define WARN_ENABLE_CONF_PROTECTION "YubiKey Personalization Tool logging is currently disabled. It is not possible to retrieve the configuration protection access code from the YubiKey. If protection access code is forgotten, you may not be able to program the YubiKey again. Yubico highly recommends to enable logging and archive the relevant log records. \n\nAre you sure you still want to enable the configuration protection?"
#define NDEF_WITHOUT_HTTP tr("Write NDEF without HTTP?")
#define WARN_NDEF_WITHOUT_HTTP tr("The NDEF URI entered does not start with http, are you sure that is what you want?")
#define NDEF_WITHOUT_HTTP "Write NDEF without HTTP?"
#define WARN_NDEF_WITHOUT_HTTP "The NDEF URI entered does not start with http, are you sure that is what you want?"
//Settings
......
This diff is collapsed.
......@@ -66,7 +66,7 @@ AboutPage::AboutPage(QWidget *parent) :
//Set copyright
QString copyright = tr("%1. %2.").
arg(VER_LEGALCOPYRIGHT).
arg(trUtf8(VER_LEGALCOPYRIGHT)).
arg(VER_LEGALTRADEMARKS1_STR);
ui->copyrightLbl->setText(copyright);
......@@ -151,5 +151,5 @@ void AboutPage::btn_pressed(int pageIndex) {
}
void AboutPage::on_supportBtn_clicked() {
QDesktopServices::openUrl(QUrl(SUPPORT_LINK));
QDesktopServices::openUrl(QUrl(tr(SUPPORT_LINK)));
}
......@@ -466,7 +466,7 @@ void ChalRespPage::changeQuickConfigParams() {
bool ChalRespPage::validateQuickSettings() {
if(!(ui->quickConfigSlot1Radio->isChecked() ||
ui->quickConfigSlot2Radio->isChecked())) {
emit showStatusMessage(ERR_CONF_SLOT_NOT_SELECTED, 1);
emit showStatusMessage(tr(ERR_CONF_SLOT_NOT_SELECTED), 1);
return false;
}
......@@ -570,14 +570,14 @@ void ChalRespPage::quickConfigWritten(bool written, const QString &msg) {
m_keysProgrammedCtr++;
if(m_state == State_Programming){
message = KEY_CONFIGURED.arg("");
message = tr(KEY_CONFIGURED).arg("");
} else {
message = tr("%1. %2").arg(KEY_CONFIGURED.arg(m_keysProgrammedCtr)).arg(REMOVE_KEY);
message = tr("%1. %2").arg(tr(KEY_CONFIGURED).arg(m_keysProgrammedCtr)).arg(tr(REMOVE_KEY));
}
showStatusMessage(message, 0);
message = KEY_CONFIGURED.arg("");
message = tr(KEY_CONFIGURED).arg("");
} else {
qDebug() << "Configuration could not be written....";
......@@ -599,7 +599,7 @@ void ChalRespPage::quickConfigExported(bool written, const QString &msg) {
if(written) {
qDebug() << "Configuration exported....";
message = KEY_EXPORTED;
message = tr(KEY_EXPORTED);
showStatusMessage(message, 0);
} else {
......@@ -791,7 +791,7 @@ void ChalRespPage::changeAdvConfigParams() {
bool ChalRespPage::validateAdvSettings() {
if(!(ui->advConfigSlot1Radio->isChecked() ||
ui->advConfigSlot2Radio->isChecked())) {
emit showStatusMessage(ERR_CONF_SLOT_NOT_SELECTED, 1);
emit showStatusMessage(tr(ERR_CONF_SLOT_NOT_SELECTED), 1);
return false;
}
......@@ -890,14 +890,14 @@ void ChalRespPage::advConfigWritten(bool written, const QString &msg) {
m_keysProgrammedCtr++;
if(m_state == State_Programming){
message = KEY_CONFIGURED.arg("");
message = tr(KEY_CONFIGURED).arg("");
} else {
message = tr("%1. %2").arg(KEY_CONFIGURED.arg(m_keysProgrammedCtr)).arg(REMOVE_KEY);
message = tr("%1. %2").arg(tr(KEY_CONFIGURED).arg(m_keysProgrammedCtr)).arg(tr(REMOVE_KEY));
}
showStatusMessage(message, 0);
message = KEY_CONFIGURED.arg("");
message = tr(KEY_CONFIGURED).arg("");
} else {
qDebug() << "Configuration could not be written....";
......@@ -919,7 +919,7 @@ void ChalRespPage::advConfigExported(bool written, const QString &msg) {
if(written) {
qDebug() << "Configuration written....";
message = KEY_EXPORTED;
message = tr(KEY_EXPORTED);
showStatusMessage(message, 0);
} else {
......
......@@ -50,23 +50,23 @@ void ConfirmBox::setConfirmIndex(Confirm confirmIndex) {
switch(confirmIndex) {
case Confirm_ConfigurationSlot:
title = OVERWRITE_CONF_SLOT1;
confirmMsg = WARN_OVERWRITE_CONF_SLOT1;
title = tr(OVERWRITE_CONF_SLOT1);
confirmMsg = tr(WARN_OVERWRITE_CONF_SLOT1);
break;
case Confirm_PublicID:
title = DIFF_PUBLIC_ID_LEN;
confirmMsg = WARN_DIFF_PUBLIC_ID_LEN;
title = tr(DIFF_PUBLIC_ID_LEN);
confirmMsg = tr(WARN_DIFF_PUBLIC_ID_LEN);
break;
case Confirm_ConfigurationProtection:
title = ENABLE_CONF_PROTECTION;
confirmMsg = WARN_ENABLE_CONF_PROTECTION;
title = tr(ENABLE_CONF_PROTECTION);
confirmMsg = tr(WARN_ENABLE_CONF_PROTECTION);
break;
case Confirm_NdefWithoutHttp:
title = NDEF_WITHOUT_HTTP;
confirmMsg = WARN_NDEF_WITHOUT_HTTP;
title = tr(NDEF_WITHOUT_HTTP);
confirmMsg = tr(WARN_NDEF_WITHOUT_HTTP);
break;
default:
confirmMsg = tr("");
......
......@@ -51,84 +51,84 @@ void HelpBox::setHelpIndex(Help helpIndex) {
switch(helpIndex) {
case Help_ConfigurationSlot:
title = tr("Configuration Slots");
helpMsg = HELP_CONFIG_SLOT;
helpMsg = tr(HELP_CONFIG_SLOT);
break;
case Help_PublicID:
title = tr("Public Identity");
helpMsg = HELP_PUBLIC_ID;
helpMsg = tr(HELP_PUBLIC_ID);
break;
case Help_PrivateID:
title = tr("Private Identity");
helpMsg = HELP_PRIVATE_ID;
helpMsg = tr(HELP_PRIVATE_ID);
break;
case Help_SecretKey:
title = tr("Secret Key");
helpMsg = HELP_SECRET_KEY;
helpMsg = tr(HELP_SECRET_KEY);
break;
case Help_ParameterGeneration:
title = tr("Parameter Generation Scheme");
helpMsg = HELP_PARAM_GENERATION;
helpMsg = tr(HELP_PARAM_GENERATION);
break;
case Help_ConfigurationProtection:
title = tr("Configuration Protection");
helpMsg = HELP_CONFIG_PROTECTION;
helpMsg = tr(HELP_CONFIG_PROTECTION);
break;
case Help_OutputFormat:
title = tr("Output Format");
helpMsg = HELP_OUTPUT_FORMAT;
helpMsg = tr(HELP_OUTPUT_FORMAT);
break;
case Help_OutputSpeed:
title = tr("Output Speed Throttling");
helpMsg = HELP_OUTPUT_SPEED;
helpMsg = tr(HELP_OUTPUT_SPEED);
break;
case Help_SrNoVisibility:
title = tr("Serial # Visibility");
helpMsg = HELP_SR_NO_VISIBILITY;
helpMsg = tr(HELP_SR_NO_VISIBILITY);
break;
case Help_OathPublicID:
title = tr("OATH Token Identifier");
helpMsg = HELP_OATH_PUBLIC_ID;
helpMsg = tr(HELP_OATH_PUBLIC_ID);
break;
case Help_HotpLen:
title = tr("HOTP Length");
helpMsg = HELP_HOTP_LEN;
helpMsg = tr(HELP_HOTP_LEN);
break;
case Help_HotpParam:
title = tr("HOTP Moving Factor Seed");
helpMsg = HELP_HOTP_PARAM;
helpMsg = tr(HELP_HOTP_PARAM);
break;
case Help_StaticScanCode:
title = tr("Static Password Scan Code Mode");
helpMsg = HELP_STATIC_SCAN_CODE;
helpMsg = tr(HELP_STATIC_SCAN_CODE);
break;
case Help_ChalRespYubico:
title = tr("Challenge-Response Yubico OTP Mode");
helpMsg = HELP_CHALRESP_YUBICO;
helpMsg = tr(HELP_CHALRESP_YUBICO);
break;
case Help_ChalRespHmac:
title = tr("Challenge-Response HMAC-SHA1 Mode");
helpMsg = HELP_CHALRESP_HMAC;
helpMsg = tr(HELP_CHALRESP_HMAC);
break;
case Help_ChalRespOption:
title = tr("Challenge-Response Options");
helpMsg = HELP_CHALRESP_OPTION;
helpMsg = tr(HELP_CHALRESP_OPTION);
break;
case Help_AllowUpdate:
title = tr("Allow Update");
helpMsg = HELP_ALLOW_UPDATE_OPTION;
helpMsg = tr(HELP_ALLOW_UPDATE_OPTION);
break;
case Help_Swap:
title = tr("Swap");
helpMsg = HELP_SWAP_OPTION;
helpMsg = tr(HELP_SWAP_OPTION);
break;
case Help_ManUpdate:
title = tr("Manual Update");
helpMsg = HELP_MAN_UPDATE_OPTION;
helpMsg = tr(HELP_MAN_UPDATE_OPTION);
break;
case Help_LogFormat:
{
title = tr("Flexible Log Format");
helpMsg = HELP_LOG_FORMAT;
helpMsg = tr(HELP_LOG_FORMAT);
QStringList names = YubiKeyLogger::getLogNames();
helpMsg.append(names.join(", "));
helpMsg.append("</p>");
......
......@@ -45,10 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "common.h"
#include "version.h"
#define TICKMAP QPixmap(tr(":/res/images/tick.png"))
#define CROSSMAP QPixmap(tr(":/res/images/cross.png"))
#define BLANKMAP QPixmap(tr(":/res/images/blank.png"))
#define COPYMAP QPixmap(tr(":/res/images/clipboard.png"))
#define TICKMAP QPixmap(":/res/images/tick.png")
#define CROSSMAP QPixmap(":/res/images/cross.png")
#define BLANKMAP QPixmap(":/res/images/blank.png")
#define COPYMAP QPixmap(":/res/images/clipboard.png")
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
......@@ -311,32 +311,34 @@ void MainWindow::setCurrentPage(int pageIndex, int tab, int slot) {
void MainWindow::resetDeviceInfo() {
ui->statusLbl->clear();
ui->versionLbl->setText(NA);
ui->versionLbl->setText(tr(NA));
QString blankBtnSS = QString::fromUtf8(SS_BLANK_BTN);
ui->serialNoDecLbl->setText(NA);
ui->serialNoHexLbl->setText(NA);
ui->serialNoModhexLbl->setText(NA);
ui->serialNoDecLbl->setText(tr(NA));
ui->serialNoHexLbl->setText(tr(NA));
ui->serialNoModhexLbl->setText(tr(NA));
ui->serialNoDecCopyBtn->setStyleSheet(blankBtnSS);
ui->serialNoHexCopyBtn->setStyleSheet(blankBtnSS);
ui->serialNoModhexCopyBtn->setStyleSheet(blankBtnSS);
ui->otpSupportLbl->setPixmap(QPixmap());
ui->otpSupportLbl->setText(NA);
ui->otpSupportLbl->setText(tr(NA));
ui->multiConfigSupportLbl->setPixmap(QPixmap());
ui->multiConfigSupportLbl->setText(NA);
ui->multiConfigSupportLbl->setText(tr(NA));
ui->oathHotpSupportLbl->setPixmap(QPixmap());
ui->oathHotpSupportLbl->setText(NA);
ui->oathHotpSupportLbl->setText(tr(NA));
ui->staticPwdSupportLbl->setPixmap(QPixmap());
ui->staticPwdSupportLbl->setText(NA);
ui->staticPwdSupportLbl->setText(tr(NA));
ui->scanCodeSupportLbl->setPixmap(QPixmap());
ui->scanCodeSupportLbl->setText(NA);
ui->scanCodeSupportLbl->setText(tr(NA));
ui->chalRespSupportLbl->setPixmap(QPixmap());
ui->chalRespSupportLbl->setText(NA);
ui->chalRespSupportLbl->setText(tr(NA));
ui->updatableSupportLbl->setPixmap(QPixmap());
ui->updatableSupportLbl->setText(NA);
ui->updatableSupportLbl->setText(tr(NA));
ui->ndefSupportLbl->setPixmap(QPixmap());
ui->ndefSupportLbl->setText(NA);
ui->ndefSupportLbl->setText(tr(NA));
ui->u2fSupportLbl->setPixmap(QPixmap());
ui->u2fSupportLbl->setText(tr(NA));
}
void MainWindow::keyFound(bool found, bool* featuresMatrix, int error) {
......@@ -370,10 +372,10 @@ void MainWindow::keyFound(bool found, bool* featuresMatrix, int error) {
unsigned int version = finder->version();
if(error == ERR_UNKNOWN_FIRMWARE) {
ui->statusLbl->setStyleSheet(QString::fromUtf8(SS_YKSTATUS_ERROR));
ui->statusLbl->setText(UNKNOWN_FIRMWARE);
ui->statusLbl->setText(tr(UNKNOWN_FIRMWARE));
} else {
ui->statusLbl->setStyleSheet(QString::fromUtf8(SS_YKSTATUS_SUCCESS));
ui->statusLbl->setText(KEY_FOUND);
ui->statusLbl->setText(tr(KEY_FOUND));
}
ui->versionLbl->setText(finder->versionStr());
......@@ -440,9 +442,9 @@ void MainWindow::keyFound(bool found, bool* featuresMatrix, int error) {
ui->serialNoHexCopyBtn->setStyleSheet(copyBtnSS);
ui->serialNoModhexCopyBtn->setStyleSheet(copyBtnSS);
} else {
ui->serialNoDecLbl->setText(NA);
ui->serialNoHexLbl->setText(NA);
ui->serialNoModhexLbl->setText(NA);
ui->serialNoDecLbl->setText(tr(NA));
ui->serialNoHexLbl->setText(tr(NA));
ui->serialNoModhexLbl->setText(tr(NA));
ui->serialNoDecCopyBtn->setStyleSheet(blankBtnSS);
ui->serialNoHexCopyBtn->setStyleSheet(blankBtnSS);
ui->serialNoModhexCopyBtn->setStyleSheet(blankBtnSS);
......@@ -515,6 +517,11 @@ void MainWindow::keyFound(bool found, bool* featuresMatrix, int error) {
} else {
ui->ndefSupportLbl->setPixmap(CROSSMAP);
}
if(featuresMatrix[YubiKeyFinder::Feature_U2F]) {
ui->u2fSupportLbl->setPixmap(TICKMAP);
} else {
ui->u2fSupportLbl->setPixmap(CROSSMAP);
}
} else {
ui->programLbl->clear();
if(ui->deviceImage->pixmap()) {
......@@ -522,11 +529,11 @@ void MainWindow::keyFound(bool found, bool* featuresMatrix, int error) {
}
ui->deviceImage->clear();
if(error == ERR_NOKEY) {
ui->statusLbl->setText(NO_KEY_FOUND);
ui->statusLbl->setText(tr(NO_KEY_FOUND));
} else if(error == ERR_MORETHANONE) {
ui->statusLbl->setText(MORE_THAN_ONE);
ui->statusLbl->setText(tr(MORE_THAN_ONE));
} else {
ui->statusLbl->setText(OTHER_ERROR);
ui->statusLbl->setText(tr(OTHER_ERROR));
}
ui->statusLbl->setStyleSheet(QString::fromUtf8(SS_YKSTATUS_ERROR));
......@@ -604,7 +611,7 @@ void MainWindow::copyToClipboard(const QString &str) {
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(str);
showStatusMessage(VALUE_COPIED, 0);
showStatusMessage(tr(VALUE_COPIED), 0);
}
void MainWindow::on_serialNoDecCopyBtn_clicked() {
......
<
......@@ -505,6 +505,44 @@ background-color: rgb(255, 255, 255);</string>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="u2fSupportDescLbl">
<property name="geometry">
<rect>
<x>5</x>
<y>185</y>
<width>121</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font-weight: normal;</string>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<property name="text">
<string>Universal 2nd Factor </string>
</property>
</widget>
<widget class="QLabel" name="u2fSupportLbl">
<property name="geometry">
<rect>
<x>128</x>
<y>185</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font-weight: normal;</string>
</property>
<property name="text">
<string>N/A</string>
</property>