Update to 0.12.2. Thanks to manu@ for testing and resolving pcsc-lite ptthread leakage problems. Note that pcsc-lite and openct should be an options group. Disable some obsolete CONFIGURE_ARGS. Work around assumption that either getopt_long_only is present or allgetopt functions must be provided. Finnish EID patches have been applied upstream (from whence they came, perhaps). >From upstream NEWS: Complete change history is available online: http://www.opensc-project.org/opensc/timeline New in 0.12.2; 2011-07-15 * Builds are now silent by default when OpenSC is built from source on Unix. * Using --wait with command line tools works with 64bit Linux again. * Greatly improved OpenPGP card support, including OpenPGP 2.0 cards like the one found in German Privacy Foundation CryptoStick. * Fixed support for FINeID cards issued after 01.03.2011 with 2048bit keys. * #256: Fixed support for TCOS cards (broken since 0.12.0). * Added support for IDKey-cards to TCOS3 driver. * #361: Improved PC/SC driver to fetch the maximum PIN sizes from the open source CCID driver. This fixes the issue for Linux/OSX with recent driver. * WindowsInstaller now installs only static DLL-s (PKCS#11, minidriver) to system folder. * Fix FINeID cards for organizations. * Several smaller bugs and compiler warnings fixed. New in 0.12.1; 2011-05-17 * New card driver: IAS/ECC 1.0.1 * rutoken-tool has been deprecated and removed. * eidenv and piv-tool utilities now have manual pages. * pkcs11-tool now requires the use of --module parameter. * All tools can now use an ATR as an argument to --reader, to skip to the card with given ATR. * opensc-tool -l with -v now shows information about the inserted cards. * Creating files have an enforced upper size limit, 64K * Support for multiple PKCS#15 applications with different AID-s. PKCS#15 applications can be listed with pkcs15-tool --list-applications. Binding to a specific AID with PKCS#15 tools can be done with --aid. * Hex strings (like card ATR or APDU-s) can now be separated by space, in addition to colons. * Pinpad readers known to be bogus are now ignored by OpenSC. At the moment only "HP USB Smart Card Keyboard" is disabled. * Windows installer is now distributed as a statically built MSI, for both x86 and x64. * Numerous compiler warnings, unused code and internal bugs have been eliminated. New in 0.12.0; 2010-12-22 * OpenSC uses a single reader driver, specified at compile time. * New card driver: Italian eID (CNS) by Emanuele Pucciarelli. * New card driver: Portuguese eID by Jo達o Poupino. * New card driver: westcos by Fran巽ois Leblanc. * pkcs11-tool can use a slot based on ID, label or index in the slot list. * PIN flags are updated from supported cards when C_GetTokenInfo is called. * Support for CardOS 4.4 cards added. * Fature to exclude readers from OpenSC PKCS#11 via "ignored_readers" configuration file entry. * #229: Support semi-automatic fixes to cards personalized with older and broken OpenSC versions. * Software keys removed from pkcs15-init and the PKCS#11 module. OpenSC can either generate keys on card or import plaintext keys to the card, but will never generate plaintext key material in software by itself. All traces of a software token (PKCS#15 Section 7) shall be removed. * Updates to PC/SC driver to build with pcsc-lite >= 1.6.2 * Build script for a binary Mac OS X installer for 10.5 and 10.6 systems. Binary installer includes OpenSC.tokend for platform integration. 10.6 installer includes engine_pkcs11. * Modify Rutoken S binary interfaces by Aktiv Co. * Support GOST R 34.10-2001 and GOST R 34.11-94 by Aktiv Co. * CardOS driver now emulates sign on rsa keys with sign+decrypt usage with padding and decrypt(). This is compatible with old cards and card initialized by Siemens software. Removed "--split-key" option, as it is no longer needed. * Improved debugging support: debug level 3 will show everything except of ASN1 and card matching debugging (usualy not needed). * Massive changes to libopensc. This library is now internal, only used by opensc-pkcs11.so and command line tools. Header files are no longer installed, library should not be used by other applications. Please use generic PKCS#11 interface instead. * #include file statements cleaned up: first include "config.h", then system headers, then additional libraries, then headers in opensc (but from other directories), then header files from same directory. Fix path to reference headers, remove src/include/ directory. * Various source code fixes and improvements. * OpenSC now depends on xsltproc utility and docbook-xsl to build docs and man * Remove iconv dependency. EstEID driver now uses the commonName from the certificate for card label. * Possibility to change the default behavior for card resets via opensc.conf.diff -r1.11 -r1.12 pkgsrc/security/opensc/Makefile
(gdt)
@@ -1,23 +1,25 @@ | @@ -1,23 +1,25 @@ | |||
1 | # $NetBSD: Makefile,v 1.11 2012/10/24 08:33:51 manu Exp $ | 1 | # $NetBSD: Makefile,v 1.12 2012/11/30 14:44:34 gdt Exp $ | |
2 | 2 | |||
3 | COMMENT= Smart Card drivers and middleware | 3 | COMMENT= Smart Card drivers and middleware | |
4 | LICENSE= gnu-lgpl-v2.1 | 4 | LICENSE= gnu-lgpl-v2.1 | |
5 | 5 | |||
6 | .include "../../security/opensc/Makefile.common" | 6 | .include "../../security/opensc/Makefile.common" | |
7 | 7 | |||
8 | PKGREVISION= 4 | 8 | CONFIGURE_ARGS+= --with-xsl-stylesheetsdir=${BUILDLINK_PREFIX.docbook-xsl}/share/xsl/docbook | |
9 | ||||
10 | CONFIGURE_ARGS+= --disable-nsplugin | |||
11 | 9 | |||
12 | EGDIR= ${PREFIX}/share/examples/opensc | 10 | EGDIR= ${PREFIX}/share/examples/opensc | |
13 | CONF_FILES+= ${EGDIR}/opensc.conf ${PKG_SYSCONFDIR}/opensc.conf | 11 | CONF_FILES+= ${EGDIR}/opensc.conf ${PKG_SYSCONFDIR}/opensc.conf | |
14 | 12 | |||
15 | INSTALLATION_DIRS= ${EGDIR} | 13 | INSTALLATION_DIRS= ${EGDIR} | |
16 | post-install: | 14 | post-install: | |
17 | ${INSTALL_DATA} ${WRKSRC}/etc/opensc.conf ${DESTDIR}${EGDIR} | 15 | ${INSTALL_DATA} ${WRKSRC}/etc/opensc.conf ${DESTDIR}${EGDIR} | |
18 | 16 | |||
17 | # build tools for doc | |||
18 | .include "../../textproc/libxslt/buildlink3.mk" | |||
19 | .include "../../textproc/docbook-xsl/buildlink3.mk" | |||
20 | ||||
19 | .include "../../devel/libltdl/buildlink3.mk" | 21 | .include "../../devel/libltdl/buildlink3.mk" | |
20 | .include "../../devel/readline/buildlink3.mk" | 22 | .include "../../devel/readline/buildlink3.mk" | |
21 | .include "../../devel/zlib/buildlink3.mk" | 23 | .include "../../devel/zlib/buildlink3.mk" | |
22 | .include "../../security/openssl/buildlink3.mk" | 24 | .include "../../security/openssl/buildlink3.mk" | |
23 | .include "../../mk/bsd.pkg.mk" | 25 | .include "../../mk/bsd.pkg.mk" |
@@ -1,27 +1,29 @@ | @@ -1,27 +1,29 @@ | |||
1 | # $NetBSD: Makefile.common,v 1.8 2012/10/24 08:33:51 manu Exp $ | 1 | # $NetBSD: Makefile.common,v 1.9 2012/11/30 14:44:34 gdt Exp $ | |
2 | # | 2 | # | |
3 | # used by security/opensc/Makefile | 3 | # used by security/opensc/Makefile | |
4 | # used by security/opensc-signer/Makefile | 4 | # used by security/opensc-signer/Makefile | |
5 | 5 | |||
6 | OPENSC_PKG_VERSION= 0.11.13 | 6 | OPENSC_PKG_VERSION= 0.12.2 | |
7 | DISTNAME= opensc-${OPENSC_PKG_VERSION} | 7 | DISTNAME= opensc-${OPENSC_PKG_VERSION} | |
8 | CATEGORIES= security | 8 | CATEGORIES= security | |
9 | MASTER_SITES= http://www.opensc-project.org/files/opensc/ | 9 | MASTER_SITES= http://www.opensc-project.org/files/opensc/ | |
10 | 10 | |||
11 | MAINTAINER= pkgsrc-users@NetBSD.org | 11 | MAINTAINER= pkgsrc-users@NetBSD.org | |
12 | HOMEPAGE= http://www.opensc-project.org/opensc/ | 12 | HOMEPAGE= http://www.opensc-project.org/opensc/ | |
13 | 13 | |||
14 | BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.7 | 14 | BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.7 | |
15 | 15 | |||
16 | GNU_CONFIGURE= YES | 16 | GNU_CONFIGURE= YES | |
17 | USE_LIBTOOL= YES | 17 | USE_LIBTOOL= YES | |
18 | USE_OLD_DES_API= YES | 18 | USE_OLD_DES_API= YES | |
19 | USE_TOOLS+= gmake pkg-config | 19 | USE_TOOLS+= gmake pkg-config | |
20 | 20 | |||
21 | .include "options.mk" | 21 | .include "options.mk" | |
22 | 22 | |||
23 | CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q} | 23 | # Previous versions needed these, but 0.12.2 configure does not | |
24 | # recognize them. | |||
25 | #CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q} | |||
26 | #CONFIGURE_ARGS+= --disable-sensitive-logging | |||
27 | ||||
24 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} | 28 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} | |
25 | CONFIGURE_ARGS+= --disable-sensitive-logging | |||
26 | CONFIGURE_ENV+= PCSC_CFLAGS=-I${PREFIX}/include/PCSC | 29 | CONFIGURE_ENV+= PCSC_CFLAGS=-I${PREFIX}/include/PCSC | |
27 |
@@ -1,133 +1,61 @@ | @@ -1,133 +1,61 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.5 2010/09/01 15:59:22 drochner Exp $ | 1 | @comment $NetBSD: PLIST,v 1.6 2012/11/30 14:44:34 gdt Exp $ | |
2 | bin/cardos-info | |||
3 | bin/cardos-tool | 2 | bin/cardos-tool | |
4 | bin/cryptoflex-tool | 3 | bin/cryptoflex-tool | |
5 | bin/eidenv | 4 | bin/eidenv | |
6 | bin/netkey-tool | 5 | bin/netkey-tool | |
7 | bin/opensc-config | |||
8 | bin/opensc-explorer | 6 | bin/opensc-explorer | |
9 | bin/opensc-tool | 7 | bin/opensc-tool | |
10 | bin/piv-tool | 8 | bin/piv-tool | |
11 | bin/pkcs11-tool | 9 | bin/pkcs11-tool | |
12 | bin/pkcs15-crypt | 10 | bin/pkcs15-crypt | |
13 | bin/pkcs15-init | 11 | bin/pkcs15-init | |
14 | bin/pkcs15-tool | 12 | bin/pkcs15-tool | |
15 | bin/rutoken-tool | |||
16 | bin/westcos-tool | 13 | bin/westcos-tool | |
17 | include/opensc/asn1.h | |||
18 | include/opensc/cardctl.h | |||
19 | include/opensc/compression.h | |||
20 | include/opensc/emv.h | |||
21 | include/opensc/errors.h | |||
22 | include/opensc/log.h | |||
23 | include/opensc/opensc.h | |||
24 | include/opensc/pkcs11-opensc.h | |||
25 | include/opensc/pkcs11.h | |||
26 | include/opensc/pkcs15-init.h | |||
27 | include/opensc/pkcs15.h | |||
28 | include/opensc/scconf.h | |||
29 | include/opensc/types.h | |||
30 | include/opensc/ui.h | |||
31 | lib/libopensc.la | 14 | lib/libopensc.la | |
32 | lib/libpkcs15init.la | |||
33 | lib/libscconf.la | |||
34 | lib/onepin-opensc-pkcs11.la | 15 | lib/onepin-opensc-pkcs11.la | |
35 | lib/opensc-pkcs11.la | 16 | lib/opensc-pkcs11.la | |
36 | lib/pkcs11-spy.la | 17 | lib/pkcs11-spy.la | |
37 | lib/pkcs11/onepin-opensc-pkcs11.so | 18 | lib/pkcs11/onepin-opensc-pkcs11.so | |
38 | lib/pkcs11/opensc-pkcs11.so | 19 | lib/pkcs11/opensc-pkcs11.so | |
39 | lib/pkcs11/pkcs11-spy.so | 20 | lib/pkcs11/pkcs11-spy.so | |
40 | lib/pkgconfig/libopensc.pc | |||
41 | lib/pkgconfig/libpkcs15init.pc | |||
42 | lib/pkgconfig/libscconf.pc | |||
43 | man/man1/cardos-tool.1 | 21 | man/man1/cardos-tool.1 | |
44 | man/man1/cryptoflex-tool.1 | 22 | man/man1/cryptoflex-tool.1 | |
23 | man/man1/eidenv.1 | |||
45 | man/man1/netkey-tool.1 | 24 | man/man1/netkey-tool.1 | |
46 | man/man1/opensc-config.1 | |||
47 | man/man1/opensc-explorer.1 | 25 | man/man1/opensc-explorer.1 | |
48 | man/man1/opensc-tool.1 | 26 | man/man1/opensc-tool.1 | |
27 | man/man1/piv-tool.1 | |||
49 | man/man1/pkcs11-tool.1 | 28 | man/man1/pkcs11-tool.1 | |
50 | man/man1/pkcs15-crypt.1 | 29 | man/man1/pkcs15-crypt.1 | |
51 | man/man1/pkcs15-init.1 | 30 | man/man1/pkcs15-init.1 | |
52 | man/man1/pkcs15-tool.1 | 31 | man/man1/pkcs15-tool.1 | |
53 | man/man1/westcos-tool.1 | 32 | man/man1/westcos-tool.1 | |
54 | man/man3/sc_app_info_t.3 | |||
55 | man/man3/sc_append_record.3 | |||
56 | man/man3/sc_asn1_decode.3 | |||
57 | man/man3/sc_asn1_encode.3 | |||
58 | man/man3/sc_asn1_entry.3 | |||
59 | man/man3/sc_asn1_find_tag.3 | |||
60 | man/man3/sc_asn1_print_tags.3 | |||
61 | man/man3/sc_asn1_put_tag.3 | |||
62 | man/man3/sc_asn1_read_tag.3 | |||
63 | man/man3/sc_asn1_skip_tag.3 | |||
64 | man/man3/sc_asn1_verify_tag.3 | |||
65 | man/man3/sc_base64_decode.3 | |||
66 | man/man3/sc_base64_encode.3 | |||
67 | man/man3/sc_card_ctl.3 | |||
68 | man/man3/sc_card_t.3 | |||
69 | man/man3/sc_card_valid.3 | |||
70 | man/man3/sc_check_sw.3 | |||
71 | man/man3/sc_connect_card.3 | |||
72 | man/man3/sc_copy_asn1_entry.3 | |||
73 | man/man3/sc_create_file.3 | |||
74 | man/man3/sc_delete_file.3 | |||
75 | man/man3/sc_delete_record.3 | |||
76 | man/man3/sc_der_clear.3 | |||
77 | man/man3/sc_der_copy.3 | |||
78 | man/man3/sc_detect_card_presence.3 | |||
79 | man/man3/sc_disconnect_card.3 | |||
80 | man/man3/sc_enum_apps.3 | |||
81 | man/man3/sc_establish_context.3 | |||
82 | man/man3/sc_file_dup.3 | |||
83 | man/man3/sc_file_free.3 | |||
84 | man/man3/sc_file_new.3 | |||
85 | man/man3/sc_file_t.3 | |||
86 | man/man3/sc_find_app_by_aid.3 | |||
87 | man/man3/sc_find_pkcs15_app.3 | |||
88 | man/man3/sc_format_apdu.3 | |||
89 | man/man3/sc_format_asn1_entry.3 | |||
90 | man/man3/sc_free_apps.3 | |||
91 | man/man3/sc_get_cache_dir.3 | |||
92 | man/man3/sc_get_challenge.3 | |||
93 | man/man3/sc_get_data.3 | |||
94 | man/man3/sc_list_files.3 | |||
95 | man/man3/sc_lock.3 | |||
96 | man/man3/sc_make_cache_dir.3 | |||
97 | man/man3/sc_put_data.3 | |||
98 | man/man3/sc_read_binary.3 | |||
99 | man/man3/sc_read_record.3 | |||
100 | man/man3/sc_release_context.3 | |||
101 | man/man3/sc_select_file.3 | |||
102 | man/man3/sc_set_card_driver.3 | |||
103 | man/man3/sc_strerror.3 | |||
104 | man/man3/sc_transmit_apdu.3 | |||
105 | man/man3/sc_unlock.3 | |||
106 | man/man3/sc_update_binary.3 | |||
107 | man/man3/sc_update_dir.3 | |||
108 | man/man3/sc_update_record.3 | |||
109 | man/man3/sc_wait_for_event.3 | |||
110 | man/man3/sc_write_binary.3 | |||
111 | man/man3/sc_write_record.3 | |||
112 | man/man5/pkcs15-profile.5 | 33 | man/man5/pkcs15-profile.5 | |
113 | share/doc/opensc/NEWS | 34 | share/doc/opensc/NEWS | |
114 | share/doc/opensc/README | |||
115 | share/examples/opensc/opensc.conf | 35 | share/examples/opensc/opensc.conf | |
116 | share/opensc/asepcos.profile | 36 | share/opensc/asepcos.profile | |
37 | share/opensc/authentic.profile | |||
117 | share/opensc/cardos.profile | 38 | share/opensc/cardos.profile | |
118 | share/opensc/cyberflex.profile | 39 | share/opensc/cyberflex.profile | |
119 | share/opensc/entersafe.profile | 40 | share/opensc/entersafe.profile | |
120 | share/opensc/flex.profile | 41 | share/opensc/flex.profile | |
121 | share/opensc/gpk.profile | 42 | share/opensc/gpk.profile | |
43 | share/opensc/ias_adele_admin1.profile | |||
44 | share/opensc/ias_adele_admin2.profile | |||
45 | share/opensc/ias_adele_common.profile | |||
46 | share/opensc/iasecc.profile | |||
47 | share/opensc/iasecc_admin_eid.profile | |||
48 | share/opensc/iasecc_generic_oberthur.profile | |||
49 | share/opensc/iasecc_generic_pki.profile | |||
122 | share/opensc/incrypto34.profile | 50 | share/opensc/incrypto34.profile | |
123 | share/opensc/jcop.profile | 51 | share/opensc/jcop.profile | |
124 | share/opensc/miocos.profile | 52 | share/opensc/miocos.profile | |
125 | share/opensc/muscle.profile | 53 | share/opensc/muscle.profile | |
126 | share/opensc/myeid.profile | 54 | share/opensc/myeid.profile | |
127 | share/opensc/oberthur.profile | 55 | share/opensc/oberthur.profile | |
128 | share/opensc/pkcs15.profile | 56 | share/opensc/pkcs15.profile | |
129 | share/opensc/rutoken.profile | 57 | share/opensc/rutoken.profile | |
130 | share/opensc/rutoken_ecp.profile | 58 | share/opensc/rutoken_ecp.profile | |
131 | share/opensc/setcos.profile | 59 | share/opensc/setcos.profile | |
132 | share/opensc/starcos.profile | 60 | share/opensc/starcos.profile | |
133 | share/opensc/westcos.profile | 61 | share/opensc/westcos.profile |
@@ -1,17 +1,12 @@ | @@ -1,17 +1,12 @@ | |||
1 | $NetBSD: distinfo,v 1.9 2012/10/24 08:33:51 manu Exp $ | 1 | $NetBSD: distinfo,v 1.10 2012/11/30 14:44:34 gdt Exp $ | |
2 | 2 | |||
3 | SHA1 (opensc-0.11.13.tar.gz) = 408b374286004c3df15ec17856f69fd4c2a1aceb | 3 | SHA1 (opensc-0.12.2.tar.gz) = 8c34be52eb94025eb181c02b466223901bef744c | |
4 | RMD160 (opensc-0.11.13.tar.gz) = cd900866e51cd64fa7c5a3287cd58193dec26528 | 4 | RMD160 (opensc-0.12.2.tar.gz) = 45504135db05fd404a357ebd8bea047c5c8604dc | |
5 | Size (opensc-0.11.13.tar.gz) = 1513327 bytes | 5 | Size (opensc-0.12.2.tar.gz) = 1738553 bytes | |
6 | SHA1 (patch-aa) = ad1c02161590c43170137d1deeaf5e88e7fef1ce | 6 | SHA1 (patch-aa) = f7993647c19d3cca3b976d66a97ee18fca12f8b2 | |
7 | SHA1 (patch-ab) = 6d3d055abd1b94c7024838b9b25cc6005af0d36a | 7 | SHA1 (patch-ab) = 4d19b0990b227aceb3ab4bf8c1f222f337ee1ff7 | |
8 | SHA1 (patch-ac) = 6c77415312d1ab149a9cbae9c49f4cf31c950502 | 8 | SHA1 (patch-configure) = fcd938ec3f269642fbd577868768c8ac67270be6 | |
9 | SHA1 (patch-ad) = a618df0e8bc59af9ccea3f3b423b363e09ab0a4c | 9 | SHA1 (patch-src_common_compat__getopt.c) = a1a473a6d2690dacb968be7991e6218233b20e7f | |
10 | SHA1 (patch-ae) = 94ca059a2e9bf5689f4193587247e443213df9a4 | 10 | SHA1 (patch-src_common_compat__getopt.h) = cdd04e708f249a3969a47c4ed458d6b86a11d2f1 | |
11 | SHA1 (patch-af) = 3b8db1b680c833940973f11b8abb47e34fa5ecd0 | 11 | SHA1 (patch-src_common_compat__getopt__main.c) = 0a9a608434ec8f274627b2f65f5c53a6ceb79f2a | |
12 | SHA1 (patch-ag) = 1d2de187008d4ce9aac1f97f829aafd035324082 | 12 | SHA1 (patch-src_pkcs11_pkcs11-global.c) = 5d0d23706f932f10a63d8da82ab34d3c00e470f5 | |
13 | SHA1 (patch-ah) = e9a8e3aa06af5a7ce47015f8eba41fd2bb12b32d | |||
14 | SHA1 (patch-configure) = 65af2389d4a3b875ea206542ac94446e0bfc4796 | |||
15 | SHA1 (patch-src_libopensc_card-setcos.c) = 209bf0a92f9872635ea06d5ea9a7742c7874d61d | |||
16 | SHA1 (patch-src_libopensc_cards.h) = ebc1db10feda1b2f6a666842120772908c778db7 | |||
17 | SHA1 (patch-src_pkcs11_pkcs11-global.c) = 06c93969a04c930a87a607f6d48a13197c1307bf |
@@ -1,17 +1,20 @@ | @@ -1,17 +1,20 @@ | |||
1 | # $NetBSD: options.mk,v 1.1.1.1 2009/02/26 10:50:05 hasso Exp $ | 1 | # $NetBSD: options.mk,v 1.2 2012/11/30 14:44:34 gdt Exp $ | |
2 | 2 | |||
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.opensc | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.opensc | |
4 | PKG_SUPPORTED_OPTIONS= openct pcsc-lite | 4 | ||
5 | # Really this should be an options group; exactly one of openct, | |||
6 | # pcsc-lite, or ctapi must be specified. | |||
7 | PKG_SUPPORTED_OPTIONS= pcsc-lite openct | |||
5 | PKG_SUGGESTED_OPTIONS= pcsc-lite | 8 | PKG_SUGGESTED_OPTIONS= pcsc-lite | |
6 | 9 | |||
7 | .include "../../mk/bsd.options.mk" | 10 | .include "../../mk/bsd.options.mk" | |
8 | 11 | |||
9 | .if !empty(PKG_OPTIONS:Mpcsc-lite) | 12 | .if !empty(PKG_OPTIONS:Mpcsc-lite) | |
10 | .include "../../security/pcsc-lite/buildlink3.mk" | 13 | .include "../../security/pcsc-lite/buildlink3.mk" | |
11 | CONFIGURE_ARGS+= --enable-pcsc | 14 | CONFIGURE_ARGS+= --enable-pcsc | |
12 | CONFIGURE_ARGS+= --with-pcsc-provider=${BUILDLINK_PREFIX.pcsc-lite}/lib/libpcsclite.la | 15 | CONFIGURE_ARGS+= --with-pcsc-provider=${BUILDLINK_PREFIX.pcsc-lite}/lib/libpcsclite.la | |
13 | .else | 16 | .else | |
14 | CONFIGURE_ARGS+= --disable-pcsc | 17 | CONFIGURE_ARGS+= --disable-pcsc | |
15 | .endif | 18 | .endif | |
16 | 19 | |||
17 | .if !empty(PKG_OPTIONS:Mopenct) | 20 | .if !empty(PKG_OPTIONS:Mopenct) |
@@ -1,18 +1,21 @@ | @@ -1,18 +1,21 @@ | |||
1 | $NetBSD: patch-aa,v 1.2 2010/09/01 15:59:23 drochner Exp $ | 1 | $NetBSD: patch-aa,v 1.3 2012/11/30 14:44:34 gdt Exp $ | |
2 | 2 | |||
3 | --- etc/Makefile.in.orig 2010-02-16 09:32:17.000000000 +0000 | 3 | Disable installation of config file, because pkgsrc installs config | |
4 | files as examples. | |||
5 | ||||
6 | --- etc/Makefile.in.orig 2011-07-15 10:47:01.000000000 +0000 | |||
4 | +++ etc/Makefile.in | 7 | +++ etc/Makefile.in | |
5 | @@ -471,12 +471,7 @@ opensc.conf: opensc.conf.in force | 8 | @@ -466,12 +466,7 @@ opensc.conf: opensc.conf.in force | |
6 | -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \ | 9 | -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \ | |
7 | -e 's|@DEFAULT_PCSC_PROVIDER[@]|$(DEFAULT_PCSC_PROVIDER)|g' \ | 10 | -e 's|@DEFAULT_PCSC_PROVIDER[@]|$(DEFAULT_PCSC_PROVIDER)|g' \ | |
8 | < $< > $@ | 11 | < $< > $@ | |
9 | -install-exec-hook: install-sysconfDATA opensc.conf | 12 | -install-exec-hook: install-sysconfDATA opensc.conf | |
10 | - if [ -f "$(DESTDIR)$(sysconfdir)/opensc.conf" ]; then \ | 13 | - if [ -f "$(DESTDIR)$(sysconfdir)/opensc.conf" ]; then \ | |
11 | - $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf.new"; \ | 14 | - $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf.new"; \ | |
12 | - else \ | 15 | - else \ | |
13 | - $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf"; \ | 16 | - $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf"; \ | |
14 | - fi | 17 | - fi | |
15 | +install-exec-hook: | 18 | +install-exec-hook: | |
16 | 19 | |||
17 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | 20 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | |
18 | # Otherwise a system limit (for SysV at least) may be exceeded. | 21 | # Otherwise a system limit (for SysV at least) may be exceeded. |
@@ -1,30 +1,15 @@ | @@ -1,30 +1,15 @@ | |||
1 | $NetBSD: patch-ab,v 1.2 2010/09/01 15:59:23 drochner Exp $ | 1 | $NetBSD: patch-ab,v 1.3 2012/11/30 14:44:34 gdt Exp $ | |
2 | 2 | |||
3 | --- etc/opensc.conf.in.orig 2010-02-16 09:03:28.000000000 +0000 | 3 | This patch was added 2009-09-10 by hasso@, with comment: | |
4 | More userfriendly default configuration. | |||
5 | ||||
6 | --- etc/opensc.conf.in.orig 2011-07-05 11:28:53.000000000 +0000 | |||
4 | +++ etc/opensc.conf.in | 7 | +++ etc/opensc.conf.in | |
5 | @@ -47,6 +47,7 @@ app default { | 8 | @@ -309,6 +309,7 @@ app default { | |
6 | # last entry in reader_drivers list | |||
7 | # | |||
8 | # reader_drivers = openct, pcsc, ctapi; | |||
9 | + reader_drivers = pcsc, ctapi; | |||
10 | ||||
11 | reader_driver ctapi { | |||
12 | # module /usr/local/towitoko/lib/libtowitoko.so { | |||
13 | @@ -87,7 +88,7 @@ app default { | |||
14 | # | |||
15 | # Enable pinpad if detected (PC/SC v2.0.2 Part 10) | |||
16 | # Default: false | |||
17 | - # enable_pinpad = true; | |||
18 | + enable_pinpad = true; | |||
19 | # | 9 | # | |
20 | # Use specific pcsc provider. | |||
21 | # Default: @DEFAULT_PCSC_PROVIDER@ | |||
22 | @@ -265,7 +266,7 @@ app default { | |||
23 | # Prefer pkcs15 emulation code before | |||
24 | # the normal pkcs15 processing. | |||
25 | # Default: no | 10 | # Default: no | |
26 | - # try_emulation_first = yes; | 11 | # try_emulation_first = yes; | |
27 | + try_emulation_first = yes; | 12 | + try_emulation_first = yes; | |
28 | 13 | |||
29 | # Enable builtin emulators. | 14 | # Enable builtin emulators. | |
30 | # Default: yes | 15 | # Default: yes |
@@ -1,28 +1,26 @@ | @@ -1,28 +1,26 @@ | |||
1 | $NetBSD: patch-configure,v 1.1 2012/10/24 08:33:51 manu Exp $ | 1 | $NetBSD: patch-configure,v 1.2 2012/11/30 14:44:35 gdt Exp $ | |
2 | 2 | |||
3 | Make sure we do not link against -lpthread, as we only need mutexes | 3 | Make sure we do not link against -lpthread, as we only need mutexes | |
4 | that can be found in libc. | 4 | that can be found in libc. | |
5 | 5 | |||
6 | Linking with -lpthread hurst with opensc-pkcs11.so since NetBSD-6.0 | 6 | Linking with -lpthread hurst with opensc-pkcs11.so since NetBSD-6.0 | |
7 | libpthread cannot be loaded by dlopen() | 7 | libpthread cannot be loaded by dlopen() | |
8 | 8 | |||
9 | --- configure.orig 2012-10-19 11:29:36.000000000 +0200 | 9 | --- configure.orig 2011-07-15 10:46:59.000000000 +0000 | |
10 | +++ configure 2012-10-19 14:57:03.000000000 +0200 | 10 | +++ configure | |
11 | @@ -12821,8 +12821,17 @@ | 11 | @@ -12903,6 +12903,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
12 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |||
13 | 12 | |||
14 | acx_pthread_ok=no | 13 | acx_pthread_ok=no | |
15 | 14 | |||
16 | +case "${host_cpu}-${host_os}" in | 15 | +case "${host_cpu}-${host_os}" in | |
17 | + *netbsd*) | 16 | + *netbsd*) | |
18 | + acx_pthread_ok=yes | 17 | + acx_pthread_ok=yes | |
19 | + PTHREAD_CFLAGS="" | 18 | + PTHREAD_CFLAGS="" | |
20 | + PTHREAD_LIBS="" | 19 | + PTHREAD_LIBS="" | |
21 | + LIBS="$LIBS -lltdl" | 20 | + LIBS="$LIBS -lltdl" | |
22 | + ;; | 21 | + ;; | |
23 | +esac | 22 | +esac | |
24 | + | 23 | + | |
25 | # We used to check for pthread.h first, but this fails if pthread.h | 24 | # We used to check for pthread.h first, but this fails if pthread.h | |
26 | # requires special compiler flags (e.g. on True64 or Sequent). | 25 | # requires special compiler flags (e.g. on True64 or Sequent). | |
27 | # It gets checked for in the link test anyway. | 26 | # It gets checked for in the link test anyway. | |
28 |
@@ -1,13 +1,17 @@ | @@ -1,13 +1,17 @@ | |||
1 | --- src/pkcs11/pkcs11-global.c.orig 2012-10-22 09:11:56.000000000 +0200 | 1 | $NetBSD: patch-src_pkcs11_pkcs11-global.c,v 1.2 2012/11/30 14:44:35 gdt Exp $ | |
2 | +++ src/pkcs11/pkcs11-global.c 2012-10-22 09:12:14.000000000 +0200 | 2 | ||
3 | @@ -43,9 +43,9 @@ | 3 | Use correct size for malloc. | |
4 | #if defined(HAVE_PTHREAD) && defined(PKCS11_THREAD_LOCKING) | 4 | ||
5 | Not yet reported upstream. | |||
6 | ||||
7 | --- src/pkcs11/pkcs11-global.c.orig 2011-07-05 11:28:53.000000000 +0000 | |||
8 | +++ src/pkcs11/pkcs11-global.c | |||
9 | @@ -42,7 +42,7 @@ extern CK_FUNCTION_LIST pkcs11_function_ | |||
5 | #include <pthread.h> | 10 | #include <pthread.h> | |
6 | CK_RV mutex_create(void **mutex) | 11 | CK_RV mutex_create(void **mutex) | |
7 | { | 12 | { | |
8 | - pthread_mutex_t *m = (pthread_mutex_t *) malloc(sizeof(*mutex)); | 13 | - pthread_mutex_t *m = malloc(sizeof(*mutex)); | |
9 | + pthread_mutex_t *m = (pthread_mutex_t *) malloc(sizeof(*m)); | 14 | + pthread_mutex_t *m = malloc(sizeof(*m)); | |
10 | if (m == NULL) | 15 | if (m == NULL) | |
11 | return CKR_GENERAL_ERROR;; | 16 | return CKR_GENERAL_ERROR;; | |
12 | pthread_mutex_init(m, NULL); | 17 | pthread_mutex_init(m, NULL); | |
13 | *mutex = m; |
$NetBSD: patch-src_common_compat__getopt.c,v 1.1 2012/11/30 14:44:35 gdt Exp $
See comment in patch-src_common_compat__getopt.h.
--- 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>
$NetBSD: patch-src_common_compat__getopt.h,v 1.1 2012/11/30 14:44:35 gdt Exp $
NetBSD has getopt_long but not getopt_long_only. Replacing
getopt_long causes a type conflict with the built-in implementation.
The replacement is unnecesssary because getopt_long_only is not
actually used.
Reported upstream:
https://www.opensc-project.org/pipermail/opensc-devel/2012-November/018668.html
--- 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 */
$NetBSD: patch-src_common_compat__getopt__main.c,v 1.1 2012/11/30 14:44:35 gdt Exp $
See comment in patch-src_common_compat__getopt.h. In addition, a
kludge is added here to get the test file to build, pending a new
release from upstream with the issue properly addressed.
--- 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)