aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2003-12-10 12:55:36 +0000
committerBruce M Simpson <bms@FreeBSD.org>2003-12-10 12:55:36 +0000
commit163ab603eed9462107d2651ed3780ac1aefef1a0 (patch)
tree395b3b2a6514d493f0a12b04f0cdf100f0b371e6 /security
parent3f0e697817630f6ef3f2e88ebd9c2a258fd4e398 (diff)
downloadports-163ab603eed9462107d2651ed3780ac1aefef1a0.tar.gz
ports-163ab603eed9462107d2651ed3780ac1aefef1a0.zip
Notes
Diffstat (limited to 'security')
-rw-r--r--security/opensc/Makefile76
-rw-r--r--security/opensc/distinfo2
-rw-r--r--security/opensc/files/patch-src::libopensc::card-gpk.c48
-rw-r--r--security/opensc/files/patch-src::sslengines::engine_opensc.c10
-rw-r--r--security/opensc/files/patch-src::sslengines::hw_opensc.c10
-rw-r--r--security/opensc/pkg-descr6
-rw-r--r--security/opensc/pkg-plist126
7 files changed, 158 insertions, 120 deletions
diff --git a/security/opensc/Makefile b/security/opensc/Makefile
index 9c26f32a64d6..16eb2d891b38 100644
--- a/security/opensc/Makefile
+++ b/security/opensc/Makefile
@@ -1,33 +1,79 @@
# New ports collection makefile for: opensc
# Date created: 10 September 2002
-# Whom: Bruce M Simpson <bms@spc.org>
+# Whom: Bruce M Simpson
#
# $FreeBSD$
#
PORTNAME= opensc
-PORTVERSION= 0.7.0
-PORTREVISION= 1
+PORTVERSION= 0.8.1
CATEGORIES= security devel
-MASTER_SITES= http://www.opensc.org/files/old/
+MASTER_SITES= http://www.opensc.org/files/
MAINTAINER= bms@FreeBSD.org
-COMMENT= ISO 7816 Smartcard API Library (OpenSSH Compatible)
+COMMENT= ISO 7816 Smartcard API
-LIB_DEPENDS= pcsclite.0:${PORTSDIR}/devel/pcsc-lite \
- ldap.2:${PORTSDIR}/net/openldap20-client
+RUN_DEPENDS= ${LOCALBASE}/bin/pkg-config:${PORTSDIR}/devel/pkgconfig
INSTALLS_SHLIB= yes
USE_OPENSSL= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-pcsclite=${LOCALBASE} \
- --with-ldap-lib=openldap \
- --with-ldap-dir=${LOCALBASE} \
- --with-plugin-dir=${LOCALBASE}/share/opensc/plugins
-
-MAN1= pkcs15-crypt.1 pkcs15-init.1
-MAN5= pkcs15-profile.5
-MAN7= pkcs15.7
+
+MANCOMPRESSED= no
+MAN1= pkcs15-crypt.1 pkcs15-init.1 pkcs15-tool.1 opensc-tool.1 \
+ opensc-explorer.1 opensc-config.1 cryptoflex-tool.1
+MAN3= sc_select_file.3 sc_release_context.3 sc_read_record.3 \
+ sc_read_binary.3 sc_pkcs15_compute_signature.3 sc_lock.3 \
+ sc_list_files.3 sc_file_new.3 sc_file_free.3 sc_file.3 \
+ sc_establish_context.3 sc_disconnect_card.3 \
+ sc_detect_card_presence.3 sc_connect_card.3
+MAN5= pkcs15-profile.5
+MAN7= pkcs15.7 opensc.7
+
+# Compilation Options
+#
+# Define boolean switches:
+# WITHOUT_PAM WITHOUT_PCSC_LITE WITHOUT_LDAP
+# WITH_USBTOKEN WITH_DOCBOOK WITH_MOZILLA
+#
+# Default: WITH_PAM, WITH_PCSC_LITE, WITH_LDAP.
+#
+CONFIGURE_ARGS= --prefix=${PREFIX} --disable-dependency-tracking
+
+.if !defined(WITHOUT_PAM)
+CONFIGURE_ARGS+= --with-pam
+.endif
+.if !defined(WITHOUT_PCSC_LITE)
+LIB_DEPENDS+= pcsclite.0:${PORTSDIR}/devel/pcsc-lite
+CONFIGURE_ARGS+= --with-pcsclite=${LOCALBASE}
+.endif
+
+.if !defined(WITHOUT_LDAP)
+WITH_OPENLDAP_VER?= 21
+.if ${WITH_OPENLDAP_VER} == "21"
+LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap21-client
+.elif ${WITH_OPENLDAP_VER} == "20"
+LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap20-client
+.endif
+
+CONFIGURE_ARGS+= --enable-ldap \
+ --with-ldap-lib=openldap \
+ --with-ldap-dir=${LOCALBASE}
+.else
+CONFIGURE_ARGS+= --disable-ldap
+.endif
+
+.if !defined(WITH_DOCBOOK)
+CONFIGURE_ARGS+= --without-docbook
+.endif
+
+# XXX USB token support doesn't work yet on FreeBSD. Accepting patches.
+.if defined(WITH_USBTOKEN)
+CONFIGURE_ARGS+= --enable-usbtoken
+.endif
+.if defined(WITH_MOZILLA)
+CONFIGURE_ARGS+= --with-plugin-dir=${X11BASE}/lib/mozilla/plugins
+.endif
.include <bsd.port.mk>
diff --git a/security/opensc/distinfo b/security/opensc/distinfo
index af2098ce3920..20e30fd09ca6 100644
--- a/security/opensc/distinfo
+++ b/security/opensc/distinfo
@@ -1 +1 @@
-MD5 (opensc-0.7.0.tar.gz) = 12a6afb94a947065d9d0a4eaf91cb15e
+MD5 (opensc-0.8.1.tar.gz) = 2b64a8e629bd28a00e707e35fd3eb9c7
diff --git a/security/opensc/files/patch-src::libopensc::card-gpk.c b/security/opensc/files/patch-src::libopensc::card-gpk.c
deleted file mode 100644
index 328b0b111e69..000000000000
--- a/security/opensc/files/patch-src::libopensc::card-gpk.c
+++ /dev/null
@@ -1,48 +0,0 @@
---- src/libopensc/card-gpk.c.orig Thu May 2 08:54:27 2002
-+++ src/libopensc/card-gpk.c Tue Feb 25 15:30:23 2003
-@@ -35,6 +35,7 @@
- GPK4000_s,
- GPK4000_sp,
- GPK4000_sdo,
-+ GPK4000_su40,
- GPK8000 = 8000,
- GPK8000_8K,
- GPK8000_16K,
-@@ -101,6 +102,7 @@
- } atrlist[] = {
- { "\x3B\x27\x00\x80\x65\xA2\x04\x01\x01\x37", 10, GPK4000_s },
- { "\x3B\x27\x00\x80\x65\xA2\x05\x01\x01\x37", 10, GPK4000_sp },
-+ { "\x3B\x27\x00\x80\x65\xA2\x06\x01\x01\x37", 10, GPK4000_su40 },
- { "\x3B\x27\x00\x80\x65\xA2\x0C\x01\x01\x37", 10, GPK4000_su256 },
- { "\x3B\xA7\x00\x40\x14\x80\x65\xA2\x14\x01\x01\x37", 12, GPK4000_sdo },
- { "\x3B\xA7\x00\x40\x18\x80\x65\xA2\x08\x01\x01\x52", 12, GPK8000_8K },
-@@ -735,8 +737,8 @@
- apdu->le += 3;
- if (crycks1)
- memcpy(crycks1, out, 3);
-- memset(k1, 0, sizeof(k1));
-- memset(k2, 0, sizeof(k2));
-+ memset(&k1, 0, sizeof(k1));
-+ memset(&k2, 0, sizeof(k2));
- memset(in, 0, sizeof(in));
- memset(out, 0, sizeof(out));
- memset(block, 0, sizeof(block));
-@@ -878,8 +880,8 @@
- if (memcmp(r_rn, out+4, 4) != 0)
- r = SC_ERROR_INVALID_ARGUMENTS;
-
-- memset(k1, 0, sizeof(k1));
-- memset(k2, 0, sizeof(k2));
-+ memset(&k1, 0, sizeof(k1));
-+ memset(&k2, 0, sizeof(k2));
- memset(out, 0, sizeof(out));
- return r;
- }
-@@ -1440,6 +1442,7 @@
-
- SC_FUNC_CALLED(card->ctx, 1);
- switch (priv->variant) {
-+ case GPK4000_su40:
- case GPK4000_su256:
- case GPK4000_sdo:
- offset = 0x6B; /* courtesy gemplus hotline */
diff --git a/security/opensc/files/patch-src::sslengines::engine_opensc.c b/security/opensc/files/patch-src::sslengines::engine_opensc.c
new file mode 100644
index 000000000000..82c5da34dc40
--- /dev/null
+++ b/security/opensc/files/patch-src::sslengines::engine_opensc.c
@@ -0,0 +1,10 @@
+--- src/sslengines/engine_opensc.c.orig Wed Dec 10 12:20:59 2003
++++ src/sslengines/engine_opensc.c Wed Dec 10 12:21:11 2003
+@@ -27,6 +27,7 @@
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <openssl/crypto.h>
diff --git a/security/opensc/files/patch-src::sslengines::hw_opensc.c b/security/opensc/files/patch-src::sslengines::hw_opensc.c
new file mode 100644
index 000000000000..f932e6b7c43f
--- /dev/null
+++ b/security/opensc/files/patch-src::sslengines::hw_opensc.c
@@ -0,0 +1,10 @@
+--- src/sslengines/hw_opensc.c.orig Wed Dec 10 12:21:02 2003
++++ src/sslengines/hw_opensc.c Wed Dec 10 12:21:21 2003
+@@ -62,6 +62,7 @@
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <openssl/engine.h>
diff --git a/security/opensc/pkg-descr b/security/opensc/pkg-descr
index a88c5ad37c71..b9737e9d05a9 100644
--- a/security/opensc/pkg-descr
+++ b/security/opensc/pkg-descr
@@ -8,9 +8,5 @@ card. Swedish Posten eID cards have also been confirmed to work.
WWW: http://www.opensc.org/
-I have also included a small patch to allow the 'IBM Smart Card Security Kit'
-to be used out-of-the-box. This kit contains a card which is actually a
-rebranded Gemplus GPK4000 card with a slightly different ATR.
-
Bruce
-<bms@spc.org>
+bms@FreeBSD.org
diff --git a/security/opensc/pkg-plist b/security/opensc/pkg-plist
index 66a16db948a2..33d4557b01b3 100644
--- a/security/opensc/pkg-plist
+++ b/security/opensc/pkg-plist
@@ -1,54 +1,78 @@
-bin/cryptoflex-tool
-bin/opensc-config
-bin/opensc-explorer
-bin/opensc-tool
-bin/pkcs15-crypt
-bin/pkcs15-init
-bin/pkcs15-tool
-include/opensc/asn1.h
-include/opensc/cardctl.h
-include/opensc/emv.h
-include/opensc/errors.h
-include/opensc/log.h
-include/opensc/opensc.h
-include/opensc/pkcs15-init.h
-include/opensc/pkcs15.h
-include/opensc/scconf.h
-include/opensc/scldap.h
-include/opensc/scrandom.h
-include/opensc/types.h
-lib/libopensc.a
-lib/libopensc.la
-lib/libopensc.so
-lib/libopensc.so.0
-lib/libpkcs15init.a
-lib/libpkcs15init.la
-lib/libpkcs15init.so
-lib/libpkcs15init.so.0
-lib/libscam.a
-lib/libscam.la
-lib/libscam.so
-lib/libscconf.a
-lib/libscconf.la
-lib/libscconf.so
-lib/libscconf.so.0
-lib/libscldap.a
-lib/libscldap.la
-lib/libscldap.so
-lib/libscldap.so.0
-lib/libscrandom.a
-lib/pkcs11/opensc-pkcs11.so
-lib/security/pam_opensc.a
-lib/security/pam_opensc.la
-lib/security/pam_opensc.so
-share/opensc/flex.profile
-share/opensc/gpk.profile
-share/opensc/miocos.profile
-share/opensc/opensc.conf.example
-share/opensc/pkcs15.profile
share/opensc/scldap.conf.example
-@dirrm include/opensc
-@dirrm share/opensc/plugins
+share/opensc/pkcs15.profile
+share/opensc/pkcs15-small.profile
+share/opensc/opensc.conf.example
+share/opensc/miocos.profile
+share/opensc/gpk.profile
+share/opensc/flex_so.profile
+share/opensc/flex_onepin.profile
+share/opensc/flex.profile
+share/opensc/etoken.profile
@dirrm share/opensc
-@dirrm lib/security
+lib/security/pam_opensc.so
+lib/security/pam_opensc.la
+lib/security/pam_opensc.a
+lib/pkgconfig/libopensc.pc
+lib/pkcs11/pkcs11-spy.so
+lib/pkcs11/pkcs11-spy.la
+lib/pkcs11/pkcs11-spy.a
+lib/pkcs11/opensc-pkcs11.so
+lib/pkcs11/opensc-pkcs11.la
+lib/pkcs11/opensc-pkcs11.a
+lib/pkcs11/libpkcs11.so.0
+lib/pkcs11/libpkcs11.so
+lib/pkcs11/libpkcs11.la
+lib/pkcs11/libpkcs11.a
@dirrm lib/pkcs11
+lib/opensc/engine_pkcs11.so
+lib/opensc/engine_pkcs11.la
+lib/opensc/engine_pkcs11.a
+lib/opensc/engine_opensc.so
+lib/opensc/engine_opensc.la
+lib/opensc/engine_opensc.a
+@dirrm lib/opensc
+lib/libscldap.so.0
+lib/libscldap.so
+lib/libscldap.la
+lib/libscldap.a
+lib/libscconf.so.0
+lib/libscconf.so
+lib/libscconf.la
+lib/libscconf.a
+lib/libscam.so
+lib/libscam.la
+lib/libscam.a
+lib/libpkcs15init.so.0
+lib/libpkcs15init.so
+lib/libpkcs15init.la
+lib/libpkcs15init.a
+lib/libopensc.so.0
+lib/libopensc.so
+lib/libopensc.la
+lib/libopensc.a
+include/opensc/types.h
+include/opensc/scldap.h
+include/opensc/scconf.h
+include/opensc/rsaref/pkcs11t.h
+include/opensc/rsaref/pkcs11f.h
+include/opensc/rsaref/pkcs11.h
+@dirrm include/opensc/rsaref
+include/opensc/pkcs15.h
+include/opensc/pkcs15-init.h
+include/opensc/pkcs11.h
+include/opensc/opensc.h
+include/opensc/log.h
+include/opensc/errors.h
+include/opensc/emv.h
+include/opensc/cardctl.h
+include/opensc/asn1.h
+@dirrm include/opensc
+bin/pkcs15-tool
+bin/pkcs15-init
+bin/pkcs15-crypt
+bin/pkcs11-tool
+bin/opensc-tool
+bin/opensc-explorer
+bin/opensc-config
+bin/cryptoflex-tool
+bin/cardos-info