Hello community, here is the log from the commit of package yubico-piv-tool for openSUSE:Factory checked in at 2015-11-16 18:51:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yubico-piv-tool (Old) and /work/SRC/openSUSE:Factory/.yubico-piv-tool.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yubico-piv-tool" Changes: -------- --- /work/SRC/openSUSE:Factory/yubico-piv-tool/yubico-piv-tool.changes 2015-11-11 10:36:11.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yubico-piv-tool.new/yubico-piv-tool.changes 2015-11-16 18:51:22.000000000 +0100 @@ -1,0 +2,6 @@ +Thu Nov 12 14:30:09 UTC 2015 - [email protected] + +- Version 1.1.1 (released 2015-11-11) + - Make sure SCardContext is properly acquired and released. + +------------------------------------------------------------------- Old: ---- yubico-piv-tool-1.1.0.tar.gz yubico-piv-tool-1.1.0.tar.gz.sig New: ---- yubico-piv-tool-1.1.1.tar.gz yubico-piv-tool-1.1.1.tar.gz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yubico-piv-tool.spec ++++++ --- /var/tmp/diff_new_pack.uQ0tfV/_old 2015-11-16 18:51:23.000000000 +0100 +++ /var/tmp/diff_new_pack.uQ0tfV/_new 2015-11-16 18:51:23.000000000 +0100 @@ -18,7 +18,7 @@ %define soname 1 Name: yubico-piv-tool -Version: 1.1.0 +Version: 1.1.1 Release: 0 Summary: Yubico YubiKey NEO CCID Manager License: BSD-2-Clause ++++++ yubico-piv-tool-1.1.0.tar.gz -> yubico-piv-tool-1.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yubico-piv-tool-1.1.0/ChangeLog new/yubico-piv-tool-1.1.1/ChangeLog --- old/yubico-piv-tool-1.1.0/ChangeLog 2015-11-06 16:46:36.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/ChangeLog 2015-11-11 16:47:00.000000000 +0100 @@ -1,3 +1,30 @@ +2015-11-11 Klas Lindfors <[email protected]> + + * lib/ykpiv.c: always reset the context to SCARD_INVALID_CONTEXT + after release + +2015-11-10 Alessio Di Mauro <[email protected]> + + * lib/ykpiv.c: YKPIV: Make sure that context is established only if + it is invalid. + +2015-11-09 Alessio Di Mauro <[email protected]> + + * doc/YKCS11_release_notes.adoc: Added reference to PKCS#11 specs in + the docs. + +2015-11-06 Alessio Di Mauro <[email protected]> + + * NEWS: Reword NEWS file. + +2015-11-06 Alessio Di Mauro <[email protected]> + + * NEWS, configure.ac: Bump version. + +2015-11-06 Alessio Di Mauro <[email protected]> + + * doc/YubiKey_PIV_introduction.adoc: Fix docs. + 2015-11-06 Alessio Di Mauro <[email protected]> * Makefile.am: Apparently order matters. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yubico-piv-tool-1.1.0/NEWS new/yubico-piv-tool-1.1.1/NEWS --- old/yubico-piv-tool-1.1.0/NEWS 2015-11-06 16:29:02.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/NEWS 2015-11-11 18:30:40.000000000 +0100 @@ -1,8 +1,10 @@ yubico-piv-tool NEWS -- History of user-visible changes. -*- outline -*- +* Version 1.1.1 (unreleased) + * Version 1.1.0 (released 2015-11-06) -** Support for YubiKey 4 stuff. +** Add support for new YubiKey 4. ** Add ykcs11. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yubico-piv-tool-1.1.0/configure new/yubico-piv-tool-1.1.1/configure --- old/yubico-piv-tool-1.1.0/configure 2015-11-06 16:43:55.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/configure 2015-11-11 18:31:05.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yubico-piv-tool 1.1.0. +# Generated by GNU Autoconf 2.69 for yubico-piv-tool 1.1.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='yubico-piv-tool' PACKAGE_TARNAME='yubico-piv-tool' -PACKAGE_VERSION='1.1.0' -PACKAGE_STRING='yubico-piv-tool 1.1.0' +PACKAGE_VERSION='1.1.1' +PACKAGE_STRING='yubico-piv-tool 1.1.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1349,7 +1349,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 yubico-piv-tool 1.1.0 to adapt to many kinds of systems. +\`configure' configures yubico-piv-tool 1.1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1419,7 +1419,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yubico-piv-tool 1.1.0:";; + short | recursive ) echo "Configuration of yubico-piv-tool 1.1.1:";; esac cat <<\_ACEOF @@ -1541,7 +1541,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yubico-piv-tool configure 1.1.0 +yubico-piv-tool configure 1.1.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1906,7 +1906,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yubico-piv-tool $as_me 1.1.0, which was +It was created by yubico-piv-tool $as_me 1.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2782,7 +2782,7 @@ # Define the identity of the package. PACKAGE='yubico-piv-tool' - VERSION='1.1.0' + VERSION='1.1.1' cat >>confdefs.h <<_ACEOF @@ -13611,7 +13611,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yubico-piv-tool $as_me 1.1.0, which was +This file was extended by yubico-piv-tool $as_me 1.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13668,7 +13668,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yubico-piv-tool config.status 1.1.0 +yubico-piv-tool config.status 1.1.1 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/yubico-piv-tool-1.1.0/configure.ac new/yubico-piv-tool-1.1.1/configure.ac --- old/yubico-piv-tool-1.1.0/configure.ac 2015-11-06 16:25:10.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/configure.ac 2015-11-11 18:30:40.000000000 +0100 @@ -26,7 +26,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -AC_INIT([yubico-piv-tool], [1.1.0]) +AC_INIT([yubico-piv-tool], [1.1.1]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yubico-piv-tool-1.1.0/doc/YKCS11_release_notes.adoc new/yubico-piv-tool-1.1.1/doc/YKCS11_release_notes.adoc --- old/yubico-piv-tool-1.1.0/doc/YKCS11_release_notes.adoc 2015-11-06 16:25:10.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/doc/YKCS11_release_notes.adoc 2015-11-09 11:42:00.000000000 +0100 @@ -4,6 +4,12 @@ This is a PKCS#11 module that allows to communicate with the PIV application running on a YubiKey. +This module is based on version 2.40 of the PKCS#11 (Cryptoki) +specifications. + +The complete specifications are available at +http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/os/pkcs11-base-v2.40-os.html. + BUILDING ~~~~~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yubico-piv-tool-1.1.0/doc/YubiKey_PIV_introduction.adoc new/yubico-piv-tool-1.1.1/doc/YubiKey_PIV_introduction.adoc --- old/yubico-piv-tool-1.1.0/doc/YubiKey_PIV_introduction.adoc 2015-11-06 14:00:05.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/doc/YubiKey_PIV_introduction.adoc 2015-11-06 16:52:18.000000000 +0100 @@ -1,5 +1,5 @@ Introduction to the YubiKey PIV Application -=============================================== +=========================================== The YubiKey supports the Personal Identity Verification (PIV) card interface specified in NIST SP 800-73 document "Cryptographic @@ -30,7 +30,7 @@ contactless interfaces (contrary to what the specifications mandate). Preparing a for real use ----------------------------- +------------------------ You would typically change the management key to make sure nobody but you can modify the state of the PIV application on the. Make sure to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yubico-piv-tool-1.1.0/lib/ykpiv-version.h new/yubico-piv-tool-1.1.1/lib/ykpiv-version.h --- old/yubico-piv-tool-1.1.0/lib/ykpiv-version.h 2015-11-06 16:43:58.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/lib/ykpiv-version.h 2015-11-11 18:31:20.000000000 +0100 @@ -43,7 +43,7 @@ * version number. Used together with ykneomgr_check_version() to verify * header file and run-time library consistency. */ -#define YKPIV_VERSION_STRING "1.1.0" +#define YKPIV_VERSION_STRING "1.1.1" /** * YKPIV_VERSION_NUMBER @@ -53,7 +53,7 @@ * this symbol will have the value 0x01020300. The last two digits * are only used between public releases, and will otherwise be 00. */ -#define YKPIV_VERSION_NUMBER 0x010100 +#define YKPIV_VERSION_NUMBER 0x010101 /** * YKPIV_VERSION_MAJOR @@ -80,7 +80,7 @@ * level of the header file version number. For example, when the * header version is 1.2.3 this symbol will be 3. */ -#define YKPIV_VERSION_PATCH 0 +#define YKPIV_VERSION_PATCH 1 const char *ykpiv_check_version (const char *req_version); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yubico-piv-tool-1.1.0/lib/ykpiv.c new/yubico-piv-tool-1.1.1/lib/ykpiv.c --- old/yubico-piv-tool-1.1.0/lib/ykpiv.c 2015-11-06 14:00:05.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/lib/ykpiv.c 2015-11-11 16:40:15.000000000 +0100 @@ -103,7 +103,7 @@ } memset(s, 0, sizeof(ykpiv_state)); s->verbose = verbose; - s->context = -1; + s->context = SCARD_E_INVALID_HANDLE; *state = s; return YKPIV_OK; } @@ -120,9 +120,9 @@ state->card = 0; } - if(state->context) { + if(SCardIsValidContext(state->context) == SCARD_S_SUCCESS) { SCardReleaseContext(state->context); - state->context = 0; + state->context = SCARD_E_INVALID_HANDLE; } return YKPIV_OK; @@ -195,6 +195,7 @@ fprintf(stderr, "error: no useable reader found.\n"); } SCardReleaseContext(state->context); + state->context = SCARD_E_INVALID_HANDLE; return YKPIV_PCSC_ERROR; } @@ -205,12 +206,14 @@ unsigned long num_readers = 0; long rc; - rc = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &state->context); - if (rc != SCARD_S_SUCCESS) { - if(state->verbose) { - fprintf (stderr, "error: SCardEstablishContext failed, rc=%08lx\n", rc); + if(SCardIsValidContext(state->context) != SCARD_S_SUCCESS) { + rc = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &state->context); + if (rc != SCARD_S_SUCCESS) { + if(state->verbose) { + fprintf (stderr, "error: SCardEstablishContext failed, rc=%08lx\n", rc); + } + return YKPIV_PCSC_ERROR; } - return YKPIV_PCSC_ERROR; } rc = SCardListReaders(state->context, NULL, NULL, &num_readers); @@ -219,6 +222,7 @@ fprintf (stderr, "error: SCardListReaders failed, rc=%08lx\n", rc); } SCardReleaseContext(state->context); + state->context = SCARD_E_INVALID_HANDLE; return YKPIV_PCSC_ERROR; } @@ -233,6 +237,7 @@ fprintf (stderr, "error: SCardListReaders failed, rc=%08lx\n", rc); } SCardReleaseContext(state->context); + state->context = SCARD_E_INVALID_HANDLE; return YKPIV_PCSC_ERROR; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yubico-piv-tool-1.1.0/tool/yubico-piv-tool.1 new/yubico-piv-tool-1.1.1/tool/yubico-piv-tool.1 --- old/yubico-piv-tool-1.1.0/tool/yubico-piv-tool.1 2015-11-06 16:31:28.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/tool/yubico-piv-tool.1 2015-11-11 18:31:28.000000000 +0100 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.2. -.TH YUBICO-PIV-TOOL "1" "November 2015" "yubico-piv-tool 1.1.0" "User Commands" +.TH YUBICO-PIV-TOOL "1" "November 2015" "yubico-piv-tool 1.1.1" "User Commands" .SH NAME yubico-piv-tool \- Yubico PIV tool .SH SYNOPSIS .B yubico-piv-tool [\fI\,OPTIONS\/\fR]... .SH DESCRIPTION -yubico\-piv\-tool 1.1.0 +yubico\-piv\-tool 1.1.1 .TP \fB\-h\fR, \fB\-\-help\fR Print help and exit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yubico-piv-tool-1.1.0/ykcs11/ykcs11-version.h new/yubico-piv-tool-1.1.1/ykcs11/ykcs11-version.h --- old/yubico-piv-tool-1.1.0/ykcs11/ykcs11-version.h 2015-11-06 16:43:58.000000000 +0100 +++ new/yubico-piv-tool-1.1.1/ykcs11/ykcs11-version.h 2015-11-11 18:31:20.000000000 +0100 @@ -42,7 +42,7 @@ * version number. Used together with ykneomgr_check_version() to verify * header file and run-time library consistency. */ -#define YKCS11_VERSION_STRING "1.1.0" +#define YKCS11_VERSION_STRING "1.1.1" /** * YKCS11_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 YKCS11_VERSION_NUMBER 0x010100 +#define YKCS11_VERSION_NUMBER 0x010101 /** * YKCS11_VERSION_MAJOR @@ -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 YKCS11_VERSION_PATCH 0 +#define YKCS11_VERSION_PATCH 1 const char *ykcs11_check_version (const char *req_version);
