diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/pgp6/Makefile | 9 | ||||
-rw-r--r-- | security/pgp6/files/patch-Make-platform | 10 | ||||
-rw-r--r-- | security/pgp6/files/patch-StPGPRefs.h | 63 | ||||
-rw-r--r-- | security/pgp6/files/patch-ag | 25 | ||||
-rw-r--r-- | security/pgp6/files/patch-ai | 39 | ||||
-rw-r--r-- | security/pgp6/files/patch-aj | 26 | ||||
-rw-r--r-- | security/pgp6/files/patch-ak | 70 | ||||
-rw-r--r-- | security/pgp6/files/patch-al | 31 | ||||
-rw-r--r-- | security/pgp6/files/patch-am | 36 | ||||
-rw-r--r-- | security/pgp6/files/patch-an | 220 | ||||
-rw-r--r-- | security/pgp6/files/patch-aq | 26 | ||||
-rw-r--r-- | security/pgp6/files/patch-ar | 13 | ||||
-rw-r--r-- | security/pgp6/files/patch-as | 10 | ||||
-rw-r--r-- | security/pgp6/files/patch-at | 18 | ||||
-rw-r--r-- | security/pgp6/files/patch-ca | 8 | ||||
-rw-r--r-- | security/pgp6/files/patch-cmdline%keygen.c | 6 | ||||
-rw-r--r-- | security/pgp6/files/patch-cmdline%keymaint.c | 11 | ||||
-rw-r--r-- | security/pgp6/files/patch-cmdline%prototypes.h | 20 | ||||
-rw-r--r-- | security/pgp6/files/patch-cmdline%stubs.c | 6 | ||||
-rw-r--r-- | security/pgp6/files/patch-ldaplib%Makefile | 17 |
20 files changed, 196 insertions, 468 deletions
diff --git a/security/pgp6/Makefile b/security/pgp6/Makefile index ee8d06e76cff..25e6cbbb1e48 100644 --- a/security/pgp6/Makefile +++ b/security/pgp6/Makefile @@ -37,10 +37,6 @@ LATEST_LINK= pgp6 BROKEN= Does not compile on !i386 .endif -.if ${OSVERSION} >= 700042 -BROKEN?= Does not compile with GCC 4.2 -.endif - # the distfile is actually a tar of three compressed tars and their # signatures post-extract: @@ -56,6 +52,11 @@ post-extract: .endif ${CP} ${FILESDIR}/build.Makefile ${WRKSRC}/Makefile +pre-patch: + ${REINPLACE_CMD} -e 's,-fwritable-strings,,' \ + ${WRKSRC}/libs/network/ldaplib/Make-common \ + ${WRKSRC}/libs/network/ldaplib/*/Makefile + do-install: cd ${WRKSRC}/clients/pgp/cmdline ; ${GMAKE} install ; \ ${INSTALL_MAN} packaging/pgp-6.0/man/man1/pgp.1 ${PREFIX}/man/man1 diff --git a/security/pgp6/files/patch-Make-platform b/security/pgp6/files/patch-Make-platform new file mode 100644 index 000000000000..c6c38d9ab812 --- /dev/null +++ b/security/pgp6/files/patch-Make-platform @@ -0,0 +1,10 @@ +--- libs/network/ldaplib/build/platforms/freebsd-gcc/Make-platform.orig 2008-08-31 01:19:49.000000000 -0700 ++++ libs/network/ldaplib/build/platforms/freebsd-gcc/Make-platform 2008-08-31 01:19:52.000000000 -0700 +@@ -11,6 +11,6 @@ + # ------------------------------------------------------------------------- + # you will probably not need to edit anything below this point + # ------------------------------------------------------------------------- +-CC = gcc ++#CC = gcc + + PLATFORMCFLAGS= -Dfreebsd diff --git a/security/pgp6/files/patch-StPGPRefs.h b/security/pgp6/files/patch-StPGPRefs.h new file mode 100644 index 000000000000..584f36efba02 --- /dev/null +++ b/security/pgp6/files/patch-StPGPRefs.h @@ -0,0 +1,63 @@ +--- libs/pfl/common/classes/StPGPRefs.h.orig 1999-08-05 01:22:16.000000000 -0700 ++++ libs/pfl/common/classes/StPGPRefs.h 2008-08-31 01:11:35.000000000 -0700 +@@ -64,27 +64,27 @@ protected: + + #ifdef Included_pgpKeys_h + typedef StPGPRef<PGPKeySetRef> StPGPKeySetRef; +- inline void StPGPKeySetRef::Dispose() { PGPFreeKeySet(mRef); } ++ template <> inline void StPGPKeySetRef::Dispose() { PGPFreeKeySet(mRef); } + + typedef StPGPRef<PGPKeyListRef> StPGPKeyListRef; +- inline void StPGPKeyListRef::Dispose() { PGPFreeKeyList(mRef); } ++ template <> inline void StPGPKeyListRef::Dispose() { PGPFreeKeyList(mRef); } + + typedef StPGPRef<PGPKeyIterRef> StPGPKeyIterRef; +- inline void StPGPKeyIterRef::Dispose() { PGPFreeKeyIter(mRef); } ++ template <> inline void StPGPKeyIterRef::Dispose() { PGPFreeKeyIter(mRef); } + #endif + + #ifdef Included_pgpHashing_h + typedef StPGPRef<PGPHashContextRef> StPGPHashContextRef; +- inline void StPGPHashContextRef::Dispose() { PGPFreeHashContext(mRef); } ++ template <> inline void StPGPHashContextRef::Dispose() { PGPFreeHashContext(mRef); } + #endif + + #ifdef Included_PGPtls_h + typedef StPGPRef<PGPtlsSessionRef> StPGPtlsSessionRef; +- inline void StPGPtlsSessionRef::Dispose() { PGPFreeTLSSession(mRef); } ++ template <> inline void StPGPtlsSessionRef::Dispose() { PGPFreeTLSSession(mRef); } + #endif + + #ifdef Included_pgpMemoryMgr_h +- inline void StPGPRef<PGPByte *>::Dispose() { PGPFreeData(mRef); } ++ template <> inline void StPGPRef<PGPByte *>::Dispose() { PGPFreeData(mRef); } + class StPGPDataRef : public StPGPRef<PGPByte *> { + public: + StPGPDataRef() { } +@@ -104,22 +104,22 @@ protected: + }; + + typedef StPGPRef<PGPMemoryMgrRef> StPGPMemoryMgrRef; +- inline void StPGPMemoryMgrRef::Dispose() { PGPFreeMemoryMgr(mRef); } ++ template <> inline void StPGPMemoryMgrRef::Dispose() { PGPFreeMemoryMgr(mRef); } + #endif + + #ifdef Included_pgpSockets_h + typedef StPGPRef<PGPSocketRef> StPGPSocketRef; +- inline void StPGPSocketRef::Dispose() { PGPCloseSocket(mRef); } ++ template <> inline void StPGPSocketRef::Dispose() { PGPCloseSocket(mRef); } + #endif + + #ifdef Included_pflPrefs_h + typedef StPGPRef<PGPPrefRef> StPGPPrefRef; +- inline void StPGPPrefRef::Dispose() { PGPClosePrefFile(mRef); } ++ template <> inline void StPGPPrefRef::Dispose() { PGPClosePrefFile(mRef); } + #endif + + #ifdef Included_pgpIO_h + typedef StPGPRef<PGPIORef> StPGPIORef; +- inline void StPGPIORef::Dispose() { PGPFreeIO(mRef); } ++ template <> inline void StPGPIORef::Dispose() { PGPFreeIO(mRef); } + #endif + + #undef STATIC_CAST diff --git a/security/pgp6/files/patch-ag b/security/pgp6/files/patch-ag deleted file mode 100644 index 8b0d8cdf1d95..000000000000 --- a/security/pgp6/files/patch-ag +++ /dev/null @@ -1,25 +0,0 @@ -*** 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 - /* diff --git a/security/pgp6/files/patch-ai b/security/pgp6/files/patch-ai index 6e06b0d6a4c0..e629d4c25567 100644 --- a/security/pgp6/files/patch-ai +++ b/security/pgp6/files/patch-ai @@ -1,25 +1,14 @@ -*** 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/priv/crypto/bignum/bni80386_aout.s.orig 1998-07-31 15:03:37.000000000 -0700 ++++ libs/pgpcdk/priv/crypto/bignum/bni80386_aout.s 2008-08-31 16:41:34.000000000 -0700 +@@ -17,7 +17,8 @@ + # 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 ++# 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 + + diff --git a/security/pgp6/files/patch-aj b/security/pgp6/files/patch-aj index 60ebe9025049..2e5852c1065b 100644 --- a/security/pgp6/files/patch-aj +++ b/security/pgp6/files/patch-aj @@ -1,15 +1,11 @@ -*** 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/pub/include/pgpSockets.h.orig 1999-08-04 11:36:04.000000000 -0700 ++++ libs/pgpcdk/pub/include/pgpSockets.h 2008-08-31 00:37:11.000000000 -0700 +@@ -20,7 +20,7 @@ ________________________________________ + #if PGP_UNIX + # include <sys/types.h> + # include <sys/socket.h> +-#if PGP_UNIX_LINUX ++#if PGP_UNIX_LINUX || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + # include <sys/time.h> /* Needed for unknown reason */ + # include <sys/ioctl.h> /* Need FIONREAD */ + #elif PGP_UNIX_SOLARIS diff --git a/security/pgp6/files/patch-ak b/security/pgp6/files/patch-ak deleted file mode 100644 index bb074fa23891..000000000000 --- a/security/pgp6/files/patch-ak +++ /dev/null @@ -1,70 +0,0 @@ -*** 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); diff --git a/security/pgp6/files/patch-al b/security/pgp6/files/patch-al deleted file mode 100644 index 2f61c8720fbd..000000000000 --- a/security/pgp6/files/patch-al +++ /dev/null @@ -1,31 +0,0 @@ -*** 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, diff --git a/security/pgp6/files/patch-am b/security/pgp6/files/patch-am deleted file mode 100644 index b3303052c11b..000000000000 --- a/security/pgp6/files/patch-am +++ /dev/null @@ -1,36 +0,0 @@ -*** 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); diff --git a/security/pgp6/files/patch-an b/security/pgp6/files/patch-an deleted file mode 100644 index 3b149f2b1917..000000000000 --- a/security/pgp6/files/patch-an +++ /dev/null @@ -1,220 +0,0 @@ -*** 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); - }; - diff --git a/security/pgp6/files/patch-aq b/security/pgp6/files/patch-aq index 693baa04b11c..ab27c1c51609 100644 --- a/security/pgp6/files/patch-aq +++ b/security/pgp6/files/patch-aq @@ -1,15 +1,11 @@ -*** 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/network/ldaplib/include/ldap.h.orig 1999-08-04 11:35:42.000000000 -0700 ++++ libs/network/ldaplib/include/ldap.h 2008-08-31 00:47:21.000000000 -0700 +@@ -86,7 +86,7 @@ extern __declspec(dllimport) unsigned lo + #define GetThreadID GetCurrentThreadId + #elif PGP_UNIX_SOLARIS + #define GetThreadID thr_self +-#elif PGP_UNIX_LINUX || PGP_UNIX_AIX || PGP_UNIX_HPUX ++#elif PGP_UNIX_LINUX || PGP_UNIX_AIX || PGP_UNIX_HPUX || defined(__FreeBSD__) + /* This is for all pthreads systems, including Linux and AIX. */ + #define GetThreadID pthread_self + #endif diff --git a/security/pgp6/files/patch-ar b/security/pgp6/files/patch-ar index 19ef42b122ae..b2e0c43ee0c2 100644 --- a/security/pgp6/files/patch-ar +++ b/security/pgp6/files/patch-ar @@ -1,14 +1,11 @@ ---- libs/pfl/common/lthread/pgpThreads.h.orig Mon Apr 19 10:59:53 1999 -+++ libs/pfl/common/lthread/pgpThreads.h Thu Jan 22 12:34:15 2004 -@@ -138,7 +138,9 @@ +--- libs/pfl/common/lthread/pgpThreads.h.orig 1999-04-19 10:59:53.000000000 -0700 ++++ libs/pfl/common/lthread/pgpThreads.h 2008-08-31 17:22:17.000000000 -0700 +@@ -138,7 +138,7 @@ typedef pthread_key_t PGPThreadKey_t; #endif /* end HAVE_PTHREAD_ATTR_CREATE */ /* My version of Linux has sem_init in pthreads.so, but *zero* headers ?? */ -#if HAVE_SEM_INIT && !PGP_UNIX_LINUX -+/* #if HAVE_SEM_INIT && !PGP_UNIX_LINUX -+ commented out for FreeBSD */ -+#if 0 ++#if HAVE_SEM_INIT && !PGP_UNIX_LINUX && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) - #undef HAVE_SEMGET /* prefer POSIX sem_init over semget */ + #undef HAVE_SEMGET /* prefer POSIX sem_init over semget */ #define HAVE_SEMGET 0 - diff --git a/security/pgp6/files/patch-as b/security/pgp6/files/patch-as index 4463f446b4bf..f78f4fc4b91f 100644 --- a/security/pgp6/files/patch-as +++ b/security/pgp6/files/patch-as @@ -1,13 +1,11 @@ ---- libs/pfl/common/lthread/pgpSemaphore.c.old Tue Mar 17 21:08:17 1998 -+++ libs/pfl/common/lthread/pgpSemaphore.c Thu Jan 22 13:00:16 2004 -@@ -41,7 +41,9 @@ +--- libs/pfl/common/lthread/pgpSemaphore.c.orig 1998-03-17 21:08:17.000000000 -0800 ++++ libs/pfl/common/lthread/pgpSemaphore.c 2008-09-01 10:01:39.000000000 -0700 +@@ -41,7 +41,7 @@ int PGPSemDestroy(PGPSem_t *sem) #endif /* end PGP_UNIX_SOLARIS */ /* Linux has sem_init function but no headers ?? */ -#if HAVE_SEM_INIT && !PGP_UNIX_LINUX -+/* #if HAVE_SEM_INIT && !PGP_UNIX_LINUX -+ commented out for FreeBSD */ -+#if 0 ++#if HAVE_SEM_INIT && !PGP_UNIX_LINUX && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) PGPSemAttr_t PGPSemAttr_def = {0, 0}; diff --git a/security/pgp6/files/patch-at b/security/pgp6/files/patch-at index 3d3129218f0e..7d549aa4fd72 100644 --- a/security/pgp6/files/patch-at +++ b/security/pgp6/files/patch-at @@ -1,11 +1,11 @@ ---- libs/pgpcdk/priv/networklib/pgpsockets/common/pgpSockets.c.orig Fri Jan 23 19:46:45 2004 -+++ libs/pgpcdk/priv/networklib/pgpsockets/common/pgpSockets.c Fri Jan 23 19:47:10 2004 -@@ -41,8 +41,6 @@ +--- libs/pgpcdk/priv/networklib/pgpsockets/common/pgpSockets.c.orig 1999-08-04 11:36:04.000000000 -0700 ++++ libs/pgpcdk/priv/networklib/pgpsockets/common/pgpSockets.c 2008-08-31 00:40:02.000000000 -0700 +@@ -39,7 +39,7 @@ ________________________________________ + # define closesocket(x) close((x)) + # define ioctlsocket(a,b,c) ioctl((a),(b),(c)) typedef int SOCKET; - #if PGP_UNIX_LINUX || PGP_UNIX_HPUX || PGP_UNIX_AIX +-#if PGP_UNIX_LINUX || PGP_UNIX_HPUX || PGP_UNIX_AIX ++#if PGP_UNIX_LINUX || PGP_UNIX_HPUX || PGP_UNIX_AIX || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) int gethostname (char * name, size_t namelen); --#else --int gethostname (char * name, int namelen); - #endif /* PGP_UNIX_LINUX */ - #endif - + #else + int gethostname (char * name, int namelen); diff --git a/security/pgp6/files/patch-ca b/security/pgp6/files/patch-ca index dbe85cd88e33..00b223975287 100644 --- a/security/pgp6/files/patch-ca +++ b/security/pgp6/files/patch-ca @@ -1,11 +1,11 @@ ---- 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 @@ +--- libs/pgpcdk/priv/crypto/random/pgpRandomPool.c.orig 1999-08-06 13:56:49.000000000 -0700 ++++ libs/pgpcdk/priv/crypto/random/pgpRandomPool.c 2008-09-01 10:07:20.000000000 -0700 +@@ -424,7 +424,7 @@ pgpInitGlobalRandomPoolContext( PGPRando * #define UMULH_32(r,a,b) (r) = 0 */ #ifndef UMULH_32 -#if defined(__GNUC__) && defined(__i386__) -+#if 0 ++#if defined(__GNUC__) && defined(__i386__) && 0 /* Inline asm goodies */ #define UMULH_32(r,a,b) __asm__("mull %2" : "=d"(r) : "%a"(a), "mr"(b) : "ax") #elif HAVE64 diff --git a/security/pgp6/files/patch-cmdline%keygen.c b/security/pgp6/files/patch-cmdline%keygen.c new file mode 100644 index 000000000000..21c1217fda04 --- /dev/null +++ b/security/pgp6/files/patch-cmdline%keygen.c @@ -0,0 +1,6 @@ +--- clients/pgp/cmdline/keygen.c.orig 1999-09-30 17:10:21.000000000 -0700 ++++ clients/pgp/cmdline/keygen.c 2008-08-31 01:51:34.000000000 -0700 +@@ -14,2 +14,3 @@ ________________________________________ + #include <stdio.h> ++#include <string.h> + diff --git a/security/pgp6/files/patch-cmdline%keymaint.c b/security/pgp6/files/patch-cmdline%keymaint.c new file mode 100644 index 000000000000..8acf0a252d9b --- /dev/null +++ b/security/pgp6/files/patch-cmdline%keymaint.c @@ -0,0 +1,11 @@ +--- clients/pgp/cmdline/keymaint.c.orig 1999-05-12 14:01:04.000000000 -0700 ++++ clients/pgp/cmdline/keymaint.c 2008-08-31 01:36:27.000000000 -0700 +@@ -264,7 +264,7 @@ PGPError markSignatureChainDepths(struct + pgpAssertNoErr(err); + + if ( (PGPUInt32)traceValue == 0) { +- (PGPUInt32)traceValue = depth; ++ traceValue = depth; + + err = PGPSetKeyUserVal( key, traceValue); + pgpAssertNoErr(err); diff --git a/security/pgp6/files/patch-cmdline%prototypes.h b/security/pgp6/files/patch-cmdline%prototypes.h new file mode 100644 index 000000000000..e0e37c0c732f --- /dev/null +++ b/security/pgp6/files/patch-cmdline%prototypes.h @@ -0,0 +1,20 @@ +--- clients/pgp/cmdline/prototypes.h.orig 1999-11-08 16:56:31.000000000 -0800 ++++ clients/pgp/cmdline/prototypes.h 2008-08-31 01:49:53.000000000 -0700 +@@ -307,7 +307,6 @@ int get_CONVERSION( ); + + int maintCheck( PGPFileSpecRef ringfilespec, int options ); + struct newkey; +-int maintUpdate( PGPFileSpecRef ringfilespec, struct newkey const *nkeys ); + void init_charset( void ); + void CONVERT_TO_CANONICAL_CHARSET( char *s ); + char EXT_C( char c ); +@@ -317,9 +316,6 @@ struct IdeaCfbContext; + int cryptRandOpen( struct IdeaCfbContext *cfb ); + void cryptRandSave( struct IdeaCfbContext *cfb ); + +-int cryptRandWriteFile( char const *name, struct IdeaCfbContext *cfb, +- unsigned bytes ); +- + char * get_ext_c_ptr( void ); + + /* see libPGPui.a */ diff --git a/security/pgp6/files/patch-cmdline%stubs.c b/security/pgp6/files/patch-cmdline%stubs.c new file mode 100644 index 000000000000..93b3d904c600 --- /dev/null +++ b/security/pgp6/files/patch-cmdline%stubs.c @@ -0,0 +1,6 @@ +--- clients/pgp/cmdline/stubs.c.orig 2008-08-31 01:34:02.000000000 -0700 ++++ clients/pgp/cmdline/stubs.c 2008-08-31 01:34:26.000000000 -0700 +@@ -0,0 +1 @@ ++#if 0 +@@ -49,0 +51 @@ int maintUpdate(PGPFileSpecRef ringfiles ++#endif diff --git a/security/pgp6/files/patch-ldaplib%Makefile b/security/pgp6/files/patch-ldaplib%Makefile new file mode 100644 index 000000000000..15c7cd2f412a --- /dev/null +++ b/security/pgp6/files/patch-ldaplib%Makefile @@ -0,0 +1,17 @@ +--- libs/network/ldaplib/Makefile.orig 1999-08-04 11:35:42.000000000 -0700 ++++ libs/network/ldaplib/Makefile 2008-08-31 01:17:43.000000000 -0700 +@@ -237,14 +237,6 @@ makeconfig: .makefiles buildtools + CC=$(CC); \ + OLDIFS="$$IFS"; \ + IFS=":"; \ +-if test -n "$CC"; then \ +- for dir in $$PATH; do \ +- if [ -f $$dir/gcc ]; then \ +- CC=gcc; \ +- break; \ +- fi; \ +- done; \ +-fi; \ + IFS="$$OLDIFS"; \ + $(LN) ./build/platforms/$$PLATFORM-$$CC/Make-platform .make-platform; \ + echo ""; \ |