pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

opensc update for review



The following builds, and I'm running the PLIST changes by upstream.
Note that the opensc library is now internal and .h/config is withdrawn.

(Support for Finnish id cards at 2048 bits is now in the upstream
version, so those patches are dropped.)

If you care about opensc, please review.  Barring objections I'm likely
to commit this update this week.


Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/security/opensc/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile    24 Oct 2012 08:33:51 -0000      1.11
+++ Makefile    25 Nov 2012 15:57:35 -0000
@@ -5,10 +5,10 @@ LICENSE=              gnu-lgpl-v2.1
 
 .include "../../security/opensc/Makefile.common"
 
-PKGREVISION=   4
-
 CONFIGURE_ARGS+=       --disable-nsplugin
 
+CONFIGURE_ARGS+=       
--with-xsl-stylesheetsdir=${BUILDLINK_PREFIX.docbook-xsl}/share/xsl/docbook
+
 EGDIR=                 ${PREFIX}/share/examples/opensc
 CONF_FILES+=           ${EGDIR}/opensc.conf ${PKG_SYSCONFDIR}/opensc.conf
 
@@ -16,6 +16,10 @@ INSTALLATION_DIRS=   ${EGDIR}
 post-install:
        ${INSTALL_DATA} ${WRKSRC}/etc/opensc.conf ${DESTDIR}${EGDIR}
 
+# build tools for doc
+.include "../../textproc/libxslt/buildlink3.mk"
+.include "../../textproc/docbook-xsl/buildlink3.mk"
+
 .include "../../devel/libltdl/buildlink3.mk"
 .include "../../devel/readline/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
Index: Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/security/opensc/Makefile.common,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile.common
--- Makefile.common     24 Oct 2012 08:33:51 -0000      1.8
+++ Makefile.common     25 Nov 2012 15:57:35 -0000
@@ -3,7 +3,7 @@
 # used by security/opensc/Makefile
 # used by security/opensc-signer/Makefile
 
-OPENSC_PKG_VERSION=    0.11.13
+OPENSC_PKG_VERSION=    0.12.2
 DISTNAME=              opensc-${OPENSC_PKG_VERSION}
 CATEGORIES=            security
 MASTER_SITES=          http://www.opensc-project.org/files/opensc/
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/security/opensc/PLIST,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST
--- PLIST       1 Sep 2010 15:59:22 -0000       1.5
+++ PLIST       25 Nov 2012 15:57:35 -0000
@@ -1,10 +1,8 @@
 @comment $NetBSD: PLIST,v 1.5 2010/09/01 15:59:22 drochner Exp $
-bin/cardos-info
 bin/cardos-tool
 bin/cryptoflex-tool
 bin/eidenv
 bin/netkey-tool
-bin/opensc-config
 bin/opensc-explorer
 bin/opensc-tool
 bin/piv-tool
@@ -12,113 +10,43 @@ bin/pkcs11-tool
 bin/pkcs15-crypt
 bin/pkcs15-init
 bin/pkcs15-tool
-bin/rutoken-tool
 bin/westcos-tool
-include/opensc/asn1.h
-include/opensc/cardctl.h
-include/opensc/compression.h
-include/opensc/emv.h
-include/opensc/errors.h
-include/opensc/log.h
-include/opensc/opensc.h
-include/opensc/pkcs11-opensc.h
-include/opensc/pkcs11.h
-include/opensc/pkcs15-init.h
-include/opensc/pkcs15.h
-include/opensc/scconf.h
-include/opensc/types.h
-include/opensc/ui.h
 lib/libopensc.la
-lib/libpkcs15init.la
-lib/libscconf.la
 lib/onepin-opensc-pkcs11.la
 lib/opensc-pkcs11.la
 lib/pkcs11-spy.la
 lib/pkcs11/onepin-opensc-pkcs11.so
 lib/pkcs11/opensc-pkcs11.so
 lib/pkcs11/pkcs11-spy.so
-lib/pkgconfig/libopensc.pc
-lib/pkgconfig/libpkcs15init.pc
-lib/pkgconfig/libscconf.pc
 man/man1/cardos-tool.1
 man/man1/cryptoflex-tool.1
+man/man1/eidenv.1
 man/man1/netkey-tool.1
-man/man1/opensc-config.1
 man/man1/opensc-explorer.1
 man/man1/opensc-tool.1
+man/man1/piv-tool.1
 man/man1/pkcs11-tool.1
 man/man1/pkcs15-crypt.1
 man/man1/pkcs15-init.1
 man/man1/pkcs15-tool.1
 man/man1/westcos-tool.1
-man/man3/sc_app_info_t.3
-man/man3/sc_append_record.3
-man/man3/sc_asn1_decode.3
-man/man3/sc_asn1_encode.3
-man/man3/sc_asn1_entry.3
-man/man3/sc_asn1_find_tag.3
-man/man3/sc_asn1_print_tags.3
-man/man3/sc_asn1_put_tag.3
-man/man3/sc_asn1_read_tag.3
-man/man3/sc_asn1_skip_tag.3
-man/man3/sc_asn1_verify_tag.3
-man/man3/sc_base64_decode.3
-man/man3/sc_base64_encode.3
-man/man3/sc_card_ctl.3
-man/man3/sc_card_t.3
-man/man3/sc_card_valid.3
-man/man3/sc_check_sw.3
-man/man3/sc_connect_card.3
-man/man3/sc_copy_asn1_entry.3
-man/man3/sc_create_file.3
-man/man3/sc_delete_file.3
-man/man3/sc_delete_record.3
-man/man3/sc_der_clear.3
-man/man3/sc_der_copy.3
-man/man3/sc_detect_card_presence.3
-man/man3/sc_disconnect_card.3
-man/man3/sc_enum_apps.3
-man/man3/sc_establish_context.3
-man/man3/sc_file_dup.3
-man/man3/sc_file_free.3
-man/man3/sc_file_new.3
-man/man3/sc_file_t.3
-man/man3/sc_find_app_by_aid.3
-man/man3/sc_find_pkcs15_app.3
-man/man3/sc_format_apdu.3
-man/man3/sc_format_asn1_entry.3
-man/man3/sc_free_apps.3
-man/man3/sc_get_cache_dir.3
-man/man3/sc_get_challenge.3
-man/man3/sc_get_data.3
-man/man3/sc_list_files.3
-man/man3/sc_lock.3
-man/man3/sc_make_cache_dir.3
-man/man3/sc_put_data.3
-man/man3/sc_read_binary.3
-man/man3/sc_read_record.3
-man/man3/sc_release_context.3
-man/man3/sc_select_file.3
-man/man3/sc_set_card_driver.3
-man/man3/sc_strerror.3
-man/man3/sc_transmit_apdu.3
-man/man3/sc_unlock.3
-man/man3/sc_update_binary.3
-man/man3/sc_update_dir.3
-man/man3/sc_update_record.3
-man/man3/sc_wait_for_event.3
-man/man3/sc_write_binary.3
-man/man3/sc_write_record.3
 man/man5/pkcs15-profile.5
 share/doc/opensc/NEWS
-share/doc/opensc/README
 share/examples/opensc/opensc.conf
 share/opensc/asepcos.profile
+share/opensc/authentic.profile
 share/opensc/cardos.profile
 share/opensc/cyberflex.profile
 share/opensc/entersafe.profile
 share/opensc/flex.profile
 share/opensc/gpk.profile
+share/opensc/ias_adele_admin1.profile
+share/opensc/ias_adele_admin2.profile
+share/opensc/ias_adele_common.profile
+share/opensc/iasecc.profile
+share/opensc/iasecc_admin_eid.profile
+share/opensc/iasecc_generic_oberthur.profile
+share/opensc/iasecc_generic_pki.profile
 share/opensc/incrypto34.profile
 share/opensc/jcop.profile
 share/opensc/miocos.profile
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/security/opensc/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo    24 Oct 2012 08:33:51 -0000      1.9
+++ distinfo    25 Nov 2012 15:57:35 -0000
@@ -1,17 +1,12 @@
 $NetBSD: distinfo,v 1.9 2012/10/24 08:33:51 manu Exp $
 
-SHA1 (opensc-0.11.13.tar.gz) = 408b374286004c3df15ec17856f69fd4c2a1aceb
-RMD160 (opensc-0.11.13.tar.gz) = cd900866e51cd64fa7c5a3287cd58193dec26528
-Size (opensc-0.11.13.tar.gz) = 1513327 bytes
-SHA1 (patch-aa) = ad1c02161590c43170137d1deeaf5e88e7fef1ce
-SHA1 (patch-ab) = 6d3d055abd1b94c7024838b9b25cc6005af0d36a
-SHA1 (patch-ac) = 6c77415312d1ab149a9cbae9c49f4cf31c950502
-SHA1 (patch-ad) = a618df0e8bc59af9ccea3f3b423b363e09ab0a4c
-SHA1 (patch-ae) = 94ca059a2e9bf5689f4193587247e443213df9a4
-SHA1 (patch-af) = 3b8db1b680c833940973f11b8abb47e34fa5ecd0
-SHA1 (patch-ag) = 1d2de187008d4ce9aac1f97f829aafd035324082
-SHA1 (patch-ah) = e9a8e3aa06af5a7ce47015f8eba41fd2bb12b32d
-SHA1 (patch-configure) = 65af2389d4a3b875ea206542ac94446e0bfc4796
-SHA1 (patch-src_libopensc_card-setcos.c) = 
209bf0a92f9872635ea06d5ea9a7742c7874d61d
-SHA1 (patch-src_libopensc_cards.h) = ebc1db10feda1b2f6a666842120772908c778db7
-SHA1 (patch-src_pkcs11_pkcs11-global.c) = 
06c93969a04c930a87a607f6d48a13197c1307bf
+SHA1 (opensc-0.12.2.tar.gz) = 8c34be52eb94025eb181c02b466223901bef744c
+RMD160 (opensc-0.12.2.tar.gz) = 45504135db05fd404a357ebd8bea047c5c8604dc
+Size (opensc-0.12.2.tar.gz) = 1738553 bytes
+SHA1 (patch-aa) = a58499f309def6c76b84eca1d2598ed6423e7064
+SHA1 (patch-ab) = 1992f8b61bae2b88b000df7e1c046c365b92d552
+SHA1 (patch-configure) = fcd938ec3f269642fbd577868768c8ac67270be6
+SHA1 (patch-src_common_compat__getopt.c) = 
5012394a19ac978051827184cc1add4abba8b703
+SHA1 (patch-src_common_compat__getopt.h) = 
5a95f97a8d3b4ad322bca3a72bb1571d1a74f7f1
+SHA1 (patch-src_common_compat__getopt__main.c) = 
81cef051c5720c9badf16454d948402c32976de6
+SHA1 (patch-src_pkcs11_pkcs11-global.c) = 
ed877462c28405af6725cb0e321cf7a1940ca4a8
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/security/opensc/patches/patch-aa,v
retrieving revision 1.2
diff -u -p -r1.2 patch-aa
--- patches/patch-aa    1 Sep 2010 15:59:23 -0000       1.2
+++ patches/patch-aa    25 Nov 2012 15:57:35 -0000
@@ -1,8 +1,8 @@
 $NetBSD: patch-aa,v 1.2 2010/09/01 15:59:23 drochner Exp $
 
---- etc/Makefile.in.orig       2010-02-16 09:32:17.000000000 +0000
+--- etc/Makefile.in.orig       2011-07-15 10:47:01.000000000 +0000
 +++ etc/Makefile.in
-@@ -471,12 +471,7 @@ opensc.conf: opensc.conf.in force
+@@ -466,12 +466,7 @@ opensc.conf: opensc.conf.in force
                -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
                -e 's|@DEFAULT_PCSC_PROVIDER[@]|$(DEFAULT_PCSC_PROVIDER)|g' \
                < $< > $@
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/security/opensc/patches/patch-ab,v
retrieving revision 1.2
diff -u -p -r1.2 patch-ab
--- patches/patch-ab    1 Sep 2010 15:59:23 -0000       1.2
+++ patches/patch-ab    25 Nov 2012 15:57:35 -0000
@@ -1,29 +1,11 @@
 $NetBSD: patch-ab,v 1.2 2010/09/01 15:59:23 drochner Exp $
 
---- etc/opensc.conf.in.orig    2010-02-16 09:03:28.000000000 +0000
+--- etc/opensc.conf.in.orig    2011-07-05 11:28:53.000000000 +0000
 +++ etc/opensc.conf.in
-@@ -47,6 +47,7 @@ app default {
-       # last entry in reader_drivers list
-       #
-       # reader_drivers = openct, pcsc, ctapi;
-+      reader_drivers = pcsc, ctapi;
- 
-       reader_driver ctapi {
-               # module /usr/local/towitoko/lib/libtowitoko.so {
-@@ -87,7 +88,7 @@ app default {
+@@ -309,6 +309,7 @@ app default {
                #
-               # Enable pinpad if detected (PC/SC v2.0.2 Part 10)
-               # Default: false
--              # enable_pinpad = true;
-+              enable_pinpad = true;
-               #
-               # Use specific pcsc provider.
-               # Default: @DEFAULT_PCSC_PROVIDER@
-@@ -265,7 +266,7 @@ app default {
-               # Prefer pkcs15 emulation code before
-               # the normal pkcs15 processing.
                # Default: no
--              # try_emulation_first = yes;
+               # try_emulation_first = yes;
 +              try_emulation_first = yes;
                
                # Enable builtin emulators.
Index: patches/patch-ac
===================================================================
RCS file: patches/patch-ac
diff -N patches/patch-ac
--- patches/patch-ac    1 Sep 2010 15:59:23 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,99 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2010/09/01 15:59:23 drochner Exp $
-
---- src/signer/dialog.c.orig   2010-02-16 09:03:25.000000000 +0000
-+++ src/signer/dialog.c
-@@ -15,31 +15,31 @@ struct entry_parm_s {
-   char *buffer;
- };
- 
--static AssuanError
-+static gpg_error_t
- getpin_cb (void *opaque, const void *buffer, size_t length)
- {
-   struct entry_parm_s *parm = (struct entry_parm_s *) opaque;
- 
-   /* we expect the pin to fit on one line */
-   if (parm->lines || length >= parm->size)
--    return ASSUAN_Too_Much_Data;
-+    return gpg_error(GPG_ERR_ASS_TOO_MUCH_DATA);
- 
-   /* fixme: we should make sure that the assuan buffer is allocated in
-      secure memory or read the response byte by byte */
-   memcpy(parm->buffer, buffer, length);
-   parm->buffer[length] = 0;
-   parm->lines++;
--  return (AssuanError) 0;
-+  return gpg_error(GPG_ERR_NO_ERROR);
- }
- 
- int ask_and_verify_pin_code(struct sc_pkcs15_card *p15card,
-                           struct sc_pkcs15_object *pin)
- {
--      int r;
-+      gpg_error_t r;
-       size_t len;
-       const char *argv[3];
-       const char *pgmname = PIN_ENTRY;
--      ASSUAN_CONTEXT ctx;
-+      assuan_context_t ctx = NULL;
-       char buf[500];
-       char errtext[100];
-       struct entry_parm_s parm;
-@@ -48,16 +48,26 @@ int ask_and_verify_pin_code(struct sc_pk
-       argv[0] = pgmname;
-       argv[1] = NULL;
-       
--      r = assuan_pipe_connect(&ctx, pgmname, (char **) argv, NULL);
-+      assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT);
-+
-+      r = assuan_new(&ctx);
-+      if (r) {
-+              printf("Can't initialize assuan context: %s\n)",
-+                      gpg_strerror(r));
-+              goto err;
-+      }
-+      
-+      r = assuan_pipe_connect(ctx, pgmname, (const char **) argv, \
-+                              NULL, NULL, NULL, 0);
-       if (r) {
-               printf("Can't connect to the PIN entry module: %s\n",
--                     assuan_strerror((AssuanError) r));
-+                     gpg_strerror(r));
-               goto err;
-       }
-       sprintf(buf, "SETDESC Enter PIN [%s] for digital signing  ", 
pin->label);
-       r = assuan_transact(ctx, buf, NULL, NULL, NULL, NULL, NULL, NULL);
-       if (r) {
--              printf("SETDESC: %s\n", assuan_strerror((AssuanError) r));
-+              printf("SETDESC: %s\n", gpg_strerror(r));
-               goto err;
-       }
-       errtext[0] = 0;
-@@ -71,12 +81,12 @@ int ask_and_verify_pin_code(struct sc_pk
-               parm.size = sizeof(buf);
-               parm.buffer = buf;
-               r = assuan_transact(ctx, "GETPIN", getpin_cb, &parm, NULL, 
NULL, NULL, NULL);
--              if (r == ASSUAN_Canceled) {
--                      assuan_disconnect(ctx);
-+              if (gpg_err_code(r) == GPG_ERR_ASS_CANCELED) {
-+                      assuan_release(ctx);
-                       return -2;
-               }
-               if (r) {
--                      printf("GETPIN: %s\n", assuan_strerror((AssuanError) 
r));
-+                      printf("GETPIN: %s\n", gpg_strerror(r));
-                       goto err;
-               }
-               len = strlen(buf);
-@@ -104,9 +114,9 @@ int ask_and_verify_pin_code(struct sc_pk
-                       break;
-       }
- 
--      assuan_disconnect(ctx); 
-+      assuan_release(ctx);
-       return 0;
- err:  
--      assuan_disconnect(ctx);
-+      assuan_release(ctx);
-       return -1;
- }
Index: patches/patch-ad
===================================================================
RCS file: patches/patch-ad
diff -N patches/patch-ad
--- patches/patch-ad    1 Sep 2010 15:59:23 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2010/09/01 15:59:23 drochner Exp $
-
---- configure.orig     2010-02-16 09:32:16.000000000 +0000
-+++ configure
-@@ -14239,7 +14239,7 @@ fi
- 
- 
- 
--  tmp=1:0.9.2
-+  tmp=2:2.0.0
-   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
-     req_libassuan_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
-     min_libassuan_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
Index: patches/patch-ae
===================================================================
RCS file: patches/patch-ae
diff -N patches/patch-ae
--- patches/patch-ae    16 Dec 2010 18:00:59 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-ae,v 1.1 2010/12/16 18:00:59 drochner Exp $
-
---- src/libopensc/card-acos5.c.orig    2010-02-16 09:03:28.000000000 +0000
-+++ src/libopensc/card-acos5.c
-@@ -140,8 +140,8 @@ static int acos5_get_serialnr(sc_card_t 
-       /*
-        * Cache serial number.
-        */
--      memcpy(card->serialnr.value, apdu.resp, apdu.resplen);
--      card->serialnr.len = apdu.resplen;
-+      memcpy(card->serialnr.value, apdu.resp, MIN(apdu.resplen, 
SC_MAX_SERIALNR));
-+      card->serialnr.len = MIN(apdu.resplen, SC_MAX_SERIALNR);
- 
-       /*
-        * Copy and return serial number.
Index: patches/patch-af
===================================================================
RCS file: patches/patch-af
diff -N patches/patch-af
--- patches/patch-af    16 Dec 2010 18:00:59 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-af,v 1.1 2010/12/16 18:00:59 drochner Exp $
-
---- src/libopensc/card-atrust-acos.c.orig      2010-02-16 09:03:28.000000000 
+0000
-+++ src/libopensc/card-atrust-acos.c
-@@ -853,8 +853,8 @@ static int acos_get_serialnr(sc_card_t *
-       if (apdu.sw1 != 0x90 || apdu.sw2 != 0x00)
-               return SC_ERROR_INTERNAL;
-       /* cache serial number */
--      memcpy(card->serialnr.value, apdu.resp, apdu.resplen);
--      card->serialnr.len = apdu.resplen;
-+      memcpy(card->serialnr.value, apdu.resp, MIN(apdu.resplen, 
SC_MAX_SERIALNR));
-+      card->serialnr.len = MIN(apdu.resplen, SC_MAX_SERIALNR);
-       /* copy and return serial number */
-       memcpy(serial, &card->serialnr, sizeof(*serial));
-       return SC_SUCCESS;
Index: patches/patch-ag
===================================================================
RCS file: patches/patch-ag
diff -N patches/patch-ag
--- patches/patch-ag    16 Dec 2010 18:00:59 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2010/12/16 18:00:59 drochner Exp $
-
---- src/libopensc/card-starcos.c.orig  2010-02-16 09:03:28.000000000 +0000
-+++ src/libopensc/card-starcos.c
-@@ -1289,8 +1289,8 @@ static int starcos_get_serialnr(sc_card_
-       if (apdu.sw1 != 0x90 || apdu.sw2 != 0x00)
-               return SC_ERROR_INTERNAL;
-       /* cache serial number */
--      memcpy(card->serialnr.value, apdu.resp, apdu.resplen);
--      card->serialnr.len = apdu.resplen;
-+      memcpy(card->serialnr.value, apdu.resp, MIN(apdu.resplen, 
SC_MAX_SERIALNR));
-+      card->serialnr.len = MIN(apdu.resplen, SC_MAX_SERIALNR);
-       /* copy and return serial number */
-       memcpy(serial, &card->serialnr, sizeof(*serial));
-       return SC_SUCCESS;
Index: patches/patch-ah
===================================================================
RCS file: patches/patch-ah
diff -N patches/patch-ah
--- patches/patch-ah    16 Dec 2010 18:00:59 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2010/12/16 18:00:59 drochner Exp $
-
---- src/libopensc/internal.h.orig      2010-02-16 09:03:28.000000000 +0000
-+++ src/libopensc/internal.h
-@@ -39,6 +39,10 @@ extern "C" {
- #include <windows.h>
- #endif
- 
-+#ifndef MIN
-+#define MIN(a,b) ((a) < (b) ? (a) : (b))
-+#endif
-+
- #define SC_FILE_MAGIC                 0x14426950
- #define SC_CARD_MAGIC                 0x27182818
- #define SC_CTX_MAGIC                  0x0A550335
Index: patches/patch-configure
===================================================================
RCS file: /cvsroot/pkgsrc/security/opensc/patches/patch-configure,v
retrieving revision 1.1
diff -u -p -r1.1 patch-configure
--- patches/patch-configure     24 Oct 2012 08:33:51 -0000      1.1
+++ patches/patch-configure     25 Nov 2012 15:57:35 -0000
@@ -6,10 +6,9 @@ that can be found in libc.
 Linking with -lpthread hurst with opensc-pkcs11.so since NetBSD-6.0
 libpthread cannot be loaded by dlopen()
 
---- configure.orig     2012-10-19 11:29:36.000000000 +0200
-+++ configure  2012-10-19 14:57:03.000000000 +0200
-@@ -12821,8 +12821,17 @@
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
+--- configure.orig     2011-07-15 10:46:59.000000000 +0000
++++ configure
+@@ -12903,6 +12903,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
  acx_pthread_ok=no
  
@@ -25,4 +24,3 @@ libpthread cannot be loaded by dlopen()
  # We used to check for pthread.h first, but this fails if pthread.h
  # requires special compiler flags (e.g. on True64 or Sequent).
  # It gets checked for in the link test anyway.
- 
Index: patches/patch-src_common_compat__getopt.c
===================================================================
RCS file: patches/patch-src_common_compat__getopt.c
diff -N patches/patch-src_common_compat__getopt.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_common_compat__getopt.c   25 Nov 2012 15:57:35 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/common/compat_getopt.c.orig    2011-07-05 11:28:53.000000000 +0000
++++ src/common/compat_getopt.c
+@@ -25,7 +25,7 @@
+ 
+ #include "config.h"
+ 
+-#if ! ( defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG) && 
defined(HAVE_GETOPT_LONG_ONLY) )
++#if ! ( defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG) )
+ 
+ #include <sys/types.h>
+ #include <stdlib.h>
Index: patches/patch-src_common_compat__getopt.h
===================================================================
RCS file: patches/patch-src_common_compat__getopt.h
diff -N patches/patch-src_common_compat__getopt.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_common_compat__getopt.h   25 Nov 2012 15:57:35 -0000
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- src/common/compat_getopt.h.orig    2011-07-05 11:28:53.000000000 +0000
++++ src/common/compat_getopt.h
+@@ -30,7 +30,7 @@
+ #include "config.h"
+ #endif
+ 
+-#if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG) && 
defined(HAVE_GETOPT_LONG_ONLY)
++#if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG)
+ #include <getopt.h>
+ #else
+ 
+@@ -43,7 +43,6 @@ extern "C" {
+ 
+ #define getopt my_getopt
+ #define getopt_long my_getopt_long
+-#define getopt_long_only my_getopt_long_only
+ #define _getopt_internal _my_getopt_internal
+ #define opterr my_opterr
+ #define optind my_optind
+@@ -86,6 +85,6 @@ extern int _my_getopt_internal(int argc,
+ }
+ #endif
+ 
+-#endif /* HAVE_GETOPT_H && HAVE_GETOPT_LONG && HAVE_GETOPT_LONG_ONLY */
++#endif /* HAVE_GETOPT_H && HAVE_GETOPT_LONG */
+ 
+ #endif /* MY_GETOPT_H_INCLUDED */
Index: patches/patch-src_common_compat__getopt__main.c
===================================================================
RCS file: patches/patch-src_common_compat__getopt__main.c
diff -N patches/patch-src_common_compat__getopt__main.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_common_compat__getopt__main.c     25 Nov 2012 15:57:35 
-0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/common/compat_getopt_main.c.orig       2011-07-05 11:28:53.000000000 
+0000
++++ src/common/compat_getopt_main.c
+@@ -173,6 +173,8 @@ main(int argc, char * argv[])
+               progname);
+     }
+ 
++#define getopt_long_only getopt_long
++
+   /* parse all options from the command line */
+   while ((opt =
+           getopt_long_only(argc, argv, shortopts, longopts, &longind)) != -1)
Index: patches/patch-src_libopensc_card-setcos.c
===================================================================
RCS file: patches/patch-src_libopensc_card-setcos.c
diff -N patches/patch-src_libopensc_card-setcos.c
--- patches/patch-src_libopensc_card-setcos.c   27 May 2011 10:05:52 -0000      
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,55 +0,0 @@
-$NetBSD: patch-src_libopensc_card-setcos.c,v 1.1 2011/05/27 10:05:52 kivinen 
Exp $
-
---- src/libopensc/card-setcos.c.orig   2010-02-16 09:03:28.000000000 +0000
-+++ src/libopensc/card-setcos.c
-@@ -46,6 +46,8 @@ static struct sc_atr_table setcos_atrs[]
-       /* FINEID 2264 (EIDApplet/7816-15, OPK/EMV/AVANT) */
-       { "3b:6e:00:00:00:62:00:00:57:41:56:41:4e:54:10:81:90:00", NULL, NULL, 
SC_CARD_TYPE_SETCOS_FINEID_V2, 0, NULL },
-       { "3b:7b:94:00:00:80:62:11:51:56:46:69:6e:45:49:44", NULL, NULL, 
SC_CARD_TYPE_SETCOS_FINEID_V2, 0, NULL },
-+      /* New FINEID cards which support 2048 bit keys. */
-+      { "3b:7b:94:00:00:80:62:12:51:56:46:69:6e:45:49:44", NULL, NULL, 
SC_CARD_TYPE_SETCOS_FINEID_V2_2048, 0, NULL },
-       /* Swedish NIDEL card */
-       { "3b:9f:94:80:1f:c3:00:68:10:44:05:01:46:49:53:45:31:c8:07:90:00:18", 
NULL, NULL, SC_CARD_TYPE_SETCOS_NIDEL, 0, NULL },
-       /* Setcos 4.4.1 */
-@@ -168,6 +170,7 @@ static int setcos_init(sc_card_t *card)
-       switch (card->type) {
-       case SC_CARD_TYPE_SETCOS_FINEID:
-       case SC_CARD_TYPE_SETCOS_FINEID_V2:
-+      case SC_CARD_TYPE_SETCOS_FINEID_V2_2048:
-       case SC_CARD_TYPE_SETCOS_NIDEL:
-               card->cla = 0x00;
-               select_pkcs15_app(card);
-@@ -203,6 +206,17 @@ static int setcos_init(sc_card_t *card)
-                       _sc_card_add_rsa_alg(card, 1024, flags, 0);
-               }
-               break;
-+      case SC_CARD_TYPE_SETCOS_FINEID_V2_2048:
-+              {
-+                      unsigned long flags;
-+
-+                      flags = SC_ALGORITHM_RSA_RAW | 
SC_ALGORITHM_RSA_PAD_PKCS1;
-+                      flags |= SC_ALGORITHM_RSA_HASH_NONE | 
SC_ALGORITHM_RSA_HASH_SHA1;
-+
-+                      _sc_card_add_rsa_alg(card, 1024, flags, 0);
-+                      _sc_card_add_rsa_alg(card, 2048, flags, 0);
-+              }
-+              break;
-       case SC_CARD_TYPE_SETCOS_44:
-       case SC_CARD_TYPE_SETCOS_NIDEL:
-       case SC_CARD_TYPE_SETCOS_EID_V2_0:
-@@ -596,6 +610,7 @@ static int setcos_set_security_env2(sc_c
-       case SC_SEC_OPERATION_SIGN:
-               /* Should be 0x41 */
-               apdu.p1 = ((card->type == SC_CARD_TYPE_SETCOS_FINEID_V2) ||
-+                         (card->type == SC_CARD_TYPE_SETCOS_FINEID_V2_2048) ||
-                          (card->type == SC_CARD_TYPE_SETCOS_44) ||
-                          (card->type == SC_CARD_TYPE_SETCOS_NIDEL) || 
-                          SETCOS_IS_EID_APPLET(card)) ? 0x41 : 0x81;
-@@ -678,6 +693,7 @@ static int setcos_set_security_env(sc_ca
-               case SC_CARD_TYPE_SETCOS_PKI:
-               case SC_CARD_TYPE_SETCOS_FINEID:
-               case SC_CARD_TYPE_SETCOS_FINEID_V2:
-+              case SC_CARD_TYPE_SETCOS_FINEID_V2_2048:
-               case SC_CARD_TYPE_SETCOS_NIDEL:
-               case SC_CARD_TYPE_SETCOS_44:
-               case SC_CARD_TYPE_SETCOS_EID_V2_0:
Index: patches/patch-src_libopensc_cards.h
===================================================================
RCS file: patches/patch-src_libopensc_cards.h
diff -N patches/patch-src_libopensc_cards.h
--- patches/patch-src_libopensc_cards.h 27 May 2011 10:05:52 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$NetBSD: patch-src_libopensc_cards.h,v 1.1 2011/05/27 10:05:52 kivinen Exp $
-
---- src/libopensc/cards.h.orig 2010-02-16 09:03:28.000000000 +0000
-+++ src/libopensc/cards.h
-@@ -80,6 +80,7 @@ enum {
-       SC_CARD_TYPE_SETCOS_PKI,
-       SC_CARD_TYPE_SETCOS_FINEID,
-       SC_CARD_TYPE_SETCOS_FINEID_V2,
-+      SC_CARD_TYPE_SETCOS_FINEID_V2_2048,
-       SC_CARD_TYPE_SETCOS_NIDEL,
-       SC_CARD_TYPE_SETCOS_44 = 6100,
-       SC_CARD_TYPE_SETCOS_EID_V2_0,
Index: patches/patch-src_pkcs11_pkcs11-global.c
===================================================================
RCS file: 
/cvsroot/pkgsrc/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_pkcs11_pkcs11-global.c
--- patches/patch-src_pkcs11_pkcs11-global.c    24 Oct 2012 08:33:51 -0000      
1.1
+++ patches/patch-src_pkcs11_pkcs11-global.c    25 Nov 2012 15:57:35 -0000
@@ -1,13 +1,13 @@
 --- src/pkcs11/pkcs11-global.c.orig    2012-10-22 09:11:56.000000000 +0200
 +++ src/pkcs11/pkcs11-global.c 2012-10-22 09:12:14.000000000 +0200
-@@ -43,9 +43,9 @@
- #if defined(HAVE_PTHREAD) && defined(PKCS11_THREAD_LOCKING)
+--- src/pkcs11/pkcs11-global.c.orig    2011-07-05 11:28:53.000000000 +0000
++++ src/pkcs11/pkcs11-global.c
+@@ -42,7 +42,7 @@ extern CK_FUNCTION_LIST pkcs11_function_
  #include <pthread.h>
  CK_RV mutex_create(void **mutex)
  {
--      pthread_mutex_t *m = (pthread_mutex_t *) malloc(sizeof(*mutex));
-+      pthread_mutex_t *m = (pthread_mutex_t *) malloc(sizeof(*m));
+-      pthread_mutex_t *m = malloc(sizeof(*mutex));
++      pthread_mutex_t *m = malloc(sizeof(*m));
        if (m == NULL)
                return CKR_GENERAL_ERROR;;
        pthread_mutex_init(m, NULL);
-       *mutex = m;

Attachment: pgp5gPeYl8ku2.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index