From: Simon Josefsson Date: Wed, 20 Jul 2011 10:16:45 +0000 (+0200) Subject: Add NEWS entry. Bump version. Fixed shared library version. Fix code style. X-Git-Tag: v1.6.0~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8015126ca6a45e04395685fca703878913159882;p=yubikey-personalization.old Add NEWS entry. Bump version. Fixed shared library version. Fix code style. --- diff --git a/NEWS b/NEWS index 564ff1e..2e03eee 100644 --- a/NEWS +++ b/NEWS @@ -1,9 +1,15 @@ Yubikey-personalize NEWS -- History of user-visible changes. -*- outline -*- -* Version 1.5.3 (unreleased) +* Version 1.6.0 (unreleased) ** Accept firmware version 2.3.x too. +** ykpersonalize: New parameter -oath-imf for OATH Initial Moving Factor. +Contributed by Frank Cusack . + +** libykpers: New apis for setting/getting OATH Initial Moving Factor. +The APIs are ykp_set_oath_imf and ykp_get_oath_imf. + * Version 1.5.2 (released 2011-05-10) ** Added an udev file. diff --git a/configure.ac b/configure.ac index 47491e7..2e4a460 100644 --- a/configure.ac +++ b/configure.ac @@ -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.5.3], +AC_INIT([yubikey-personalization], [1.6.0], [yubico-devel@googlegroups.com], [ykpers], [http://code.google.com/p/yubikey-personalization/]) AC_CONFIG_AUX_DIR([build-aux]) @@ -36,9 +36,9 @@ AC_CONFIG_MACRO_DIR([m4]) # Interfaces changed/added/removed: CURRENT++ REVISION=0 # Interfaces added: AGE++ # Interfaces removed: AGE=0 -AC_SUBST(LT_CURRENT, 6) -AC_SUBST(LT_REVISION, 2) -AC_SUBST(LT_AGE, 5) +AC_SUBST(LT_CURRENT, 7) +AC_SUBST(LT_REVISION, 0) +AC_SUBST(LT_AGE, 6) AM_INIT_AUTOMAKE([-Wall -Werror]) AC_PROG_CC diff --git a/libykpers-1.map b/libykpers-1.map index 582da7d..caa916c 100644 --- a/libykpers-1.map +++ b/libykpers-1.map @@ -1,5 +1,5 @@ # Written by Simon Josefsson . -# Copyright (c) 2008, 2009 Yubico AB +# Copyright (c) 2008, 2009, 2011 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -116,7 +116,13 @@ LIBYKPERS_1.5 { yk_wait_for_key_status; yk_read_response_from_key; yk_get_serial; +# Variables: +} LIBYKPERS_1.4; + +LIBYKPERS_1.6 { + global: +# Functions: ykp_set_oath_imf; ykp_get_oath_imf; # Variables: -} LIBYKPERS_1.4; +} LIBYKPERS_1.5; diff --git a/ykpers.c b/ykpers.c index c833653..42756c1 100644 --- a/ykpers.c +++ b/ykpers.c @@ -313,15 +313,15 @@ int ykp_set_oath_imf(YKP_CONFIG *cfg, unsigned long imf) { if (!vcheck_v22_or_greater(cfg)) { ykp_errno = YKP_EYUBIKEYVER; - return 0; + return 0; } if (imf > 65535*16) { ykp_errno = YKP_EINVAL; - return 0; + return 0; } if (imf % 16 != 0) { ykp_errno = YKP_EINVAL; - return 0; + return 0; } /* IMF/16 is 16 bits stored big-endian in uid[4] */ imf /= 16; @@ -332,11 +332,13 @@ int ykp_set_oath_imf(YKP_CONFIG *cfg, unsigned long imf) unsigned long ykp_get_oath_imf(YKP_CONFIG *cfg) { - if (!vcheck_v22_or_greater(cfg)) - return 0; + if (!vcheck_v22_or_greater(cfg)) { + return 0; + } /* we can't do a simple cast due to alignment issues */ - return ((cfg->ykcore_config.uid[4] << 8) | cfg->ykcore_config.uid[5]) << 4; + return ((cfg->ykcore_config.uid[4] << 8) + | cfg->ykcore_config.uid[5]) << 4; } #define def_set_charfield(fnname,fieldname,size,extra,vcheck) \