Hello community,
here is the log from the commit of package ykpers for openSUSE:Factory checked in at 2018-10-01 09:07:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ykpers (Old)
and /work/SRC/openSUSE:Factory/.ykpers.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ykpers"
Mon Oct 1 09:07:59 2018 rev:6 rq:638990 version:1.19.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ykpers/ykpers.changes 2018-04-11 14:02:39.857343844 +0200
+++ /work/SRC/openSUSE:Factory/.ykpers.new/ykpers.changes 2018-10-01 09:08:42.019723930 +0200
@@ -1,0 +2,14 @@
+Fri Sep 28 09:13:26 UTC 2018 - Jan Engelhardt
+
+- Fix RPM groups.
+- Use noun phrase in summary.
+
+-------------------------------------------------------------------
+Thu Sep 27 12:11:15 UTC 2018 - Karol Babioch
+
+- Version 1.19.0 (released 2018-04-24)
+ - Add yk_write_device_info().
+ - Add ykpersonalize cli switch -D for device info.
+ - Add code for handling personalization interface of major version 5.
+
+-------------------------------------------------------------------
Old:
----
ykpers-1.18.1.tar.gz
ykpers-1.18.1.tar.gz.sig
New:
----
ykpers-1.19.0.tar.gz
ykpers-1.19.0.tar.gz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ykpers.spec ++++++
--- /var/tmp/diff_new_pack.nHKhiL/_old 2018-10-01 09:08:42.575723455 +0200
+++ /var/tmp/diff_new_pack.nHKhiL/_new 2018-10-01 09:08:42.575723455 +0200
@@ -12,14 +12,14 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: ykpers
-Version: 1.18.1
+Version: 1.19.0
Release: 0
-Summary: Provides a reference implementation for configuration of YubiKeys
+Summary: Reference implementation for configuration of YubiKeys
License: BSD-2-Clause
Group: Productivity/Networking/Security
Url: https://developers.yubico.com/yubikey-personalization/
@@ -35,29 +35,28 @@
BuildRequires: pkgconfig(udev)
%description
-Yubico's YubiKey can be re-programmed. This project's purpose is to provide a reference implementation for configuration of YubiKeys.
+Yubico's YubiKey can be re-programmed. This project provides a reference implementation for configuration of YubiKeys.
%package -n libykpers-1-1
-Summary: Provides a reference implementation for configuration of YubiKeys
-Group: Productivity/Networking/Security
+Summary: Reference implementation for configuration of YubiKeys
+Group: System/Libraries
%description -n libykpers-1-1
-Yubico's YubiKey can be re-programmed. This project's purpose is to provide a reference implementation for configuration of YubiKey's
+Yubico's YubiKey can be re-programmed. This project provides a reference implementation for configuration of YubiKeys.
%package -n libykpers-devel
-Summary: Provides a reference implementation for configuration of YubiKeys
+Summary: Development files for the ykpers library
Group: Development/Languages/C and C++
Requires: glibc-devel
Requires: libykpers-1-1 = %{version}
%description -n libykpers-devel
-Yubico's YubiKey can be re-programmed. This project's purpose is to provide a reference implementation for configuration of YubiKey's.·
-
+Yubico's YubiKey can be re-programmed. This project provides a reference implementation for configuration of YubiKeys.
%prep
%setup -q
# Add access for group "users"
-%{__sed} -i 's|--device=$env{DEVNAME}"|--device=$env{DEVNAME}" GROUP="users"|g' 70-yubikey.rules
+sed -i 's|--device=$env{DEVNAME}"|--device=$env{DEVNAME}" GROUP="users"|g' 70-yubikey.rules
%build
%configure --disable-static --with-pic \
@@ -68,7 +67,7 @@
make %{?_smp_mflags} V=1
%install
-%makeinstall
+%make_install
find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print
%post
@@ -80,7 +79,8 @@
%files
%defattr(-,root,root)
-%doc ChangeLog README COPYING
+%doc ChangeLog README
+%license COPYING
%{_bindir}/*
%{_mandir}/man?/*
%{_udevrulesdir}/*-yubikey.rules
++++++ ykpers-1.18.1.tar.gz -> ykpers-1.19.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ChangeLog new/ykpers-1.19.0/ChangeLog
--- old/ykpers-1.18.1/ChangeLog 2018-01-16 12:14:40.000000000 +0100
+++ new/ykpers-1.19.0/ChangeLog 2018-04-24 10:28:49.000000000 +0200
@@ -1,3 +1,38 @@
+2018-04-24 Klas Lindfors
+
+ * NEWS: NEWS for 1.19.0
+
+2018-04-24 Klas Lindfors
+
+ * ykpersonalize.1.adoc: manpage for -D option
+
+2018-04-19 Klas Lindfors
+
+ * tests/test_args_to_config.c, ykpers-args.c, ykpers-args.h,
+ ykpersonalize.c: add ykpersonalize command -D to set device info takes an encoded string and sends to the device
+
+2018-04-19 Klas Lindfors
+
+ * ykpers.c: additions for yubikey version 5
+
+2018-03-23 Klas Lindfors
+
+ * NEWS, configure.ac, libykpers-1.map: bump version to 1.19.0 and
+ update stuff
+
+2018-03-23 Klas Lindfors
+
+ * ykcore/ykcore.c, ykcore/ykcore.h, ykcore/ykdef.h: add
+ yk_write_device_info() for writing device info
+
+2018-01-16 Thordur Bjornsson
+
+ * doc/Compatibility.asciidoc: doc: Update compat
+
+2018-01-16 Klas Lindfors
+
+ * NEWS, configure.ac: bump versions after release
+
2018-01-16 Klas Lindfors
* NEWS: NEWS for 1.18.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/NEWS new/ykpers-1.19.0/NEWS
--- old/ykpers-1.18.1/NEWS 2018-01-16 12:13:53.000000000 +0100
+++ new/ykpers-1.19.0/NEWS 2018-04-24 10:28:46.000000000 +0200
@@ -1,5 +1,13 @@
Yubikey-personalize NEWS -- History of user-visible changes. -*- outline -*-
+* Version 1.19.0 (released 2018-04-24)
+
+** Add yk_write_device_info().
+
+** Add ykpersonalize cli switch -D for device info.
+
+** Add code for handling personalization interface of major version 5.
+
* Version 1.18.1 (released 2018-01-16)
** Support reading accesscode and private ID from stdin.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/configure new/ykpers-1.19.0/configure
--- old/ykpers-1.18.1/configure 2017-04-19 14:40:36.000000000 +0200
+++ new/ykpers-1.19.0/configure 2018-04-20 10:08:43.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for yubikey-personalization 1.18.1.
+# Generated by GNU Autoconf 2.69 for yubikey-personalization 1.19.0.
#
# Report bugs to .
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='yubikey-personalization'
PACKAGE_TARNAME='ykpers'
-PACKAGE_VERSION='1.18.1'
-PACKAGE_STRING='yubikey-personalization 1.18.1'
+PACKAGE_VERSION='1.19.0'
+PACKAGE_STRING='yubikey-personalization 1.19.0'
PACKAGE_BUGREPORT='yubico-devel@googlegroups.com'
PACKAGE_URL='https://developers.yubico.com/yubikey-personalization/'
@@ -1386,7 +1386,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yubikey-personalization 1.18.1 to adapt to many kinds of systems.
+\`configure' configures yubikey-personalization 1.19.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1457,7 +1457,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yubikey-personalization 1.18.1:";;
+ short | recursive ) echo "Configuration of yubikey-personalization 1.19.0:";;
esac
cat <<\_ACEOF
@@ -1590,7 +1590,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yubikey-personalization configure 1.18.1
+yubikey-personalization configure 1.19.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1868,7 +1868,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yubikey-personalization $as_me 1.18.1, which was
+It was created by yubikey-personalization $as_me 1.19.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2251,11 +2251,11 @@
# Interfaces changed/added/removed: CURRENT++ REVISION=0
# Interfaces added: AGE++
# Interfaces removed: AGE=0
-LT_CURRENT=19
+LT_CURRENT=20
-LT_REVISION=1
+LT_REVISION=0
-LT_AGE=18
+LT_AGE=19
am__api_version='1.15'
@@ -2744,7 +2744,7 @@
# Define the identity of the package.
PACKAGE='ykpers'
- VERSION='1.18.1'
+ VERSION='1.19.0'
cat >>confdefs.h <<_ACEOF
@@ -15982,7 +15982,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yubikey-personalization $as_me 1.18.1, which was
+This file was extended by yubikey-personalization $as_me 1.19.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16040,7 +16040,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-yubikey-personalization config.status 1.18.1
+yubikey-personalization config.status 1.19.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/configure.ac new/ykpers-1.19.0/configure.ac
--- old/ykpers-1.18.1/configure.ac 2017-01-27 12:03:40.000000000 +0100
+++ new/ykpers-1.19.0/configure.ac 2018-04-20 09:34:05.000000000 +0200
@@ -26,7 +26,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-AC_INIT([yubikey-personalization], [1.18.1],
+AC_INIT([yubikey-personalization], [1.19.0],
[yubico-devel@googlegroups.com], [ykpers],
[https://developers.yubico.com/yubikey-personalization/])
AC_CONFIG_AUX_DIR([build-aux])
@@ -36,9 +36,9 @@
# Interfaces changed/added/removed: CURRENT++ REVISION=0
# Interfaces added: AGE++
# Interfaces removed: AGE=0
-AC_SUBST(LT_CURRENT, 19)
-AC_SUBST(LT_REVISION, 1)
-AC_SUBST(LT_AGE, 18)
+AC_SUBST(LT_CURRENT, 20)
+AC_SUBST(LT_REVISION,0)
+AC_SUBST(LT_AGE, 19)
AM_INIT_AUTOMAKE([1.11.3 -Wall -Werror])
AM_SILENT_RULES([yes])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/doc/Compatibility.asciidoc new/ykpers-1.19.0/doc/Compatibility.asciidoc
--- old/ykpers-1.18.1/doc/Compatibility.asciidoc 2016-09-15 09:45:14.000000000 +0200
+++ new/ykpers-1.19.0/doc/Compatibility.asciidoc 2018-03-23 10:57:12.000000000 +0100
@@ -21,7 +21,7 @@
|1.3.2 |0.9.9 |
|1.3.3 |2.2 |
|1.6.0 |2.3 |
-|1.11.0 |3.0 |3.x series is the Neo
+|1.11.0 |3.0 |3.x series is the NEO
|1.12.0 |2.4 & 3.1|
|1.15.0 |3.2 |
|1.15.2 |2.5 |
@@ -31,6 +31,7 @@
|1.17.0 |4.1 |4.1 is Edge
|1.17.2 |4.2 |4.2 is YubiKey 4
|1.17.3 |4.3 |
+|1.18.1 |4.4 & 3.5|4.4 is YubiKey 4, 3.5 is the NEO
|=========================================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/libykpers-1.map new/ykpers-1.19.0/libykpers-1.map
--- old/ykpers-1.18.1/libykpers-1.map 2016-02-05 10:25:49.000000000 +0100
+++ new/ykpers-1.19.0/libykpers-1.map 2018-04-20 09:34:05.000000000 +0200
@@ -272,3 +272,10 @@
yk_open_key;
# Variables:
} LIBYKPERS_1.17;
+
+LIBYKPERS_1.19 {
+ global:
+# Functions:
+ yk_write_device_info;
+# Variables:
+} LIBYKPERS_1.18;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/tests/test_args_to_config.c new/ykpers-1.19.0/tests/test_args_to_config.c
--- old/ykpers-1.18.1/tests/test_args_to_config.c 2017-04-20 09:14:43.000000000 +0200
+++ new/ykpers-1.19.0/tests/test_args_to_config.c 2018-04-20 09:34:05.000000000 +0200
@@ -124,6 +124,8 @@
bool zap = false;
unsigned char scan_map[sizeof(SCAN_MAP)];
+ unsigned char device_info[128];
+ size_t device_info_len = 0;
int rc;
@@ -147,7 +149,7 @@
&access_code, &new_access_code,
&ndef_type, ndef, &usb_mode, &zap,
scan_map, &cr_timeout, &autoeject_timeout, &num_modes_seen,
- &exit_code);
+ device_info, &device_info_len, &exit_code);
free(access_code);
free(new_access_code);
@@ -315,6 +317,8 @@
bool zap = false;
unsigned char scan_map[sizeof(SCAN_MAP)];
+ unsigned char device_info[128];
+ size_t device_info_len = 0;
char *argv[] = {
"unittest", "-1", "-sout", "-iin", "-c313233343536", "-y", "-v",
@@ -343,7 +347,7 @@
&access_code, &new_access_code,
&ndef_type, ndef, &usb_mode, &zap,
scan_map, &cr_timeout, &autoeject_timeout, &num_modes_seen,
- &exit_code);
+ device_info, &device_info_len, &exit_code);
assert(rc == 1);
i = strcmp(infname, "in"); assert(i == 0);
i = strcmp(outfname, "out"); assert(i == 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykcore/ykcore.c new/ykpers-1.19.0/ykcore/ykcore.c
--- old/ykpers-1.18.1/ykcore/ykcore.c 2018-01-16 12:09:57.000000000 +0100
+++ new/ykpers-1.19.0/ykcore/ykcore.c 2018-04-20 09:34:05.000000000 +0200
@@ -244,6 +244,12 @@
return stat.pgmSeq != seq;
}
+int yk_write_device_info(YK_KEY *yk, unsigned char *buf, unsigned int len)
+{
+ return _yk_write(yk, SLOT_YK4_SET_DEVICE_INFO, buf, len);
+}
+
+
int yk_write_command(YK_KEY *yk, YK_CONFIG *cfg, uint8_t command,
unsigned char *acc_code)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykcore/ykcore.h new/ykpers-1.19.0/ykcore/ykcore.h
--- old/ykpers-1.18.1/ykcore/ykcore.h 1970-01-01 01:00:00.000000000 +0100
+++ new/ykpers-1.19.0/ykcore/ykcore.h 2018-04-20 09:34:05.000000000 +0200
@@ -140,6 +140,9 @@
/* Get the YK4 capabilities */
int yk_get_capabilities(YK_KEY *yk, uint8_t slot, unsigned int flags,
unsigned char *capabilities, unsigned int *len);
+/* Set the device info (TLV string) */
+int yk_write_device_info(YK_KEY *yk, unsigned char *buf, unsigned int len);
+
/*************************************************************************
*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykcore/ykdef.h new/ykpers-1.19.0/ykcore/ykdef.h
--- old/ykpers-1.18.1/ykcore/ykdef.h 2017-12-11 08:46:55.000000000 +0100
+++ new/ykpers-1.19.0/ykcore/ykdef.h 2018-04-20 09:34:05.000000000 +0200
@@ -44,7 +44,8 @@
#define SLOT_DEVICE_SERIAL 0x10 /* Device serial number */
#define SLOT_DEVICE_CONFIG 0x11 /* Write device configuration record */
#define SLOT_SCAN_MAP 0x12 /* Write scancode map */
-#define SLOT_YK4_CAPABILITIES 0x13 /* Read YK4 capabilities list */
+#define SLOT_YK4_CAPABILITIES 0x13 /* Read YK4 capabilities (device info) list */
+#define SLOT_YK4_SET_DEVICE_INFO 0x15 /* Write device info */
#define SLOT_CHAL_OTP1 0x20 /* Write 6 byte challenge to slot 1, get Yubico OTP response */
#define SLOT_CHAL_OTP2 0x28 /* Write 6 byte challenge to slot 2, get Yubico OTP response */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykpers-args.c new/ykpers-1.19.0/ykpers-args.c
--- old/ykpers-1.18.1/ykpers-args.c 2017-12-11 08:46:55.000000000 +0100
+++ new/ykpers-1.19.0/ykpers-args.c 2018-04-20 09:34:05.000000000 +0200
@@ -76,10 +76,11 @@
"-nXXX.. Write NDEF URI to YubiKey NEO, must be used with -1 or -2\n"
"-tXXX.. Write NDEF text to YubiKey NEO, must be used with -1 or -2\n"
"-mMODE Set the USB device configuration of the YubiKey.\n"
-" See the manpage for details. This is for YubiKey 3.0 and newer only.\n"
+" See the manpage for details. This is for YubiKey 3 and 4 only.\n"
"-S0605.. Set the scanmap to use with the YubiKey. Must be 45 unique bytes,\n"
" in hex. Use with no argument to reset to the default. This is for\n"
" YubiKey 3.0 and newer only.\n"
+"-D0403.. Set the deviceinfo to use with this YubiKey. YubiKey 5 and newer only.\n"
"-oOPTION change configuration option. Possible OPTION arguments are:\n"
" fixed=xxxxxxxxxxx The public identity of key, in MODHEX.\n"
" This is 0-32 characters long.\n"
@@ -159,7 +160,7 @@
"-V tool version\n"
"-h help (this text)\n"
;
-const char *optstring = ":u12xza:c:n:t:hi:o:s:f:dvym:S:VN:";
+const char *optstring = ":u12xza:c:n:t:hi:o:s:f:dvym:S:VN:D:";
static int _set_fixed(char *opt, YKP_CONFIG *cfg);
static int _format_decimal_as_hex(uint8_t *dst, size_t dst_len, uint8_t *src);
@@ -254,6 +255,7 @@
unsigned char *usb_mode, bool *zap,
unsigned char *scan_bin, unsigned char *cr_timeout,
unsigned short *autoeject_timeout, int *num_modes_seen,
+ unsigned char *device_info, size_t *device_info_len,
int *exit_code)
{
int c;
@@ -267,6 +269,7 @@
bool ndef_seen = false;
bool usb_mode_seen = false;
bool scan_map_seen = false;
+ bool device_info_seen = false;
ykp_configure_version(cfg, st);
@@ -362,7 +365,7 @@
break;
}
case 'x':
- if (slot_chosen || option_seen || update_seen || ndef_seen || *zap || usb_mode_seen || scan_map_seen) {
+ if (slot_chosen || option_seen || update_seen || ndef_seen || *zap || usb_mode_seen || scan_map_seen || device_info_seen) {
fprintf(stderr, "Slot swap (-x) can not be used with other options.\n");
*exit_code = 1;
return 0;
@@ -374,7 +377,7 @@
swap_seen = true;
break;
case 'z':
- if (swap_seen || update_seen || ndef_seen || usb_mode_seen || scan_map_seen) {
+ if (swap_seen || update_seen || ndef_seen || usb_mode_seen || scan_map_seen || device_info_seen) {
fprintf(stderr, "Zap (-z) can only be used with a slot (-1 / -2).\n");
*exit_code = 1;
return 0;
@@ -425,7 +428,7 @@
if(!*ndef_type) {
*ndef_type = 'U';
}
- if (swap_seen || update_seen || option_seen || *zap || usb_mode_seen || scan_map_seen) {
+ if (swap_seen || update_seen || option_seen || *zap || usb_mode_seen || scan_map_seen || device_info_seen) {
fprintf(stderr, "Ndef (-n/-t) can only be used with a slot (-1/-2).\n");
*exit_code = 1;
return 0;
@@ -445,7 +448,7 @@
break;
}
case 'm':
- if(slot_chosen || swap_seen || update_seen || option_seen || ndef_seen || *zap || scan_map_seen) {
+ if(slot_chosen || swap_seen || update_seen || option_seen || ndef_seen || *zap || scan_map_seen || device_info_seen) {
fprintf(stderr, "USB mode (-m) can not be combined with other options.\n");
*exit_code = 1;
return 0;
@@ -475,7 +478,7 @@
case 'S':
{
size_t scanlength = strlen(SCAN_MAP);
- if(slot_chosen || swap_seen || update_seen || option_seen || ndef_seen || *zap || usb_mode_seen) {
+ if(slot_chosen || swap_seen || update_seen || option_seen || ndef_seen || *zap || usb_mode_seen || device_info_seen) {
fprintf(stderr, "Scanmap (-S) can not be combined with other options.\n");
*exit_code = 1;
return 0;
@@ -501,6 +504,27 @@
if (!ykp_configure_command(cfg, SLOT_SCAN_MAP))
return 0;
break;
+ case 'D':
+ if(slot_chosen || swap_seen || update_seen || option_seen || ndef_seen || *zap || usb_mode_seen || scan_map_seen) {
+ fprintf(stderr, "Deviceinfo (-D) can not be combined with other options.\n");
+ *exit_code = 1;
+ return 0;
+ }
+ {
+ size_t len = strlen(optarg);
+ int rc = hex_modhex_decode(device_info, device_info_len, optarg, strlen(optarg), 2, 128, false);
+
+ if (rc <= 0) {
+ fprintf(stderr, "Failed decoding deviceinfo string: '%s'\n", optarg);
+ *exit_code = 1;
+ return 0;
+ }
+ if (!ykp_configure_command(cfg, SLOT_YK4_SET_DEVICE_INFO)) {
+ return 0;
+ }
+ device_info_seen = true;
+ }
+ break;
case 'o':
if (*zap) {
fprintf(stderr, "No options can be given with zap (-z).\n");
@@ -722,7 +746,7 @@
}
}
- if (!slot_chosen && !ndef_seen && !swap_seen && !usb_mode_seen && !scan_map_seen) {
+ if (!slot_chosen && !ndef_seen && !swap_seen && !usb_mode_seen && !scan_map_seen && !device_info_seen) {
if (argc == 1) {
fputs(usage, stderr);
} else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykpers-args.h new/ykpers-1.19.0/ykpers-args.h
--- old/ykpers-1.18.1/ykpers-args.h 2017-04-20 09:12:30.000000000 +0200
+++ new/ykpers-1.19.0/ykpers-args.h 2018-04-20 09:34:05.000000000 +0200
@@ -43,7 +43,8 @@
char **access_code, char **new_access_code,
char *ndef_type, char *ndef, unsigned char *usb_mode,
bool *zap, unsigned char *scan_bin, unsigned char *cr_timeout,
- unsigned short *autoeject_timeout, int *num_modes_seen, int *exit_code);
+ unsigned short *autoeject_timeout, int *num_modes_seen,
+ unsigned char *device_info, size_t *device_info_len, int *exit_code);
int set_oath_id(char *opt, YKP_CONFIG *cfg, YK_KEY *yk, YK_STATUS *st);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykpers-version.h new/ykpers-1.19.0/ykpers-version.h
--- old/ykpers-1.18.1/ykpers-version.h 2017-11-27 09:48:37.000000000 +0100
+++ new/ykpers-1.19.0/ykpers-version.h 2018-04-20 10:08:45.000000000 +0200
@@ -42,7 +42,7 @@
* version number. Used together with ykpers_check_version() to verify
* header file and run-time library consistency.
*/
-#define YKPERS_VERSION_STRING "1.18.1"
+#define YKPERS_VERSION_STRING "1.19.0"
/**
* YKPERS_VERSION_NUMBER
@@ -52,7 +52,7 @@
* this symbol will have the value 0x01020300. The last two digits
* are only used between public releases, and will otherwise be 00.
*/
-#define YKPERS_VERSION_NUMBER 0x011201
+#define YKPERS_VERSION_NUMBER 0x011300
/**
* YKPERS_VERSION_MAJOR
@@ -70,7 +70,7 @@
* level of the header file version number. For example, when the
* header version is 1.2.3 this symbol will be 2.
*/
-#define YKPERS_VERSION_MINOR 18
+#define YKPERS_VERSION_MINOR 19
/**
* YKPERS_VERSION_PATCH
@@ -79,7 +79,7 @@
* level of the header file version number. For example, when the
* header version is 1.2.3 this symbol will be 3.
*/
-#define YKPERS_VERSION_PATCH 1
+#define YKPERS_VERSION_PATCH 0
const char *ykpers_check_version (const char *req_version);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykpers.c new/ykpers-1.19.0/ykpers.c
--- old/ykpers-1.18.1/ykpers.c 2017-12-11 08:46:55.000000000 +0100
+++ new/ykpers-1.19.0/ykpers.c 2018-04-20 09:34:05.000000000 +0200
@@ -187,14 +187,24 @@
}
break;
case SLOT_DEVICE_CONFIG:
+ if(!(cfg->yk_major_version <= 5)) {
+ ykp_errno = YKP_EYUBIKEYVER;
+ return 0;
+ } /* we have an intentional fall-through to the next case here */
case SLOT_SCAN_MAP:
if(!(cfg->yk_major_version >= 3)) {
ykp_errno = YKP_EYUBIKEYVER;
return 0;
}
break;
+ case SLOT_YK4_SET_DEVICE_INFO:
+ if(!(cfg->yk_major_version >= 5)) {
+ ykp_errno = YKP_EYUBIKEYVER;
+ return 0;
+ }
+ break;
case SLOT_NDEF2:
- if(cfg->yk_major_version != 3) {
+ if(cfg->yk_major_version != 3 && cfg->yk_major_version != 5) {
ykp_errno = YKP_EYUBIKEYVER;
return 0;
}
@@ -202,7 +212,7 @@
case SLOT_NDEF:
/* NDEF is available for neo, thus within 2.1 from build 4 */
if (!((cfg->yk_major_version == 2 && cfg->yk_minor_version == 1 &&
- cfg->yk_build_version >= 4) || cfg->yk_major_version == 3)) {
+ cfg->yk_build_version >= 4) || cfg->yk_major_version == 3 || cfg->yk_major_version >= 5)) {
ykp_errno = YKP_EYUBIKEYVER;
return 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykpersonalize.1 new/ykpers-1.19.0/ykpersonalize.1
--- old/ykpers-1.18.1/ykpersonalize.1 2017-05-17 08:21:07.000000000 +0200
+++ new/ykpers-1.19.0/ykpersonalize.1 2018-04-24 10:28:50.000000000 +0200
@@ -2,12 +2,12 @@
.\" Title: ykpersonalize
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 http://docbook.sf.net/
-.\" Date: Version 1.18.1
+.\" Date: Version 1.19.0
.\" Manual: YubiKey Personalization Tool Manual
.\" Source: ykpersonalize
.\" Language: English
.\"
-.TH "YKPERSONALIZE" "1" "Version 1\&.18\&.1" "ykpersonalize" "YubiKey Personalization Tool M"
+.TH "YKPERSONALIZE" "1" "Version 1\&.19\&.0" "ykpersonalize" "YubiKey Personalization Tool M"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -31,7 +31,7 @@
ykpersonalize \- personalize YubiKey OTP tokens
.SH "SYNOPSIS"
.sp
-\fBykpersonalize\fR [\fI\-Nkey\fR] [\fI\-1\fR | \fI\-2\fR] [\fI\-sfile\fR] [\fI\-ifile\fR] [\fI\-fformat\fR] [\fI\-axxx\fR] [\fI\-cxxx\fR] [\fI\-ooption\fR] [\fI\-y\fR] [\fI\-v\fR] [\fI\-d\fR] [\fI\-h\fR] [\fI\-n\fR] [\fI\-t\fR] [\fI\-u\fR] [\fI\-x\fR] [\fI\-z\fR] [\fI\-m\fR] [\fI\-S\fR] [\fI\-V\fR]
+\fBykpersonalize\fR [\fI\-Nkey\fR] [\fI\-1\fR | \fI\-2\fR] [\fI\-sfile\fR] [\fI\-ifile\fR] [\fI\-fformat\fR] [\fI\-axxx\fR] [\fI\-cxxx\fR] [\fI\-ooption\fR] [\fI\-y\fR] [\fI\-v\fR] [\fI\-d\fR] [\fI\-h\fR] [\fI\-n\fR] [\fI\-t\fR] [\fI\-u\fR] [\fI\-x\fR] [\fI\-z\fR] [\fI\-m\fR] [\fI\-S\fR] [\fI\-V\fR] [\fI\-Dxxx\fR_]
.SH "DESCRIPTION"
.sp
Set the AES key, user ID and other settings in a YubiKey\&. For the complete explanation of the meaning of all parameters, see the reference manual: YubiKey manual (https://www\&.yubico\&.com/wp\-content/uploads/2015/03/YubiKeyManual_v3\&.4\&.pdf)
@@ -175,7 +175,7 @@
.RS 4
Program NFC NDEF text
.RE
-.SS "YubiKey 3\&.0 and above"
+.SS "YubiKey 3 and 4 only"
.PP
\fB\-m\fR mode
.RS 4
@@ -224,6 +224,7 @@
.RE
.sp
Removing OTP mode also disable communication between ykpersonalize and the YubiKey, further mode changes will have to be done with ykneomgr (for CCID mode) or u2f\-host (for U2F mode)
+.SS "YubiKey 3 and above"
.PP
\fB\-S\fR\fI0605\&...\fR
.RS 4
@@ -301,6 +302,12 @@
.sp
Note that you must remove any whitespace present in these examples before using the values\&.
.RE
+.SS "YubiKey 5 and above"
+.PP
+\fB\-D\fR\fI0403\&...\fR
+.RS 4
+Set the deviceinfo to use with this YubiKey\&.
+.RE
.SS "YubiKey 2\&.3 and above"
.PP
\fB\-u\fR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykpersonalize.1.adoc new/ykpers-1.19.0/ykpersonalize.1.adoc
--- old/ykpers-1.18.1/ykpersonalize.1.adoc 2017-05-17 08:20:51.000000000 +0200
+++ new/ykpers-1.19.0/ykpersonalize.1.adoc 2018-04-24 10:28:45.000000000 +0200
@@ -11,7 +11,7 @@
== SYNOPSIS
-*ykpersonalize* [__-Nkey__] [__-1__ | __-2__] [__-sfile__] [__-ifile__] [__-fformat__] [__-axxx__] [__-cxxx__] [__-ooption__] [__-y__] [__-v__] [__-d__] [__-h__] [__-n__] [__-t__] [__-u__] [__-x__] [__-z__] [__-m__] [__-S__] [__-V__]
+*ykpersonalize* [__-Nkey__] [__-1__ | __-2__] [__-sfile__] [__-ifile__] [__-fformat__] [__-axxx__] [__-cxxx__] [__-ooption__] [__-y__] [__-v__] [__-d__] [__-h__] [__-n__] [__-t__] [__-u__] [__-x__] [__-z__] [__-m__] [__-S__] [__-V__] [__-Dxxx___]
== DESCRIPTION
@@ -79,7 +79,7 @@
*-t* text:: Program NFC NDEF text
-=== YubiKey 3.0 and above
+=== YubiKey 3 and 4 only
*-m* mode::
@@ -103,6 +103,8 @@
the YubiKey, further mode changes will have to be done with ykneomgr (for CCID mode)
or u2f-host (for U2F mode)
+=== YubiKey 3 and above
+
*-S*'0605...'::
set the scanmap to be used with the YubiKey. It must be 45 unique
@@ -133,6 +135,11 @@
+
Note that you must remove any whitespace present in these examples before using the values.
+=== YubiKey 5 and above
+
+*-D*'0403...'::
+
+Set the deviceinfo to use with this YubiKey.
=== YubiKey 2.3 and above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ykpers-1.18.1/ykpersonalize.c new/ykpers-1.19.0/ykpersonalize.c
--- old/ykpers-1.18.1/ykpersonalize.c 2017-12-11 08:46:55.000000000 +0100
+++ new/ykpers-1.19.0/ykpersonalize.c 2018-04-20 09:34:05.000000000 +0200
@@ -52,6 +52,8 @@
char *acc_code = NULL;
char *new_acc_code = NULL;
unsigned char scan_codes[sizeof(SCAN_MAP)];
+ unsigned char device_info[128];
+ size_t device_info_len = 0;
YK_KEY *yk = 0;
YKP_CONFIG *cfg = ykp_alloc();
YK_STATUS *st = ykds_alloc();
@@ -154,7 +156,8 @@
&acc_code, &new_acc_code,
&ndef_type, ndef_string,
&usb_mode, &zap, scan_codes, &cr_timeout,
- &autoeject_timeout, &num_modes_seen, &exit_code)) {
+ &autoeject_timeout, &num_modes_seen,
+ device_info, &device_info_len, &exit_code)) {
goto err;
}
@@ -274,6 +277,8 @@
}
} else if(ykp_command(cfg) == SLOT_SCAN_MAP) {
fprintf(stderr, "A new scanmap will be written.\n");
+ } else if(ykp_command(cfg) == SLOT_YK4_SET_DEVICE_INFO) {
+ fprintf(stderr, "New device information will be written.\n");
} else if(zap) {
fprintf(stderr, "Configuration in slot %d will be deleted\n", ykp_config_num(cfg));
} else {
@@ -387,6 +392,12 @@
if(verbose)
printf(" failure\n");
goto err;
+ }
+ } else if(ykp_command(cfg) == SLOT_YK4_SET_DEVICE_INFO) {
+ if(!yk_write_device_info(yk, device_info, device_info_len)) {
+ if(verbose)
+ printf(" failure\n");
+ goto err;
}
} else {
YK_CONFIG *ycfg = NULL;