瀏覽代碼

new package: PGP 6.5.8

Ralf S. Engelschall 24 年之前
父節點
當前提交
0557b28143
共有 2 個文件被更改,包括 519 次插入14 次删除
  1. 24 14
      pgp/pgp.spec
  2. 495 0
      pgp/pgpsrc658unix.patch

+ 24 - 14
pgp/pgp.spec

@@ -51,43 +51,53 @@ AutoReq:      no
 AutoReqProv:  no
 
 %description
-    ...
+    PGP (Pretty Good Privacy) is a public key encryption program
+    originally written by Phil Zimmermann in 1991.
 
 %prep
+    %setup -c -n pgp-%{V_long}
     rm -rf pgpsrc pgp-%{V_long}
     %{l_gzip} -d -c %{SOURCE pgpsrc%{V_strip}unix.tar.gz} | %{l_tar} xf -
     %{l_gzip} -d -c pgpsrc%{V_strip}unix.tar.gz | %{l_tar} xf -
-    mv pgpsrc pgp-%{V_long}
-    cd pgp-%{V_long}
+    cd pgpsrc
     %{l_patch} -p0 <%{SOURCE pgpsrc%{V_strip}unix.patch}
 
 %build
-    cd pgp-%{V_long}
+    cd pgpsrc
     ( cd libs/pfl
       CC="%{l_cc}" CFLAGS="%{l_cflags -O}" ./configure
-      %{l_make} %{l_mflags} OPT=%{l_cflags -O} DEBUG=0
+      %{l_make} %{l_mflags} OPT="%{l_cflags -O}" DEBUG=0
     )
     ( cd libs/pgpcdk
       CC="%{l_cc}" CFLAGS="%{l_cflags -O}" ./configure
       %{l_make} %{l_mflags} headers
-      %{l_make} %{l_mflags} OPT=%{l_cflags -O} DEBUG=0
+      %{l_make} %{l_mflags} OPT="%{l_cflags -O}" DEBUG=0
     )
     ( cd clients/pgp/shared
       CC="%{l_cc}" CFLAGS="%{l_cflags -O}" ./configure
-      %{l_make} %{l_mflags} OPT=%{l_cflags -O} DEBUG=0
+      %{l_make} %{l_mflags} OPT="%{l_cflags -O}" DEBUG=0
     )
     ( cd clients/pgp/cmdline
-      CC="%{l_cc}" CFLAGS="%{l_cflags -O}" ./configure
-      %{l_make} %{l_mflags} OPT=%{l_cflags -O} DEBUG=0
+      CFLAGS="%{l_cflags -O}"
+      case "%{l_target}" in
+          *-freebsd* ) CFLAGS="$CFLAGS -pthread" ;;
+      esac
+      CC="%{l_cc}" CFLAGS="$CFLAGS" LIBS="$LIBS" ./configure
+      %{l_make} %{l_mflags} OPT="%{l_cflags -O}" DEBUG=0
     )
 
 %install
-    exit 0
     rm -rf $RPM_BUILD_ROOT
-    %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
-    rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
-    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
-    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/bin \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man1
+    ( cd pgpsrc/clients/pgp/cmdline
+      %{l_shtool} install -c -s -m 755 \
+          pgp $RPM_BUILD_ROOT%{l_prefix}/bin/
+      %{l_shtool} install -c -m 644 \
+          packaging/pgp-*/man/man1/pgp.1 \
+          $RPM_BUILD_ROOT%{l_prefix}/man/man1/
+    )
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
 
 %files -f files

+ 495 - 0
pgp/pgpsrc658unix.patch

@@ -0,0 +1,495 @@
+*** libs/pfl/common/pgpRMWOLock.c	2000/01/25 23:30:04	1.1.1.1
+--- libs/pfl/common/pgpRMWOLock.c	2000/01/25 23:32:31	1.1.1.2
+***************
+*** 8,15 ****
+  ____________________________________________________________________________*/
+  
+  #include "pgpBase.h"
+  
+  #include "pgpRMWOLock.h"
+  
+  #if PGP_UNIX_SOLARIS
+  /*
+--- 8,19 ----
+  ____________________________________________________________________________*/
+  
+  #include "pgpBase.h"
+  
+  #include "pgpRMWOLock.h"
++ 
++ #ifdef __FreeBSD__
++ #define	NULL	0 /* undefined for some reason */
++ #endif
+  
+  #if PGP_UNIX_SOLARIS
+  /*
+*** libs/pgpcdk/priv/crypto/bignum/bni80386_aout.s	2000/01/26 03:23:29	1.1
+--- libs/pgpcdk/priv/crypto/bignum/bni80386_aout.s	2000/01/26 03:23:59	1.2
+***************
+*** 16,24 ****
+  
+  # Different assemblers have different conventions here
+  # These conventions are for a.out format assembler
+! align4=2	# could be 2 or 4
+! align8=3	# could be 3 or 8
+! align16=4	# cound be 4 or 16
+  
+  
+  .text
+--- 16,26 ----
+  
+  # Different assemblers have different conventions here
+  # These conventions are for a.out format assembler
+! 
+! # Changed from 2,3,4 to 4,8,16 for FreeBSD
+! align4=4	# could be 2 or 4
+! align8=8	# could be 3 or 8
+! align16=16	# cound be 4 or 16
+  
+  
+  .text
+*** libs/pgpcdk/pub/include/pgpSockets.h	2000/01/26 03:10:46	1.1.1.1
+--- libs/pgpcdk/pub/include/pgpSockets.h	2000/01/26 03:13:58	1.1.1.2
+***************
+*** 30,35 ****
+--- 30,39 ----
+  # include <netdb.h>
+  #endif
+  
++ #ifdef __FreeBSD__
++ # include <sys/ioctl.h>		/* Need FIONREAD */
++ #endif
++ 
+  #if PGP_WIN32
+  # include <winsock.h>
+  #endif
+*** libs/pgpcdk/priv/networklib/keyserver/CCRSEntrustServer.cpp	2000/01/26 03:10:44	1.1.1.1
+--- libs/pgpcdk/priv/networklib/keyserver/CCRSEntrustServer.cpp	2000/01/26 03:13:47	1.1.1.2
+***************
+*** 147,153 ****
+  		if (! PGPKeySetRefIsValid(inCAsKeySet)) {
+  			ThrowPGPError_(kPGPError_OptionNotFound);
+  		}
+! 		if (accumulatedCRLs == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		pgpErr = PGPGetCRLDistributionPoints(inCAKey, inCAsKeySet, &numPoints, &points,
+--- 147,153 ----
+  		if (! PGPKeySetRefIsValid(inCAsKeySet)) {
+  			ThrowPGPError_(kPGPError_OptionNotFound);
+  		}
+! 		if (accumulatedCRLs == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		pgpErr = PGPGetCRLDistributionPoints(inCAKey, inCAsKeySet, &numPoints, &points,
+***************
+*** 173,179 ****
+  #if PGP_COMPILER_SUN
+  			pgpCopyMemory(static_cast<PGPByte *>(crl), static_cast<PGPByte *>(accumulatedCRLs) + accumulatedSize, crlSize);
+  #else
+! 			pgpCopyMemory(crl, static_cast<PGPByte *>(accumulatedCRLs) + accumulatedSize, crlSize);
+  #endif
+  			accumulatedSize += crlSize;
+  			currPoint += *currPointSize;
+--- 173,179 ----
+  #if PGP_COMPILER_SUN
+  			pgpCopyMemory(static_cast<PGPByte *>(crl), static_cast<PGPByte *>(accumulatedCRLs) + accumulatedSize, crlSize);
+  #else
+! 			pgpCopyMemory((void *) crl, static_cast<PGPByte *>(accumulatedCRLs) + accumulatedSize, crlSize);
+  #endif
+  			accumulatedSize += crlSize;
+  			currPoint += *currPointSize;
+***************
+*** 215,221 ****
+  						PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  									GetMaxBase64EncodedBufferSize(inMessageLength),
+  									kPGPMemoryMgrFlags_None));
+! 	if (encodedBuffer == 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	}
+  	encodedSize = Base64Encode(	static_cast<const PGPByte *>(inMessage),
+--- 215,221 ----
+  						PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  									GetMaxBase64EncodedBufferSize(inMessageLength),
+  									kPGPMemoryMgrFlags_None));
+! 	if (encodedBuffer == (StPGPDataRef) 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	}
+  	encodedSize = Base64Encode(	static_cast<const PGPByte *>(inMessage),
+***************
+*** 226,232 ****
+  						PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  									GetMaxURLEncodedBufferSize(encodedSize) + bufSize,
+  									kPGPMemoryMgrFlags_None));
+! 	if (encodedBuffer == 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	}
+  	strcpy(urlEncodedBuffer, kMessagePrefix);
+--- 226,232 ----
+  						PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  									GetMaxURLEncodedBufferSize(encodedSize) + bufSize,
+  									kPGPMemoryMgrFlags_None));
+! 	if (encodedBuffer == (StPGPDataRef) 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	}
+  	strcpy(urlEncodedBuffer, kMessagePrefix);
+*** libs/pgpcdk/priv/networklib/keyserver/CHTTPKeyServer.cpp	2000/01/26 03:10:44	1.1.1.1
+--- libs/pgpcdk/priv/networklib/keyserver/CHTTPKeyServer.cpp	2000/01/26 03:13:48	1.1.1.2
+***************
+*** 341,353 ****
+  	tempStorage = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  														kTempStorageSize,
+  														kPGPMemoryMgrFlags_None));
+! 	if (tempStorage == 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	}
+  	buffer = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  												result + 1,
+  												kPGPMemoryMgrFlags_None));
+! 	if (buffer == 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	}
+  	socketResult = PGPReceive(	mSocket,
+--- 341,353 ----
+  	tempStorage = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  														kTempStorageSize,
+  														kPGPMemoryMgrFlags_None));
+! 	if (tempStorage == (StPGPDataRef) 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	}
+  	buffer = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  												result + 1,
+  												kPGPMemoryMgrFlags_None));
+! 	if (buffer == (StPGPDataRef) 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	}
+  	socketResult = PGPReceive(	mSocket,
+*** libs/pgpcdk/priv/networklib/keyserver/CHTTPPGPKeyServer.cpp	2000/01/26 03:10:44	1.1.1.1
+--- libs/pgpcdk/priv/networklib/keyserver/CHTTPPGPKeyServer.cpp	2000/01/26 03:13:48	1.1.1.2
+***************
+*** 92,98 ****
+  		path = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													strlen(kQueryPrefix) + strlen(query) + 1,
+  													kPGPMemoryMgrFlags_None));
+! 		if (path == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		sprintf(path, "%s%s", kQueryPrefix, static_cast<char *>(query));
+--- 92,98 ----
+  		path = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													strlen(kQueryPrefix) + strlen(query) + 1,
+  													kPGPMemoryMgrFlags_None));
+! 		if (path == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		sprintf(path, "%s%s", kQueryPrefix, static_cast<char *>(query));
+***************
+*** 188,194 ****
+  				PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  							GetMaxURLEncodedBufferSize(bufSize) + postPrefixSize,
+  							kPGPMemoryMgrFlags_None));
+! 			if (urlEncodedBuffer == 0) {
+  				ThrowPGPError_(kPGPError_OutOfMemory);
+  			}
+  			strcpy(urlEncodedBuffer, kPostPrefix);
+--- 188,194 ----
+  				PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  							GetMaxURLEncodedBufferSize(bufSize) + postPrefixSize,
+  							kPGPMemoryMgrFlags_None));
+! 			if (urlEncodedBuffer == (StPGPDataRef) 0) {
+  				ThrowPGPError_(kPGPError_OutOfMemory);
+  			}
+  			strcpy(urlEncodedBuffer, kPostPrefix);
+*** libs/pgpcdk/priv/networklib/keyserver/CHTTPXcertServer.cpp	2000/01/26 03:10:44	1.1.1.1
+--- libs/pgpcdk/priv/networklib/keyserver/CHTTPXcertServer.cpp	2000/01/26 03:13:49	1.1.1.2
+***************
+*** 89,95 ****
+  		digest = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													GetMaxDigestedKeyBufferSize(),
+  													kPGPMemoryMgrFlags_None));
+! 		if (digest == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		};
+  		digestSize = DigestKey(inCAKey, digest);
+--- 89,95 ----
+  		digest = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													GetMaxDigestedKeyBufferSize(),
+  													kPGPMemoryMgrFlags_None));
+! 		if (digest == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		};
+  		digestSize = DigestKey(inCAKey, digest);
+***************
+*** 98,104 ****
+  			PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  						GetMaxBase64EncodedBufferSize(inBufferSize),
+  						kPGPMemoryMgrFlags_None));
+! 		if (encodedBuffer == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		};
+  		bufSize = Base64Encode(	static_cast<const PGPByte *>(inBuffer),
+--- 98,104 ----
+  			PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  						GetMaxBase64EncodedBufferSize(inBufferSize),
+  						kPGPMemoryMgrFlags_None));
+! 		if (encodedBuffer == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		};
+  		bufSize = Base64Encode(	static_cast<const PGPByte *>(inBuffer),
+***************
+*** 109,115 ****
+  		cnk = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													cnkSize,
+  													kPGPMemoryMgrFlags_None));
+! 		if (cnk == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		pgpErr = PGPGetKeyPropertyBuffer(	inRequestKey,
+--- 109,115 ----
+  		cnk = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													cnkSize,
+  													kPGPMemoryMgrFlags_None));
+! 		if (cnk == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		pgpErr = PGPGetKeyPropertyBuffer(	inRequestKey,
+***************
+*** 121,127 ****
+  		encodedCNK = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  														GetMaxHexEncodedBufferSize(cnkSize),
+  														kPGPMemoryMgrFlags_None));
+! 		if (encodedCNK == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		cnkSize = HexEncode(cnk, cnkSize, encodedCNK);
+--- 121,127 ----
+  		encodedCNK = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  														GetMaxHexEncodedBufferSize(cnkSize),
+  														kPGPMemoryMgrFlags_None));
+! 		if (encodedCNK == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		cnkSize = HexEncode(cnk, cnkSize, encodedCNK);
+***************
+*** 131,137 ****
+  						strlen(kCA) + digestSize + strlen(kCNK) + cnkSize
+  							+ strlen(kPKCS10_input) + GetMaxURLEncodedBufferSize(bufSize),
+  						kPGPMemoryMgrFlags_None));
+! 		if (post == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		};
+  		postSize = sprintf(post, "%s%s%s%s%s", kCA, static_cast<char *>(digest), kCNK,
+--- 131,137 ----
+  						strlen(kCA) + digestSize + strlen(kCNK) + cnkSize
+  							+ strlen(kPKCS10_input) + GetMaxURLEncodedBufferSize(bufSize),
+  						kPGPMemoryMgrFlags_None));
+! 		if (post == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		};
+  		postSize = sprintf(post, "%s%s%s%s%s", kCA, static_cast<char *>(digest), kCNK,
+***************
+*** 196,202 ****
+  		path = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													strlen(prefix) + strlen(query) + 1,
+  													kPGPMemoryMgrFlags_None));
+! 		if (path == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		sprintf(path, "%s%s", prefix, static_cast<char *>(query));
+--- 196,202 ----
+  		path = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													strlen(prefix) + strlen(query) + 1,
+  													kPGPMemoryMgrFlags_None));
+! 		if (path == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		sprintf(path, "%s%s", prefix, static_cast<char *>(query));
+***************
+*** 258,271 ****
+  		digest = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													GetMaxDigestedKeyBufferSize(),
+  													kPGPMemoryMgrFlags_None));
+! 		if (digest == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		};
+  		digestSize = DigestKey(inCAKey, digest);
+  		path = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													strlen(prefix) + digestSize + 1,
+  													kPGPMemoryMgrFlags_None));
+! 		if (path == 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		sprintf(path, "%s%s", prefix, static_cast<char *>(digest));
+--- 258,271 ----
+  		digest = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													GetMaxDigestedKeyBufferSize(),
+  													kPGPMemoryMgrFlags_None));
+! 		if (digest == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		};
+  		digestSize = DigestKey(inCAKey, digest);
+  		path = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  													strlen(prefix) + digestSize + 1,
+  													kPGPMemoryMgrFlags_None));
+! 		if (path == (StPGPDataRef) 0) {
+  			ThrowPGPError_(kPGPError_OutOfMemory);
+  		}
+  		sprintf(path, "%s%s", prefix, static_cast<char *>(digest));
+***************
+*** 323,329 ****
+  		PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  					GetMaxBase64EncodedBufferSize(bufSize),
+  					kPGPMemoryMgrFlags_None));
+! 	if (encodedBuffer == 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	bufSize = Base64Encode(	static_cast<const PGPByte *>(buffer),
+--- 323,329 ----
+  		PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  					GetMaxBase64EncodedBufferSize(bufSize),
+  					kPGPMemoryMgrFlags_None));
+! 	if (encodedBuffer == (StPGPDataRef) 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	bufSize = Base64Encode(	static_cast<const PGPByte *>(buffer),
+***************
+*** 351,357 ****
+  	buffer = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  												bufSize,
+  												kPGPMemoryMgrFlags_None));
+! 	if (buffer == 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	pgpErr = PGPFinalizeHash(hashContext, static_cast<char *>(buffer));
+--- 351,357 ----
+  	buffer = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  												bufSize,
+  												kPGPMemoryMgrFlags_None));
+! 	if (buffer == (StPGPDataRef) 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	pgpErr = PGPFinalizeHash(hashContext, static_cast<char *>(buffer));
+***************
+*** 400,406 ****
+  	result = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  												resultSize + 1,
+  												kPGPMemoryMgrFlags_None));
+! 	if (result == 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	pgpCopyMemory(inResult, static_cast<char *>(result), resultSize + 1);
+--- 400,406 ----
+  	result = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  												resultSize + 1,
+  												kPGPMemoryMgrFlags_None));
+! 	if (result == (StPGPDataRef) 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	pgpCopyMemory(inResult, static_cast<char *>(result), resultSize + 1);
+***************
+*** 426,432 ****
+  	decodedResult = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  														GetMaxBase64DecodedBufferSize(end - found),
+  														kPGPMemoryMgrFlags_None));
+! 	if (decodedResult == 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	
+--- 426,432 ----
+  	decodedResult = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  														GetMaxBase64DecodedBufferSize(end - found),
+  														kPGPMemoryMgrFlags_None));
+! 	if (decodedResult == (StPGPDataRef) 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	
+***************
+*** 470,476 ****
+  	result = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  												GetMaxBase64DecodedBufferSize(end - found),
+  												kPGPMemoryMgrFlags_None));
+! 	if (result == 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	
+--- 470,476 ----
+  	result = static_cast<PGPByte *>(PGPNewData(	PGPGetContextMemoryMgr(mContext),
+  												GetMaxBase64DecodedBufferSize(end - found),
+  												kPGPMemoryMgrFlags_None));
+! 	if (result == (StPGPDataRef) 0) {
+  		ThrowPGPError_(kPGPError_OutOfMemory);
+  	};
+  	
+*** libs/network/ldaplib/liblber/io.c	2000/01/26 03:10:31	1.1.1.1
+--- libs/network/ldaplib/liblber/io.c	2000/01/26 03:12:55	1.1.1.2
+***************
+*** 14,19 ****
+--- 14,23 ----
+  #include <stdio.h>
+  #include <ctype.h>
+  
++ #ifdef __FreeBSD__
++ #include <sys/time.h>
++ #endif
++ 
+  #if PGPSOCKETSLDAP		/* jason */
+  #include "pgpSocketsLDAP.h"
+  
+*** libs/network/ldaplib/include/ldap.h	2000/01/26 03:10:31	1.1.1.1
+--- libs/network/ldaplib/include/ldap.h	2000/01/26 03:12:53	1.1.1.2
+***************
+*** 90,95 ****
+--- 90,99 ----
+  #define GetThreadID		pthread_self
+  #endif
+  
++ #ifdef __FreeBSD__
++ #define GetThreadID		pthread_self
++ #endif
++ 
+  #if PGP_MACINTOSH
+  #define Debug( level, fmt, arg1, arg2, arg3 )	{}	/* Nothing */
+  #else
+--- libs/pgpcdk/priv/crypto/random/pgpRandomPool.c.orig	Fri Aug  6 13:56:49 1999
++++ libs/pgpcdk/priv/crypto/random/pgpRandomPool.c	Fri Sep 29 20:41:26 2000
+@@ -424,7 +424,7 @@
+  * #define UMULH_32(r,a,b) (r) = 0
+  */
+ #ifndef UMULH_32
+-#if defined(__GNUC__) && defined(__i386__)
++#if 0
+ /* Inline asm goodies */
+ #define UMULH_32(r,a,b) __asm__("mull %2" : "=d"(r) : "%a"(a), "mr"(b) : "ax")
+ #elif HAVE64
+--- libs/pgpcdk/unix/ui/PGPKeyServerDialogs.cpp.orig	Tue Mar  9 18:52:17 1999
++++ libs/pgpcdk/unix/ui/PGPKeyServerDialogs.cpp	Fri Sep 29 20:51:02 2000
+@@ -5,6 +5,7 @@
+ 	$Id: pgpsrc658unix.patch,v 1.2 2001/10/19 15:50:31 rse Exp $
+ ____________________________________________________________________________*/
+ #include <string.h>
++#include <stdlib.h>
+ 
+ #include "pgpDialogs.h"
+ #include "pgpKeyServerDialogCommon.h"
+--- libs/pfl/common/pgpDebug.c.orig	Wed Mar 10 03:49:24 1999
++++ libs/pfl/common/pgpDebug.c	Sun Aug 19 11:27:06 2001
+@@ -191,7 +191,7 @@
+ 					
+ 				case 'c':	/* Single character */
+ 				{
+-					char			ch = va_arg(args, char);
++					char			ch = va_arg(args, int);
+ 					
+ 					AppendChars(buffer, &bufferIndex, bufferSize,
+ 								canonicalizeNLs, &ch, 1);
+--- clients/pgp/cmdline/Makefile.in.orig	Fri Oct 19 14:53:23 2001
++++ clients/pgp/cmdline/Makefile.in	Fri Sep  1 23:11:16 2000
+@@ -50,7 +50,7 @@
+ 
+ LIBDIRS+=-L$(PFLDIR) -L$(SDKDIR)/unix -L$(RSALIBRARY)$(RSA_OS)
+ 
+-LIBS=-lPGPui -lPGPsdkNetwork -lPGPsdk -lpfl @THREADLIB@ $(RSALIBS) @LIBS@
++LIBS=-lPGPui -lPGPsdkNetwork -lPGPsdk -lPGPui -lpfl @THREADLIB@ $(RSALIBS) @LIBS@
+ 
+ SHAREDOBJS=$(SHAREDDIR)/pgpDiskWiper.o $(SHAREDDIR)/pgpClientErrors.o
+