From 86118ac3f71fbfe581964f59ab29fdab7ac4ba06 Mon Sep 17 00:00:00 2001 From: dugsong Date: Sun, 12 Dec 1999 22:26:59 +0000 Subject: [PATCH] use rsaref port --- security/pgp5/Makefile | 28 +++------------------ security/pgp5/files/patch-rsaref2 | 25 ------------------- security/pgp5/files/patch-rsaref2-2 | 38 ----------------------------- security/pgp5/pkg/SECURITY | 4 --- 4 files changed, 4 insertions(+), 91 deletions(-) delete mode 100644 security/pgp5/files/patch-rsaref2 delete mode 100644 security/pgp5/files/patch-rsaref2-2 delete mode 100644 security/pgp5/pkg/SECURITY diff --git a/security/pgp5/Makefile b/security/pgp5/Makefile index 28f6535278e..5736a04815c 100644 --- a/security/pgp5/Makefile +++ b/security/pgp5/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 1999/12/09 03:50:57 brad Exp $ +# $OpenBSD: Makefile,v 1.5 1999/12/12 22:26:59 dugsong Exp $ DISTNAME= pgp50i-unix-src PKGNAME= pgp-5.0i @@ -17,9 +17,6 @@ MASTER_SITES= ftp://ftp.no.pgpi.com/pub/pgp/5.0/unix/ \ ftp://ftp.es.pgpi.com/pub/pgp/5.0/unix/ \ ftp://ftp.se.pgpi.com/pub/pgp/5.0/unix/ \ ftp://ftp.ch.pgpi.com/pub/pgp/5.0/unix/ -MASTER_SITES0= http://the.wiretapped.net/security/cryptography/libs/rsa/ \ - ftp://idea.dsi.unimi.it/pub/security/crypt/math/ \ - ftp://ftp.it.net.au/mirrors/crypto/misc/ NO_CDROM= "CRYPTO: Third party crypto not allowed." RESTRICTED= "Crypto; export-controlled" @@ -28,11 +25,7 @@ NEED_VERSION= 1.121 MAINTAINER= fgsch@openbsd.org -.if defined(USA_RESIDENT) && ${USA_RESIDENT:U} == YES -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} rsaref2.tar.gz:0 -.endif - -GNU_CONFIGURE= yes +USE_AUTOCONF= yes NO_PACKAGE= yes WRKSRC= ${WRKDIR}/pgp50i/src @@ -53,25 +46,12 @@ pre-fetch: .endif .endif -pre-patch: -.if defined(USA_RESIDENT) && ${USA_RESIDENT:U} == YES - @cp ${FILESDIR}/patch-rsaref2 ${PATCHDIR} - @cp ${FILESDIR}/patch-rsaref2-2 ${PATCHDIR} - @ln -fs ${WRKDIR}/rsaref2 ${WRKDIR}/pgp50i/rsaref -.endif - post-patch: @mv ${WRKSRC}/man/pgp.1 ${WRKSRC}/man/pgp5.1 -.if defined(USA_RESIDENT) && ${USA_RESIDENT:U} == YES - @rm -f ${PATCHDIR}/patch-rsaref2 - @rm -f ${PATCHDIR}/patch-rsaref2-2 -.endif -pre-configure: .if defined(USA_RESIDENT) && ${USA_RESIDENT:U} == YES - @(cd ${WRKDIR}/rsaref2/install/unix && \ - env ${MAKE_ENV} make -f makefile rsaref.a) - @mv ${WRKSRC}/lib/pgp/pubkey/pgpRSAGlue1.c \ +pre-configure: + @${MV} ${WRKSRC}/lib/pgp/pubkey/pgpRSAGlue1.c \ ${WRKSRC}/lib/pgp/pubkey/pgpRSAGlue1.c- .endif diff --git a/security/pgp5/files/patch-rsaref2 b/security/pgp5/files/patch-rsaref2 deleted file mode 100644 index 0d8d0f489be..00000000000 --- a/security/pgp5/files/patch-rsaref2 +++ /dev/null @@ -1,25 +0,0 @@ ---- ../rsaref/source/global.h.~1~ Fri Mar 25 12:01:46 1994 -+++ ../rsaref/source/global.h Thu Apr 2 00:12:23 1998 -@@ -7,6 +7,8 @@ - #ifndef _GLOBAL_H_ - #define _GLOBAL_H_ 1 - -+#include -+ - /* PROTOTYPES should be set to one if and only if the compiler supports - function argument prototyping. - The following makes PROTOTYPES default to 1 if it has not already been -@@ -23,7 +25,13 @@ - typedef unsigned short int UINT2; - - /* UINT4 defines a four byte word */ -+#if ( UINT_MAX == 0xffffffffU ) -+typedef unsigned int UINT4; -+#elif ( ULONG_MAX == 0xffffffffU ) - typedef unsigned long int UINT4; -+#else -+# error Unknown size for UINT4 -+#endif - - #ifndef NULL_PTR - #define NULL_PTR ((POINTER)0) diff --git a/security/pgp5/files/patch-rsaref2-2 b/security/pgp5/files/patch-rsaref2-2 deleted file mode 100644 index 4556f4476bf..00000000000 --- a/security/pgp5/files/patch-rsaref2-2 +++ /dev/null @@ -1,38 +0,0 @@ ---- ../rsaref/source/rsa.c.orig Fri Mar 25 14:01:48 1994 -+++ ../rsaref/source/rsa.c Sun Dec 12 14:00:08 1999 -@@ -33,6 +33,8 @@ - unsigned char byte, pkcsBlock[MAX_RSA_MODULUS_LEN]; - unsigned int i, modulusLen; - -+ if (publicKey->bits > MAX_RSA_MODULUS_BITS) -+ return (RE_LEN); - modulusLen = (publicKey->bits + 7) / 8; - if (inputLen + 11 > modulusLen) - return (RE_LEN); -@@ -78,6 +80,8 @@ - unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN]; - unsigned int i, modulusLen, pkcsBlockLen; - -+ if (publicKey->bits > MAX_RSA_MODULUS_BITS) -+ return (RE_LEN); - modulusLen = (publicKey->bits + 7) / 8; - if (inputLen > modulusLen) - return (RE_LEN); -@@ -129,6 +133,8 @@ - unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN]; - unsigned int i, modulusLen; - -+ if (privateKey->bits > MAX_RSA_MODULUS_BITS) -+ return (RE_LEN); - modulusLen = (privateKey->bits + 7) / 8; - if (inputLen + 11 > modulusLen) - return (RE_LEN); -@@ -168,6 +174,8 @@ - unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN]; - unsigned int i, modulusLen, pkcsBlockLen; - -+ if (privateKey->bits > MAX_RSA_MODULUS_BITS) -+ return (RE_LEN); - modulusLen = (privateKey->bits + 7) / 8; - if (inputLen > modulusLen) - return (RE_LEN); diff --git a/security/pgp5/pkg/SECURITY b/security/pgp5/pkg/SECURITY deleted file mode 100644 index 60bb501cd6e..00000000000 --- a/security/pgp5/pkg/SECURITY +++ /dev/null @@ -1,4 +0,0 @@ - -patch-rsaref2-2 fixes the buffer overflow in RSA{Private,Public}{De,En}crypt(), -as published by CORE SDI in their advisory of Dec. 1, 1999. -