pkgsrc-Users archive

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

anyone feel responsible for opensc?



It's at 0.11.13, and 0.12.2 is current.  I have an update partially
done, but it's losing on getopt compat because it includes a compat
implementation because NetBSD doesn't implement getopt_long_only (which
opensc doesn't actually use, and I'm assuming this is linuxy).  Before I
continue, I want to ask: does anyone else care about opensc, and does
anyone have any getopt_long_only clues?

It looks like most of our patches are included in 0.12.2, or no longer
even close to apply.  Here's a diff for opensc; I haven't tried
opensc-signer yet but am assuming it will be easy one this is ok.

If I don't hear from anyone, I'll just update even though it's a little
rough.

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    22 Nov 2012 01:20:47 -0000
@@ -5,8 +5,6 @@ LICENSE=                gnu-lgpl-v2.1
 
 .include "../../security/opensc/Makefile.common"
 
-PKGREVISION=   4
-
 CONFIGURE_ARGS+=       --disable-nsplugin
 
 EGDIR=                 ${PREFIX}/share/examples/opensc
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     22 Nov 2012 01:20:47 -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: 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    22 Nov 2012 01:20:47 -0000
@@ -1,17 +1,9 @@
 $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) = ba1593ecec6e0910009d6b721c5a5849b13cf812
+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    22 Nov 2012 01:20:47 -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    22 Nov 2012 01:20:47 -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     22 Nov 2012 01:20:47 -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     2012-11-22 00:57:38.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_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    22 Nov 2012 01:20:47 -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: pgpnJnaNiriBP.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index