aboutsummaryrefslogtreecommitdiffstats
path: root/security/opensc
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2010-12-27 17:55:39 +0800
committerale <ale@FreeBSD.org>2010-12-27 17:55:39 +0800
commitacae070acaaa2ce4bbdd6b5f11aa353b687e3c43 (patch)
tree20f555d3b40b24af92c74cf2d69537352c728a46 /security/opensc
parentdc5b3540db7a8b5b26b406a481b04bd9c9209ab6 (diff)
downloadfreebsd-ports-gnome-acae070acaaa2ce4bbdd6b5f11aa353b687e3c43.tar.gz
freebsd-ports-gnome-acae070acaaa2ce4bbdd6b5f11aa353b687e3c43.tar.zst
freebsd-ports-gnome-acae070acaaa2ce4bbdd6b5f11aa353b687e3c43.zip
Update OpenSC to 0.12.0 release.
Diffstat (limited to 'security/opensc')
-rw-r--r--security/opensc/Makefile80
-rw-r--r--security/opensc/distinfo5
-rw-r--r--security/opensc/files/patch-src_libopensc_card-piv.c11
-rw-r--r--security/opensc/files/patch-src_libopensc_internal-winscard.h11
-rw-r--r--security/opensc/files/patch-src_libopensc_reader-pcsc.c29
-rw-r--r--security/opensc/files/patch-src_signer_dialog.c97
-rw-r--r--security/opensc/pkg-plist34
7 files changed, 35 insertions, 232 deletions
diff --git a/security/opensc/Makefile b/security/opensc/Makefile
index 7ed12c74c753..33ddc6143b64 100644
--- a/security/opensc/Makefile
+++ b/security/opensc/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= opensc
-PORTVERSION= 0.11.13
-PORTREVISION= 2
+PORTVERSION= 0.12.0
CATEGORIES= security devel
MASTER_SITES= http://www.opensc-project.org/files/${PORTNAME}/ \
http://www.opensc-project.org/files/${PORTNAME}/testing/
@@ -15,15 +14,17 @@ MASTER_SITES= http://www.opensc-project.org/files/${PORTNAME}/ \
MAINTAINER= ale@FreeBSD.org
COMMENT= Libraries and utilities to access smart cards
-OPTIONS= OPENCT "Enable direct OpenCT backend support" on \
- PCSC "Enable PC/SC backend support" off \
- SIGNER "Enable signer browser plugin" off
+BUILD_DEPENDS= xsltproc:${PORTSDIR}/textproc/libxslt \
+ ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
+
+OPTIONS= PCSC "Enable PC/SC backend support" on \
+ OPENCT "Enable direct OpenCT backend support" off \
+ CTAPI "Enable CT-API backend support" off
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING
USE_AUTOTOOLS= libltdl
-USE_ICONV= yes
USE_OPENSSL= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
@@ -32,69 +33,36 @@ USE_LDCONFIG= yes
CONFIGURE_ENV= LTLIB_CFLAGS="-I${LOCALBASE}/include" \
LTLIB_LIBS="-L${LOCALBASE}/lib -lltdl" \
- ICONV_CFLAGS="-I${LOCALBASE}/include" \
- ICONV_LIBS="-L${LOCALBASE}/lib -liconv" \
OPENSSL_CFLAGS="-I${OPENSSLINC}" \
- OPENSSL_LIBS="-L${OPENSSLLIB} -lssl"
+ OPENSSL_LIBS="-L${OPENSSLLIB} -lssl" \
+ XSLTPROC="${LOCALBASE}/bin/xsltproc"
+
+CONFIGURE_ARGS= --with-xsl-stylesheetsdir=${LOCALBASE}/share/xsl/docbook
PORTDOCS= *
MANCOMPRESSED= no
MAN1= cardos-tool.1 cryptoflex-tool.1 netkey-tool.1 \
- opensc-config.1 opensc-explorer.1 opensc-tool.1 \
+ opensc-explorer.1 opensc-tool.1 \
pkcs11-tool.1 pkcs15-crypt.1 pkcs15-init.1 pkcs15-tool.1 \
westcos-tool.1
-MAN3= sc_app_info_t.3 sc_append_record.3 sc_asn1_decode.3 \
- sc_asn1_encode.3 sc_asn1_entry.3 sc_asn1_find_tag.3 \
- sc_asn1_print_tags.3 sc_asn1_put_tag.3 sc_asn1_read_tag.3 \
- sc_asn1_skip_tag.3 sc_asn1_verify_tag.3 sc_base64_decode.3 \
- sc_base64_encode.3 sc_card_ctl.3 sc_card_t.3 \
- sc_card_valid.3 sc_check_sw.3 sc_connect_card.3 \
- sc_copy_asn1_entry.3 sc_create_file.3 sc_delete_file.3 \
- sc_delete_record.3 sc_der_clear.3 sc_der_copy.3 \
- sc_detect_card_presence.3 sc_disconnect_card.3 \
- sc_enum_apps.3 sc_establish_context.3 sc_file_dup.3 \
- sc_file_free.3 sc_file_new.3 sc_file_t.3 \
- sc_find_app_by_aid.3 sc_find_pkcs15_app.3 sc_format_apdu.3 \
- sc_format_asn1_entry.3 sc_free_apps.3 sc_get_cache_dir.3 \
- sc_get_challenge.3 sc_get_data.3 sc_list_files.3 \
- sc_lock.3 sc_make_cache_dir.3 sc_put_data.3 \
- sc_read_binary.3 sc_read_record.3 sc_release_context.3 \
- sc_select_file.3 sc_set_card_driver.3 sc_strerror.3 \
- sc_transmit_apdu.3 sc_unlock.3 sc_update_binary.3 \
- sc_update_dir.3 sc_update_record.3 sc_wait_for_event.3 \
- sc_write_binary.3 sc_write_record.3
MAN5= pkcs15-profile.5
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if !defined(WITHOUT_OPENCT)
+.if defined(WITH_OPENCT)
LIB_DEPENDS+= openct.1:${PORTSDIR}/security/openct
CONFIGURE_ARGS+=--enable-openct
.endif
-.if defined(WITH_PCSC)
+.if !defined(WITHOUT_PCSC)
LIB_DEPENDS+= pcsclite.1:${PORTSDIR}/devel/pcsc-lite
-CONFIGURE_ARGS+=--enable-pcsc
+.else
+CONFIGURE_ARGS+=--disable-pcsc
.endif
-.if defined(WITH_SIGNER)
-LIB_DEPENDS+= assuan.1:${PORTSDIR}/security/libassuan
-PINENTRY?= ${LOCALBASE}/bin/pinentry
-PINENTRY_PORT?= security/pinentry
-RUN_DEPENDS+= pinentry:${PORTSDIR}/${PINENTRY_PORT}
-USE_XORG= x11 xt
-CONFIGURE_ARGS+=--enable-nsplugin \
- --with-libassuan-prefix=${LOCALBASE} \
- --with-plugindir=${WEBPLUGINS_DIR} \
- --with-pinentry=${PINENTRY}
-PLIST_SUB+= SIGNER=""
-
-USE_WEBPLUGINS= gecko*
-WEBPLUGINS_FILES=opensc-signer.so
-.include "${PORTSDIR}/www/firefox/Makefile.webplugins"
-.else
-PLIST_SUB+= SIGNER="@comment "
+.if defined(WITH_CTAPI)
+CONFIGURE_ARGS+=--enable-ctapi
.endif
.ifndef(NOPORTDOCS)
@@ -104,20 +72,14 @@ CONFIGURE_ARGS+=--enable-doc
post-patch:
@${REINPLACE_CMD} 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
${WRKSRC}/configure
- @${REINPLACE_CMD} 's|tmp=1:0\.9\.2|tmp=2:2.0.0|' \
- ${WRKSRC}/configure
-.if !defined(WITH_SIGNER)
- @${REINPLACE_CMD} 's|install-data-am: install-pluginDATA|install-data-am:|' \
- ${WRKSRC}/src/signer/Makefile.in
-.endif
.ifdef(NOPORTDOCS)
@${REINPLACE_CMD} 's|install-data-am: install-dist_docDATA|install-data-am:|' \
${WRKSRC}/Makefile.in
- @${REINPLACE_CMD} 's|install-data-am: install-dist_docDATA install-dist_htmlDATA|install-data-am:|' \
+ @${REINPLACE_CMD} 's|install-data-am: install-htmlDATA install-man|install-data-am: install-man|' \
${WRKSRC}/doc/Makefile.in
.endif
post-install:
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/security/opensc/distinfo b/security/opensc/distinfo
index 1ed4cb6380f8..85754f633b04 100644
--- a/security/opensc/distinfo
+++ b/security/opensc/distinfo
@@ -1,3 +1,2 @@
-MD5 (opensc-0.11.13.tar.gz) = 98fa151e947941f9c3f27420fdf47c11
-SHA256 (opensc-0.11.13.tar.gz) = a9a42d6d51fb500f34248fcd0d4083c99d25bc5e74df60fe4efa19b5b4e6d890
-SIZE (opensc-0.11.13.tar.gz) = 1513327
+SHA256 (opensc-0.12.0.tar.gz) = 84f8a8e1825e487d321390f0650c590334c76f81291d2eb5a315ad73459d2f6f
+SIZE (opensc-0.12.0.tar.gz) = 1409151
diff --git a/security/opensc/files/patch-src_libopensc_card-piv.c b/security/opensc/files/patch-src_libopensc_card-piv.c
new file mode 100644
index 000000000000..c95c863a0458
--- /dev/null
+++ b/security/opensc/files/patch-src_libopensc_card-piv.c
@@ -0,0 +1,11 @@
+--- src/libopensc/card-piv.c.orig 2010-12-23 11:56:55.000000000 +0100
++++ src/libopensc/card-piv.c 2010-12-23 11:57:17.000000000 +0100
+@@ -28,7 +28,7 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <limits.h>
+-#ifndef __APPLE__
++#ifdef HAVE_MALLOC_H
+ #include <malloc.h>
+ #endif
+ #ifdef ENABLE_OPENSSL
diff --git a/security/opensc/files/patch-src_libopensc_internal-winscard.h b/security/opensc/files/patch-src_libopensc_internal-winscard.h
deleted file mode 100644
index da3e56ed880f..000000000000
--- a/security/opensc/files/patch-src_libopensc_internal-winscard.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/libopensc/internal-winscard.h.orig 2010-09-01 11:37:56.000000000 +0200
-+++ src/libopensc/internal-winscard.h 2010-09-01 11:38:31.000000000 +0200
-@@ -113,7 +113,7 @@
- typedef LONG (PCSC_API *SCardStatus_t)(SCARDHANDLE hCard, LPSTR mszReaderNames, LPDWORD pcchReaderLen,
- LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen);
- typedef LONG (PCSC_API *SCardGetStatusChange_t)(SCARDCONTEXT hContext, DWORD dwTimeout,
-- LPSCARD_READERSTATE_A rgReaderStates, DWORD cReaders);
-+ LPSCARD_READERSTATE rgReaderStates, DWORD cReaders);
- typedef LONG (PCSC_API *SCardControlOLD_t)(SCARDHANDLE hCard, LPCVOID pbSendBuffer, DWORD cbSendLength,
- LPVOID pbRecvBuffer, LPDWORD lpBytesReturned);
- typedef LONG (PCSC_API *SCardControl_t)(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer,
diff --git a/security/opensc/files/patch-src_libopensc_reader-pcsc.c b/security/opensc/files/patch-src_libopensc_reader-pcsc.c
deleted file mode 100644
index 5446f9ae73e1..000000000000
--- a/security/opensc/files/patch-src_libopensc_reader-pcsc.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/libopensc/reader-pcsc.c.orig 2010-09-01 12:44:28.000000000 +0200
-+++ src/libopensc/reader-pcsc.c 2010-09-01 12:44:52.000000000 +0200
-@@ -80,7 +80,7 @@
-
- struct pcsc_slot_data {
- SCARDHANDLE pcsc_card;
-- SCARD_READERSTATE_A reader_state;
-+ SCARD_READERSTATE reader_state;
- DWORD verify_ioctl;
- DWORD verify_ioctl_start;
- DWORD verify_ioctl_finish;
-@@ -353,7 +353,7 @@
- sc_context_t *ctx;
- SCARDCONTEXT pcsc_ctx;
- LONG ret;
-- SCARD_READERSTATE_A rgReaderStates[SC_MAX_READERS];
-+ SCARD_READERSTATE rgReaderStates[SC_MAX_READERS];
- unsigned long on_bits, off_bits;
- time_t end_time, now, delta;
- size_t i;
-@@ -401,7 +401,7 @@
- /* Wait for a status change and return if it's a card insert/removal
- */
- for( ; ; ) {
-- SCARD_READERSTATE_A *rsp;
-+ SCARD_READERSTATE *rsp;
-
- /* Scan the current state of all readers to see if they
- * match any of the events we're polling for */
diff --git a/security/opensc/files/patch-src_signer_dialog.c b/security/opensc/files/patch-src_signer_dialog.c
deleted file mode 100644
index c70406a21bfa..000000000000
--- a/security/opensc/files/patch-src_signer_dialog.c
+++ /dev/null
@@ -1,97 +0,0 @@
---- src/signer/dialog.c.orig 2010-02-16 07:03:25.000000000 -0200
-+++ src/signer/dialog.c 2010-06-26 06:42:17.000000000 -0300
-@@ -15,31 +15,31 @@
- 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 @@
- 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 @@
- 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 @@
- break;
- }
-
-- assuan_disconnect(ctx);
-+ assuan_release(ctx);
- return 0;
- err:
-- assuan_disconnect(ctx);
-+ assuan_release(ctx);
- return -1;
- }
diff --git a/security/opensc/pkg-plist b/security/opensc/pkg-plist
index 65151b095cb3..cfd3fa780902 100644
--- a/security/opensc/pkg-plist
+++ b/security/opensc/pkg-plist
@@ -1,9 +1,7 @@
-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
@@ -14,39 +12,10 @@ bin/pkcs15-tool
bin/rutoken-tool
bin/westcos-tool
etc/opensc.conf-sample
-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
-libdata/pkgconfig/libopensc.pc
-libdata/pkgconfig/libpkcs15init.pc
-libdata/pkgconfig/libscconf.pc
-%%SIGNER%%%%WEBPLUGINS_DIR%%/opensc-signer.so
-%%SIGNER%%lib/opensc-signer.a
-%%SIGNER%%lib/opensc-signer.la
-%%SIGNER%%lib/opensc-signer.so
lib/libopensc.a
lib/libopensc.la
lib/libopensc.so
-lib/libopensc.so.2
-lib/libpkcs15init.a
-lib/libpkcs15init.la
-lib/libpkcs15init.so
-lib/libpkcs15init.so.2
-lib/libscconf.a
-lib/libscconf.la
-lib/libscconf.so
-lib/libscconf.so.2
+lib/libopensc.so.3
lib/onepin-opensc-pkcs11.la
lib/onepin-opensc-pkcs11.so
lib/opensc-pkcs11.la
@@ -74,7 +43,6 @@ lib/pkcs11/pkcs11-spy.so
%%DATADIR%%/setcos.profile
%%DATADIR%%/starcos.profile
%%DATADIR%%/westcos.profile
-%%SIGNER%%@dirrmtry %%WEBPLUGINS_DIR%%
@dirrm include/opensc
@dirrm lib/pkcs11
@dirrm %%DATADIR%%