Imported Upstream version 3.1.18

parent 5b656e83
2014-11-28 Klas Lindfors <klas@yubico.com>
* NEWS: NEWS for 3.1.18
2014-11-28 Klas Lindfors <klas@yubico.com>
* resources/images/README.mng: update text about creating mng
2014-11-28 Klas Lindfors <klas@yubico.com>
* resources/resources.qrc, src/ui/mainwindow.cpp: image for plus
2014-11-24 Klas Lindfors <klas@yubico.com>
* src/yubikeyfinder.cpp, src/yubikeyfinder.h: no support for ndef in
yk4 so the exclusion struct has to be expanded to hold a second range
for every feature..
2014-11-11 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: drop QTPLUGIN line, caused the plugins to
be linked in at times fixes #46
2014-10-31 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: check that the binaries are correctly
linked
2014-10-30 Klas Lindfors <klas@yubico.com>
* resources/mac/Info.plist.in: apparently the app store doesn't
allow build number so I wonder in what field that should go..
2014-10-30 Klas Lindfors <klas@yubico.com>
* NEWS, YKPersonalization.pro: bump versions.
2014-10-30 Klas Lindfors <klas@yubico.com>
* NEWS: NEWS for 3.1.17
......
yubikey-personalization-gui NEWS -- History of user-visible changes. -*- outline -*-
* Version 3.1.18 (released 2014-11-28)
** Image and correct features for plus.
* Version 3.1.17 (released 2014-10-30)
** Fixup the Yubico logformat so accesscode is padded out with 0
......
......@@ -3,7 +3,7 @@
#
VERSION_MAJOR = 3
VERSION_MINOR = 1
VERSION_BUILD = 17
VERSION_BUILD = 18
VERSION = "$${VERSION_MAJOR}.$${VERSION_MINOR}.$${VERSION_BUILD}"
APP_NAME = $$quote(YubiKey Personalization Tool)
......@@ -11,7 +11,6 @@ APP_NAME = $$quote(YubiKey Personalization Tool)
# common configuration
#
QT += core gui
QTPLUGIN += qtaccessiblewidgets qmng
TEMPLATE = app
TARGET = yubikey-personalization-gui
......@@ -384,6 +383,9 @@ macx:!force_pkgconfig {
$$_INSTALL_NAME_TOOL -change $$_QTPRINTSUPPORT $$_BASE/QtPrintSupport $$_BASEDIR/MacOS/$$TARGET_MAC && \
$$_INSTALL_NAME_TOOL -change $$_LIBBASE/libykpers-1.1.dylib $$_BASE/libykpers-1.1.dylib $$_BASEDIR/MacOS/$$TARGET_MAC && \
$$_INSTALL_NAME_TOOL -change $$_LIBBASE/libyubikey.0.dylib $$_BASE/libyubikey.0.dylib $$_BASEDIR/MacOS/$$TARGET_MAC && \
$$_INSTALL_NAME_TOOL -id $$_BASE/libjson-c.2.dylib $$_LIBDIR/libjson-c.2.dylib && \
$$_INSTALL_NAME_TOOL -id $$_BASE/libyubikey.0.dylib $$_LIBDIR/libyubikey.0.dylib && \
$$_INSTALL_NAME_TOOL -id $$_BASE/libykpers-1.1.dylib $$_LIBDIR/libykpers-1.1.dylib && \
$$_INSTALL_NAME_TOOL -change $$_LIBBASE/libyubikey.0.dylib $$_BASE/libyubikey.0.dylib $$_LIBDIR/libykpers-1.1.dylib && \
$$_INSTALL_NAME_TOOL -change $$_LIBBASE/libjson-c.2.dylib $$_BASE/libjson-c.2.dylib $$_LIBDIR/libykpers-1.1.dylib && \
$$_INSTALL_NAME_TOOL -id $$_BASE/QtCore $$_LIBDIR/QtCore && \
......@@ -406,6 +408,12 @@ macx:!force_pkgconfig {
$$_INSTALL_NAME_TOOL -change $$_QTGUI $$_BASE/QtGui $$_PLUGINDIR/platforms/libqcocoa.dylib && \
$$_INSTALL_NAME_TOOL -change $$_QTPRINTSUPPORT $$_BASE/QtPrintSupport $$_PLUGINDIR/platforms/libqcocoa.dylib)
QMAKE_POST_LINK += $$quote( && \
if otool -L $$_LIBDIR/* $$_PLUGINDIR/*/* $$_BASEDIR/MacOS/$$TARGET_MAC | grep -e '$$_QT_LIBDIR' -e '$$_LIBBASE' | grep -q compatibility; then \
echo "Something is incorrectly linked!"; \
exit 1; \
fi)
build_installer {
# the productbuild path doesn't work pre 10.8
for_store {
......
This is a short walkthrough for creating mng files compatible with the libmng
shipped with Qt (jng turned off). Export the mng from gimp, then run convert
from imagemagick on it, like:
Getting the MNG files in correct format can be a bit of work. Currently the
method that seems to work best is to build with the convert tool from
Imagemagick like:
$ convert foo.mng bar.mng
$ convert -delay 200 first.png second.png output.mng
This strips the jng information from it and it'll work with bundled libmng.
The trick is that the resulting image must be without JNG formatting.
......@@ -17,7 +17,7 @@
<key>CFBundleVersion</key>
<string>@@version@@</string>
<key>CFBundleShortVersionString</key>
<string>@@version@@-@@build@@</string>
<string>@@version@@</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
</dict>
......
......@@ -17,5 +17,6 @@
<file>images/yubikey_devel.png</file>
<file>images/neo_production.png</file>
<file>images/neo_production_33.png</file>
<file>images/plus.mng</file>
</qresource>
</RCC>
......@@ -398,8 +398,12 @@ void MainWindow::keyFound(bool found, bool* featuresMatrix, int error) {
movie->setFileName(":/res/images/v2-3-animated.mng");
} else if(version < YK_VERSION(3,3,0)){
pixmap.load(":/res/images/neo_production.png");
} else { // only case left should be version over 3.3, that is neo + u2f
} else if(version < YK_VERSION(4,0,0)) {
pixmap.load(":/res/images/neo_production_33.png");
} else if(version < YK_VERSION(4,1,0)) {
movie->setFileName(":/res/images/plus.mng");
} else {
pixmap.load(":/res/images/blank.png");
}
if(pixmap.isNull()) {
ui->deviceImage->setMovie(movie);
......
......@@ -56,22 +56,22 @@ const unsigned int YubiKeyFinder::FEATURE_MATRIX[][2] = {
};
// when a featureset should be excluded from versions (NEO, I'm looking at you.)
const unsigned int YubiKeyFinder::FEATURE_MATRIX_EXCLUDE[][2] = {
{ YK_VERSION(2,1,4), YK_VERSION(2,2,0) }, //Feature_MultipleConfigurations
{ YK_VERSION(2,1,4), YK_VERSION(2,2,0) }, //Feature_ProtectConfiguration2
{ YK_VERSION(2,1,4), YK_VERSION(2,1,8) }, //Feature_StaticPassword
{ YK_VERSION(2,1,4), YK_VERSION(2,1,8) }, //Feature_ScanCodeMode
{ 0, 0 }, //Feature_ShortTicket
{ YK_VERSION(2,1,4), YK_VERSION(2,1,8) }, //Feature_StrongPwd
{ 0, 0 }, //Feature_OathHotp
{ 0, 0 }, //Feature_ChallengeResponse
{ 0, 0 }, //Feature_SerialNumber
{ 0, 0 }, //Feature_MovingFactor
{ 0, 0 }, //Feature_ChallengeResponseFixed
{ 0, 0 }, //Feature_Updatable
{ YK_VERSION(2,2,0), YK_VERSION(3,0,0) }, //Feature_Ndef
{ YK_VERSION(3,0,0), YK_VERSION(3,1,0) }, //Feature_LedInvert
{ 0, 0 }, //Feature_U2F
const unsigned int YubiKeyFinder::FEATURE_MATRIX_EXCLUDE[][4] = {
{ YK_VERSION(2,1,4), YK_VERSION(2,2,0), 0, 0 }, //Feature_MultipleConfigurations
{ YK_VERSION(2,1,4), YK_VERSION(2,2,0), 0, 0 }, //Feature_ProtectConfiguration2
{ YK_VERSION(2,1,4), YK_VERSION(2,1,8), 0, 0 }, //Feature_StaticPassword
{ YK_VERSION(2,1,4), YK_VERSION(2,1,8), 0, 0 }, //Feature_ScanCodeMode
{ 0, 0, 0, 0 }, //Feature_ShortTicket
{ YK_VERSION(2,1,4), YK_VERSION(2,1,8), 0, 0 }, //Feature_StrongPwd
{ 0, 0, 0, 0 }, //Feature_OathHotp
{ 0, 0, 0, 0 }, //Feature_ChallengeResponse
{ 0, 0, 0, 0 }, //Feature_SerialNumber
{ 0, 0, 0, 0 }, //Feature_MovingFactor
{ 0, 0, 0, 0 }, //Feature_ChallengeResponseFixed
{ 0, 0, 0, 0 }, //Feature_Updatable
{ YK_VERSION(2,2,0), YK_VERSION(3,0,0), YK_VERSION(4,0,0), YK_VERSION(4,1,0) }, //Feature_Ndef
{ YK_VERSION(3,0,0), YK_VERSION(3,1,0), 0, 0 }, //Feature_LedInvert
{ 0, 0, 0, 0 }, //Feature_U2F
};
YubiKeyFinder::YubiKeyFinder() {
......@@ -128,11 +128,17 @@ bool YubiKeyFinder::checkFeatureSupport(Feature feature) {
m_version >= FEATURE_MATRIX[feature][0] &&
(FEATURE_MATRIX[feature][1] == 0 || m_version < FEATURE_MATRIX[feature][1])
);
if(supported)
if(supported) {
if(FEATURE_MATRIX_EXCLUDE[feature][0] != 0)
if(m_version >= FEATURE_MATRIX_EXCLUDE[feature][0])
if(m_version < FEATURE_MATRIX_EXCLUDE[feature][1])
return false;
if(FEATURE_MATRIX_EXCLUDE[feature][2] != 0)
if(m_version >= FEATURE_MATRIX_EXCLUDE[feature][2])
if(m_version < FEATURE_MATRIX_EXCLUDE[feature][3])
return false;
}
return supported;
}
return false;
......
......@@ -99,7 +99,7 @@ private:
static YubiKeyFinder* _instance;
static const unsigned int FEATURE_MATRIX[][2];
static const unsigned int FEATURE_MATRIX_EXCLUDE[][2];
static const unsigned int FEATURE_MATRIX_EXCLUDE[][4];
State m_state;
YK_KEY *m_yk;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment