Index: head/security/opensc/Makefile =================================================================== --- head/security/opensc/Makefile (revision 257093) +++ head/security/opensc/Makefile (revision 257094) @@ -1,118 +1,123 @@ # New ports collection makefile for: opensc # Date created: 10 September 2002 # Whom: Bruce M Simpson # # $FreeBSD$ # PORTNAME= opensc PORTVERSION= 0.11.13 PORTREVISION= 1 CATEGORIES= security devel MASTER_SITES= http://www.opensc-project.org/files/${PORTNAME}/ \ http://www.opensc-project.org/files/${PORTNAME}/testing/ 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 +LICENSE= LGPL21 +LICENSE_FILE= ${WRKSRC}/COPYING + USE_AUTOTOOLS= libltdl:22 USE_ICONV= yes USE_OPENSSL= yes USE_GMAKE= yes GNU_CONFIGURE= yes USE_GNOME= pkgconfig 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" PORTDOCS= * MANCOMPRESSED= no MAN1= cardos-tool.1 cryptoflex-tool.1 netkey-tool.1 \ opensc-config.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 .if !defined(WITHOUT_OPENCT) LIB_DEPENDS+= openct.1:${PORTSDIR}/security/openct CONFIGURE_ARGS+=--enable-openct .endif .if defined(WITH_PCSC) LIB_DEPENDS+= pcsclite.1:${PORTSDIR}/devel/pcsc-lite CONFIGURE_ARGS+=--enable-pcsc .endif .if defined(WITH_SIGNER) -BUILD_DEPENDS+= ${LOCALBASE}/lib/libassuan.a:${PORTSDIR}/security/libassuan-1 +LIB_DEPENDS+= assuan.0:${PORTSDIR}/security/libassuan PINENTRY?= ${LOCALBASE}/bin/pinentry PINENTRY_PORT?= security/pinentry RUN_DEPENDS+= pinentry:${PORTSDIR}/${PINENTRY_PORT} -USE_XORG= x11 +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 " .endif .ifndef(NOPORTDOCS) CONFIGURE_ARGS+=--enable-doc .endif 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:|' \ ${WRKSRC}/doc/Makefile.in .endif post-install: @${CAT} ${PKGMESSAGE} .include Property changes on: head/security/opensc/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.42 \ No newline at end of property +1.43 \ No newline at end of property Index: head/security/opensc/files/patch-src_signer_dialog.c =================================================================== --- head/security/opensc/files/patch-src_signer_dialog.c (nonexistent) +++ head/security/opensc/files/patch-src_signer_dialog.c (revision 257094) @@ -0,0 +1,97 @@ +--- 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; + } Property changes on: head/security/opensc/files/patch-src_signer_dialog.c ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property