= Update to use OpenSSL in the base if it has MD4 support (version 0.9.6
or later). If these libraries are used, then this port's libdes will not be built nor installed. = A man page was renamed that I missed earlier: afs.3 -> kafs.3
This commit is contained in:
parent
1c95237279
commit
a207a15093
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=36783
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= heimdal
|
||||
PORTVERSION= 0.3d
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security ipv6
|
||||
MASTER_SITES= ftp://ftp.pdc.kth.se/pub/heimdal/src/ \
|
||||
ftp://ftp.replay.com/pub/replay/crypto/APPS/kerberos/heimdal/ \
|
||||
@ -24,7 +25,7 @@ RESTRICTED= "Crypto; export-controlled"
|
||||
MAN1= ftp.1 kdestroy.1 kf.1 kgetcred.1 kinit.1 klist.1 kpasswd.1 \
|
||||
krb5-config.1 kx.1 otp.1 otpprint.1 pfrom.1 rxtelnet.1 \
|
||||
rxterm.1 telnet.1 tenletxr.1 xnlock.1
|
||||
MAN3= editline.3 afs.3 krb5_425_conv_principal.3 krb5_appdefault.3 \
|
||||
MAN3= editline.3 kafs.3 krb5_425_conv_principal.3 krb5_appdefault.3 \
|
||||
krb5_build_principal.3 krb5_config.3 krb5_free_principal.3 \
|
||||
krb5_openlog.3 krb5_parse_name.3 krb5_sname_to_principal.3 \
|
||||
krb5_unparse_name.3 krb5_warn.3
|
||||
@ -39,6 +40,7 @@ MAN8= ftpd.8 hprop.8 hpropd.8 kadmin.8 kadmind.8 kdc.8 kerberos.8 \
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_TARGET= --build=${MACHINE_ARCH}--freebsd${OSREL}
|
||||
INSTALLS_SHLIB= yes
|
||||
CONFIGURE_ENV= CPPFLAGS="${OPENSSL_INCLUDE}"
|
||||
CONFIGURE_ARGS= --prefix=${PREFIX} --enable-shared
|
||||
.if defined(WITH_LDAP)
|
||||
CONFIGURE_ARGS+= --with-openldap=${LOCALBASE}
|
||||
@ -64,13 +66,34 @@ CONFIGURE_ARGS+= --with-krb4
|
||||
CONFIGURE_ARGS+= --without-krb4
|
||||
.endif
|
||||
|
||||
# OpenSSL 0.9.6 and later have MD4 and can be used in the build
|
||||
.if exists(/usr/include/openssl/md4.h) && exists(/usr/lib/libdes.a)
|
||||
OPENSSL_INCLUDE= -I/usr/include/openssl
|
||||
OPENSSL_IN_BASE= YES
|
||||
.endif
|
||||
|
||||
PLIST:= ${WRKDIR}/PLIST
|
||||
|
||||
# The crypto APIs in the included libdes are trivially different from
|
||||
# those in OpenSSL, e.g. MD5Init versus MD5_Init. To make things simpler,
|
||||
# we normalize the API to use the latter naming convention. These are a
|
||||
# list of the files that must be munged.
|
||||
CRYPTO_FIXUP= lib/des/fcrypt.c lib/des/md4.c lib/des/md4.h \
|
||||
lib/des/md5.c lib/des/md5.h lib/des/mdtest.c \
|
||||
lib/des/sha.c lib/des/sha.h lib/gssapi/8003.c \
|
||||
lib/gssapi/get_mic.c lib/gssapi/unwrap.c \
|
||||
lib/gssapi/verify_mic.c lib/gssapi/wrap.c \
|
||||
lib/krb5/crypto.c lib/krb5/replay.c lib/otp/otp_md.c
|
||||
|
||||
pre-configure:
|
||||
@(set -e; \
|
||||
cd ${CONFIGURE_WRKSRC}; \
|
||||
find . -type f -name 'Makefile.in' -print | xargs perl -i -pe \
|
||||
's,\$$\(top_builddir\)/lib/com_err/compile_et,compile_et,';)
|
||||
(cd ${WRKSRC} && ${PERL} -i.orig -p \
|
||||
-e 's/(SHA1|MD5|MD4)(Init|Update|Final)/$$1_$$2/g;' \
|
||||
-e 's/SHA1_CTX/SHA_CTX/g;' \
|
||||
${CRYPTO_FIXUP})
|
||||
|
||||
pre-install:
|
||||
@${CP} ${PKGDIR}/pkg-plist ${PLIST}
|
||||
@ -80,6 +103,9 @@ pre-install:
|
||||
.if defined(USE_XLIB)
|
||||
@${CAT} ${PKGDIR}/pkg-plist.x11 >> ${PLIST}
|
||||
.endif
|
||||
.if !defined(OPENSSL_IN_BASE)
|
||||
@${CAT} ${PKGDIR}/pkg-plist.des >> ${PLIST}
|
||||
.endif
|
||||
|
||||
# awful hack to avoid running automake after patching configure
|
||||
pre-configure:
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- configure.in.orig Wed Aug 30 07:17:26 2000
|
||||
+++ configure.in Wed Aug 30 07:18:03 2000
|
||||
--- configure.in.orig Sun Dec 10 21:19:36 2000
|
||||
+++ configure.in Thu Jan 4 08:49:14 2001
|
||||
@@ -83,6 +83,10 @@
|
||||
LIB_openldap="-rpath $openldap_libdir $LIB_openldap"
|
||||
fi
|
||||
@ -11,3 +11,17 @@
|
||||
AC_TEST_PACKAGE_NEW(krb4,[#include <krb.h>],-lkrb,-ldes,/usr/athena, KRB4)
|
||||
|
||||
LIB_kdb=
|
||||
@@ -561,7 +565,12 @@
|
||||
\( "$ac_cv_func_SHA1Init" = "yes" -o "$ac_cv_func_SHA1_Init" = "yes" \) -a \
|
||||
"$ac_cv_func_RC4" = "yes"; then
|
||||
DIR_des=''
|
||||
- LIB_des="-rpath $krb4_libdir -L$krb4_libdir $ac_cv_funclib_MD4Init"
|
||||
+ LIB_des="-rpath $krb4_libdir -L$krb4_libdir"
|
||||
+ if test "$ac_cv_func_MD4Init" = "yes"; then
|
||||
+ LIB_des="$LIB_des $ac_cv_funclib_MD4Init"
|
||||
+ else
|
||||
+ LIB_des="$LIB_des $ac_cv_funclib_MD4_Init"
|
||||
+ fi
|
||||
else
|
||||
DIR_des='des'
|
||||
LIB_des='$(top_builddir)/lib/des/libdes.la'
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- configure.orig Wed Aug 30 07:17:21 2000
|
||||
+++ configure Wed Aug 30 07:18:31 2000
|
||||
@@ -9346,6 +9346,10 @@
|
||||
--- configure.orig Sun Dec 10 21:21:14 2000
|
||||
+++ configure Thu Jan 4 08:53:33 2001
|
||||
@@ -9511,6 +9511,10 @@
|
||||
LIB_openldap="-rpath $openldap_libdir $LIB_openldap"
|
||||
fi
|
||||
|
||||
@ -11,3 +11,17 @@
|
||||
# Check whether --with-krb4 or --without-krb4 was given.
|
||||
if test "${with_krb4+set}" = set; then
|
||||
withval="$with_krb4"
|
||||
@@ -18164,7 +18168,12 @@
|
||||
\( "$ac_cv_func_SHA1Init" = "yes" -o "$ac_cv_func_SHA1_Init" = "yes" \) -a \
|
||||
"$ac_cv_func_RC4" = "yes"; then
|
||||
DIR_des=''
|
||||
- LIB_des="-rpath $krb4_libdir -L$krb4_libdir $ac_cv_funclib_MD4Init"
|
||||
+ LIB_des="-rpath $krb4_libdir -L$krb4_libdir"
|
||||
+ if test "$ac_cv_func_MD4Init" = "yes"; then
|
||||
+ LIB_des="$LIB_des $ac_cv_funclib_MD4Init"
|
||||
+ else
|
||||
+ LIB_des="$LIB_des $ac_cv_funclib_MD4_Init"
|
||||
+ fi
|
||||
else
|
||||
DIR_des='des'
|
||||
LIB_des='$(top_builddir)/lib/des/libdes.la'
|
||||
|
@ -31,4 +31,3 @@
|
||||
+/*
|
||||
* Enable debug on `sock'.
|
||||
*/
|
||||
|
||||
|
38
security/heimdal/files/patch-cs
Normal file
38
security/heimdal/files/patch-cs
Normal file
@ -0,0 +1,38 @@
|
||||
--- lib/otp/otp_md.c.orig Tue Jul 11 19:26:43 2000
|
||||
+++ lib/otp/otp_md.c Thu Jan 4 09:38:17 2001
|
||||
@@ -212,7 +212,7 @@
|
||||
*/
|
||||
|
||||
static void
|
||||
-SHA1Final_little_endian (void *res, struct sha1 *m)
|
||||
+SHA1Final_little_endian (void *res, SHA_CTX *m)
|
||||
{
|
||||
unsigned char tmp[20];
|
||||
unsigned char *p = res;
|
||||
@@ -231,7 +231,7 @@
|
||||
otp_sha_init (OtpKey key, const char *pwd, const char *seed)
|
||||
{
|
||||
unsigned char res[20];
|
||||
- struct sha1 sha1;
|
||||
+ SHA_CTX sha1;
|
||||
|
||||
return otp_md_init (key, pwd, seed,
|
||||
(void (*)(void *))SHA1Init,
|
||||
@@ -245,7 +245,7 @@
|
||||
size_t len,
|
||||
unsigned char *res)
|
||||
{
|
||||
- struct sha1 sha1;
|
||||
+ SHA_CTX sha1;
|
||||
|
||||
return otp_md_hash (data, len,
|
||||
(void (*)(void *))SHA1Init,
|
||||
@@ -258,7 +258,7 @@
|
||||
otp_sha_next (OtpKey key)
|
||||
{
|
||||
unsigned char res[20];
|
||||
- struct sha1 sha1;
|
||||
+ SHA_CTX sha1;
|
||||
|
||||
return otp_md_next (key,
|
||||
(void (*)(void *))SHA1Init,
|
@ -1,4 +1,3 @@
|
||||
bin/des
|
||||
bin/ftp
|
||||
bin/kauth
|
||||
bin/kdestroy
|
||||
@ -64,9 +63,6 @@ info/heimdal.info
|
||||
lib/libasn1.a
|
||||
lib/libasn1.so
|
||||
lib/libasn1.so.3
|
||||
lib/libdes.a
|
||||
lib/libdes.so
|
||||
lib/libdes.so.2
|
||||
lib/libeditline.a
|
||||
lib/libgssapi.a
|
||||
lib/libgssapi.so
|
||||
|
9
security/heimdal/pkg-plist.des
Normal file
9
security/heimdal/pkg-plist.des
Normal file
@ -0,0 +1,9 @@
|
||||
bin/des
|
||||
include/des.h
|
||||
include/md4.h
|
||||
include/md5.h
|
||||
include/rc4.h
|
||||
include/sha.h
|
||||
lib/libdes.a
|
||||
lib/libdes.so
|
||||
lib/libdes.so.2
|
Loading…
Reference in New Issue
Block a user