Yubikey-personalize NEWS -- History of user-visible changes. -*- outline -*-
-* Version 1.13.1 (unreleased)
+* Version 1.14.0 (unreleased)
* Version 1.13.0 (released 2013-04-22)
# (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.13.1],
+AC_INIT([yubikey-personalization], [1.14.0],
[yubico-devel@googlegroups.com], [ykpers],
[http://code.google.com/p/yubikey-personalization/])
AC_CONFIG_AUX_DIR([build-aux])
# Interfaces changed/added/removed: CURRENT++ REVISION=0
# Interfaces added: AGE++
# Interfaces removed: AGE=0
-AC_SUBST(LT_CURRENT, 14)
-AC_SUBST(LT_REVISION, 1)
-AC_SUBST(LT_AGE, 13)
+AC_SUBST(LT_CURRENT, 15)
+AC_SUBST(LT_REVISION, 0)
+AC_SUBST(LT_AGE, 14)
AM_INIT_AUTOMAKE([1.11.3 -Wall -Werror])
AM_SILENT_RULES([yes])
ykp_import_config;
# Variables:
} LIBYKPERS_1.12;
+
+LIBYKPERS_1.14 {
+ global:
+# Functions:
+ ykp_clear_config;
+# Variables:
+} LIBYKPERS_1.13;
* we reset them here and, as a consequence of that, require the
* mode choosing options to be specified before any other.
*/
- ycfg->tktFlags = 0;
- ycfg->cfgFlags = 0;
- ycfg->extFlags = 0;
+ ykp_clear_config(cfg);
mode_chosen = 1;
}
const char *raw_mode;
int mode = MODE_OTP_YUBICO;
struct map_st *p;
- YK_CONFIG ycfg;
-
- ycfg.tktFlags = 0;
- ycfg.extFlags = 0;
- ycfg.cfgFlags = 0;
if(!jobj || !yprod_json || !jmode || !options) {
ykp_errno = YKP_EINVAL;
return 0;
}
+int ykp_clear_config(YKP_CONFIG *cfg)
+{
+ if(cfg) {
+ cfg->ykcore_config.tktFlags = 0;
+ cfg->ykcore_config.cfgFlags = 0;
+ cfg->ykcore_config.extFlags = 0;
+ return 1;
+ }
+ return 0;
+}
+
void ykp_configure_version(YKP_CONFIG *cfg, YK_STATUS *st)
{
cfg->yk_major_version = st->versionMajor;
int ykp_set_extflag_DORMANT (YKP_CONFIG *cfg, bool state);
int ykp_set_extflag_LED_INV (YKP_CONFIG *cfg, bool state);
+int ykp_clear_config(YKP_CONFIG *cfg);
+
int ykp_write_config(const YKP_CONFIG *cfg,
int (*writer)(const char *buf, size_t count,
void *userdata),
}
if (inf) {
+ if(!ykp_clear_config(cfg))
+ goto err;
if(!fread(data, 1, 1024, inf))
goto err;
if (!ykp_import_config(cfg, data, strlen(data), data_format))