From: Fredrik Thulin Date: Fri, 25 May 2012 12:00:29 +0000 (+0200) Subject: Merge branch 'master' into private/testing+ndef X-Git-Tag: v1.7.0~1^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15a5ffeaa5767b25f3de463e2143e5290ed8e5ad;p=yubikey-personalization Merge branch 'master' into private/testing+ndef Conflicts: NEWS configure.ac --- 15a5ffeaa5767b25f3de463e2143e5290ed8e5ad diff --cc NEWS index c2de6e9,dfd5a57..92c4935 --- a/NEWS +++ b/NEWS @@@ -1,32 -1,12 +1,39 @@@ Yubikey-personalize NEWS -- History of user-visible changes. -*- outline -*- +* Version 1.7.0 (unreleased) + +** Add support for new features in YubiKey 2.3: +ALLOW_UPDATE flag that allows updating of configuration in slots. +Update command (-u) to do update of existing config. +Swap command (-x) to swap contents of two updatable slots +DORMANT flag that's settable/removable if ALLOW_UPDATE is set +USE_NUMERIC_KEYPAD flag for sending the OATH OTP using keypad scan codes instead +FAST_TRIG flag for faster triggering of slot one if slot two is empty + +** Change the library around some to make the 2.3 features available. +Use ykp_alloc() instead of ykp_create_config(). +Use ykp_configure_version() instead of ykp_configure_for() to set the version. +Use ykp_configure_command() instead of ykp_configure_for() to set slot. +Use yk_write_command() instead of yk_write_config(). + +The new commands doesn't set any default configuration at all. + +** Add library support for the YubiKey NEO beta +ykp_construct_ndef_uri() for preparing a URI to write. +ykp_construct_ndef_text() for preparing a text to write. +yk_write_ndef() to write the constructed NDEF. + +** Add support for the YubiKey NEO beta +Writing NDEF URI with -n http://example.com/foo/ +Writing NDEF Text record with -t example + + * Version 1.6.4 (released 2012-05-24) + + ** Implement option -ooath-id to easily set OATH token identifier. + + ** Fix numerous compiler warnings from clang. Thanks to + Clemens Lang . + * Version 1.6.3 (released 2011-12-15) ** No real change for regular users. Fix a bug in a test case for diff --cc configure.ac index 5ccc3f9,0600a0b..f9494e9 --- a/configure.ac +++ b/configure.ac @@@ -36,9 -36,9 +36,6 @@@ AC_CONFIG_MACRO_DIR([m4] # Interfaces changed/added/removed: CURRENT++ REVISION=0 # Interfaces added: AGE++ # Interfaces removed: AGE=0 - AC_SUBST(LT_CURRENT, 8) - AC_SUBST(LT_REVISION, 0) - AC_SUBST(LT_AGE, 7) -AC_SUBST(LT_CURRENT, 7) -AC_SUBST(LT_REVISION, 3) -AC_SUBST(LT_AGE, 6) AM_INIT_AUTOMAKE([-Wall -Werror]) AM_SILENT_RULES([yes]) diff --cc tests/test_args_to_config.c index 58fbea1,6787c93..974b4c8 --- a/tests/test_args_to_config.c +++ b/tests/test_args_to_config.c @@@ -300,11 -298,10 +301,11 @@@ int _test_non_config_args(void optind = 0; /* getopt reinit */ /* copy version number from st into cfg */ - assert(ykp_configure_for(cfg, 1, st) == 1); + ykp_configure_version(cfg, st); + //assert(ykp_configure_for(cfg, 1, st) == 1); - /* call args_to_config from ykpersonalize.c with a fake set of program arguments */ - rc = args_to_config(argc, argv, cfg, + /* call args_to_config from ykpers-args.c with a fake set of program arguments */ + rc = args_to_config(argc, argv, cfg, yk, &infname, &outfname, &autocommit, salt, st, &verbose, diff --cc ykpers-args.c index 678999e,a196869..9862488 --- a/ykpers-args.c +++ b/ykpers-args.c @@@ -42,11 -40,11 +42,14 @@@ #include /* To get yubikey_modhex_encode and yubikey_hex_encode */ #include + #define YUBICO_OATH_VENDOR_ID_HEX 0xe1 /* UB as hex */ + #define YUBICO_HOTP_EVENT_TOKEN_TYPE 0x63 /* HE as hex */ + const char *usage = "Usage: ykpersonalize [options]\n" +"-u update configuration without overwriting. This is only available\n" +" in YubiKey 2.3 and later. EXTFLAG_ALLOW_UPDATE will be set by\n" +" default\n" "-1 change the first configuration. This is the default and\n" " is normally used for true OTP generation.\n" " In this configuration, TKTFLAG_APPEND_CR is set by default.\n" diff --cc ykpersonalize.c index e8a393a,aa93f7c..0ec0784 --- a/ykpersonalize.c +++ b/ykpersonalize.c @@@ -120,8 -118,11 +120,8 @@@ int main(int argc, char **argv } } - if (!ykp_configure_for(cfg, 1, st)) - goto err; - /* Parse all arguments in a testable way */ - if (! args_to_config(argc, argv, cfg, + if (! args_to_config(argc, argv, cfg, yk, &infname, &outfname, &autocommit, salt, st, &verbose,