diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2004-07-11 08:38:31 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2004-07-11 08:38:31 +0000 |
commit | d0b2e40d6bd31022a69caf1b768f63c68e5c5064 (patch) | |
tree | 75e66fcaa6769a2347acbb767e3b93fe949c5fa2 /devel/tcl-trf | |
parent | 1bbbed848840bffe0a9122031c324e50a414469b (diff) | |
download | ports-d0b2e40d6bd31022a69caf1b768f63c68e5c5064.tar.gz ports-d0b2e40d6bd31022a69caf1b768f63c68e5c5064.zip |
Notes
Diffstat (limited to 'devel/tcl-trf')
-rw-r--r-- | devel/tcl-trf/Makefile | 21 | ||||
-rw-r--r-- | devel/tcl-trf/files/patch-crypt | 5 | ||||
-rw-r--r-- | devel/tcl-trf/files/patch-loadman | 13 | ||||
-rw-r--r-- | devel/tcl-trf/files/patch-md2 | 39 | ||||
-rw-r--r-- | devel/tcl-trf/files/patch-md5dig | 36 | ||||
-rw-r--r-- | devel/tcl-trf/files/patch-mkin | 28 | ||||
-rw-r--r-- | devel/tcl-trf/files/patch-rmd160 | 242 | ||||
-rw-r--r-- | devel/tcl-trf/files/patch-sha | 39 | ||||
-rw-r--r-- | devel/tcl-trf/files/patch-sha1 | 23 | ||||
-rw-r--r-- | devel/tcl-trf/files/patch-zlib | 42 |
10 files changed, 346 insertions, 142 deletions
diff --git a/devel/tcl-trf/Makefile b/devel/tcl-trf/Makefile index 723a3c62e4ef..f2250baec8cd 100644 --- a/devel/tcl-trf/Makefile +++ b/devel/tcl-trf/Makefile @@ -7,7 +7,7 @@ PORTNAME= Trf PORTVERSION= 2.1p2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel tcl${TCL_VER:S/.//} MASTER_SITES= http://www.oche.de/~akupries/soft/trf/download/ PKGNAMEPREFIX= tcl- @@ -51,6 +51,25 @@ post-patch: # Make direct calls to -lz ${REINPLACE_CMD} -E 's,zf\.([^(]+),\1,g' ${WRKSRC}/generic/adler.c \ ${WRKSRC}/generic/crc_zlib.c ${WRKSRC}/generic/zip.c + # Don't re-invent the dynamic linker: + ${REINPLACE_CMD} 's,"loadman\.h","transformInt.h",' ${WRKSRC}/generic/*.c +.ifdef TRF_USE_MD + # + # Using FreeBSD's own -lmd instead of OpenSSL's -lcrypto + # + ${REINPLACE_CMD} -E -e 's,openssl/,,' \ + -e 's,(MD[25])_([A-Z][a-z]),\1\2,g' \ + ${WRKSRC}/generic/*.[ch] + ${REINPLACE_CMD} 's,-lcrypto,-lmd,' ${WRKSRC}/Makefile.in +.else + # + # Using OpenSSL's impelemtations of for message digests (-lcrypto) + # To use FreeBSD's own -lmd, stop now and restart make with: + # + # -DTRF_USE_MD + # +USE_OPENSSL= yes +.endif post-install: ${LN} -sf ${SHLIB_NAME} ${PREFIX}/lib/${SHLIB_LINK} diff --git a/devel/tcl-trf/files/patch-crypt b/devel/tcl-trf/files/patch-crypt index 2e88d7558620..c611354e8fe9 100644 --- a/devel/tcl-trf/files/patch-crypt +++ b/devel/tcl-trf/files/patch-crypt @@ -1,9 +1,10 @@ --- generic/crypt.c Sat Nov 18 17:42:31 2000 +++ generic/crypt.c Fri Feb 8 11:59:47 2002 -@@ -29,4 +29,5 @@ +@@ -29,4 +29,6 @@ - #include "loadman.h" ++#include <sys/types.h> +#include <unistd.h> + #include "loadman.h" static int @@ -112,4 +112,6 @@ diff --git a/devel/tcl-trf/files/patch-loadman b/devel/tcl-trf/files/patch-loadman index 952de7cb2587..a963d3188193 100644 --- a/devel/tcl-trf/files/patch-loadman +++ b/devel/tcl-trf/files/patch-loadman @@ -1,24 +1,16 @@ -Use FreeBSD's native md2 and sha implementations instead of those from -the OpenSSL library. - - -mi - --- generic/loadman.h Fri Feb 15 14:49:06 2002 +++ generic/loadman.h Fri Feb 15 14:50:48 2002 -@@ -48,9 +48,7 @@ +@@ -48,9 +48,4 @@ -+#include <sys/types.h> -+ #ifdef HAVE_MD2_H -# ifdef OPENSSL_SUB -# include <openssl/md2.h> -# else -# include <md2.h> -# endif -+# include <md2.h> #else # include "../compat/md2.h" -@@ -58,9 +54,5 @@ +@@ -58,9 +54,4 @@ #ifdef HAVE_SHA_H -# ifdef OPENSSL_SUB @@ -26,6 +18,5 @@ the OpenSSL library. -# else -# include <sha.h> -# endif -+# include <sha.h> #else # include "../compat/sha.h" diff --git a/devel/tcl-trf/files/patch-md2 b/devel/tcl-trf/files/patch-md2 index de2cfe050979..e9702c18fba9 100644 --- a/devel/tcl-trf/files/patch-md2 +++ b/devel/tcl-trf/files/patch-md2 @@ -1,23 +1,20 @@ --- generic/md2.c Wed Aug 9 15:13:17 2000 -+++ generic/md2.c Fri Jul 9 16:36:33 2004 -@@ -30,13 +30,8 @@ - #include "loadman.h" ++++ generic/md2.c Sat Jul 10 17:43:07 2004 +@@ -28,4 +28,6 @@ + */ --/* -- * Generator description -- * --------------------- -- * -- * The MD2 alogrithm is used to compute a cryptographically strong -- * message digest. -- */ +#include <sys/types.h> -+#include <md2.h> ++#include <openssl/md2.h> + #include "loadman.h" + +@@ -38,5 +40,5 @@ + */ -#define DIGEST_SIZE (MD2_DIGEST_LENGTH) -+#define DIGEST_SIZE 16 ++#define DIGEST_SIZE (16) #define CTX_TYPE MD2_CTX -@@ -45,9 +40,6 @@ +@@ -45,9 +47,6 @@ */ -static void MDmd2_Start _ANSI_ARGS_ ((VOID* context)); @@ -27,20 +24,20 @@ -static int MDmd2_Check _ANSI_ARGS_ ((Tcl_Interp* interp)); /* -@@ -59,9 +51,9 @@ +@@ -59,9 +58,9 @@ sizeof (CTX_TYPE), DIGEST_SIZE, - MDmd2_Start, -+ (Trf_MDStart *)MD2Init, ++ (Trf_MDStart *)MD2_Init, MDmd2_Update, - MDmd2_UpdateBuf, -+ (Trf_MDUpdateBuf *)MD2Update, ++ (Trf_MDUpdateBuf *)MD2_Update, MDmd2_Final, - MDmd2_Check + NULL }; -@@ -94,30 +86,4 @@ +@@ -94,30 +93,4 @@ *------------------------------------------------------* * - * MDmd2_Start -- @@ -71,7 +68,7 @@ - * * MDmd2_Update -- * -@@ -143,33 +109,5 @@ +@@ -143,33 +116,5 @@ unsigned char buf = character; - md2f.update ((MD2_CTX*) context, &buf, 1); @@ -103,10 +100,10 @@ -int bufLen; -{ - md2f.update ((MD2_CTX*) context, (unsigned char*) buffer, bufLen); -+ MD2Update ((MD2_CTX*) context, &buf, 1); ++ MD2_Update ((MD2_CTX*) context, &buf, 1); } -@@ -198,31 +136,4 @@ +@@ -198,31 +143,4 @@ VOID* digest; { - md2f.final ((unsigned char*) digest, (MD2_CTX*) context); @@ -137,5 +134,5 @@ -Tcl_Interp* interp; -{ - return TrfLoadMD2 (interp); -+ MD2Final ((unsigned char*) digest, (MD2_CTX*) context); ++ MD2_Final ((unsigned char*) digest, (MD2_CTX*) context); } diff --git a/devel/tcl-trf/files/patch-md5dig b/devel/tcl-trf/files/patch-md5dig index c109baf03466..a0755602ef44 100644 --- a/devel/tcl-trf/files/patch-md5dig +++ b/devel/tcl-trf/files/patch-md5dig @@ -1,13 +1,13 @@ --- generic/md5dig.c Wed Aug 9 15:13:17 2000 -+++ generic/md5dig.c Fri Jul 9 16:23:11 2004 -@@ -29,5 +29,5 @@ - ++++ generic/md5dig.c Sat Jul 10 16:40:44 2004 +@@ -30,4 +30,6 @@ #include "loadman.h" -- -+#include <md5.h> + ++#include <sys/types.h> ++#include <openssl/md5.h> /* * Generator description -@@ -38,7 +38,4 @@ +@@ -38,7 +39,4 @@ */ -#define MD5_CTX struct md5_ctx @@ -15,7 +15,7 @@ - #ifndef OTP #define DIGEST_SIZE (16) -@@ -52,10 +49,6 @@ +@@ -52,10 +50,6 @@ */ -static void MDmd5_Start _ANSI_ARGS_ ((VOID* context)); @@ -26,20 +26,20 @@ -static int MDmd5_Check _ANSI_ARGS_ ((Tcl_Interp* interp)); /* -@@ -72,9 +65,9 @@ +@@ -72,9 +66,9 @@ sizeof (CTX_TYPE), DIGEST_SIZE, - MDmd5_Start, -+ (Trf_MDStart *)MD5Init, ++ (Trf_MDStart *)MD5_Init, MDmd5_Update, - MDmd5_UpdateBuf, -+ (Trf_MDUpdateBuf *)MD5Update, ++ (Trf_MDUpdateBuf *)MD5_Update, MDmd5_Final, - MDmd5_Check + NULL, }; -@@ -111,38 +104,4 @@ +@@ -111,38 +105,4 @@ *------------------------------------------------------* * - * MDmd5_Start -- @@ -78,7 +78,7 @@ - * * MDmd5_Update -- * -@@ -168,52 +127,5 @@ +@@ -168,52 +128,5 @@ unsigned char buf = character; - /* MD5Update ((MD5_CTX*) context, &buf, 1); */ @@ -129,25 +129,25 @@ - PRINT ("Upd2 ABCD = %d %d %d %d\n", c->A, c->B, c->C, c->D); FL; - } -#endif -+ MD5Update ((MD5_CTX*) context, &buf, 1); ++ MD5_Update ((MD5_CTX*) context, &buf, 1); } -@@ -243,6 +155,5 @@ +@@ -243,6 +156,5 @@ { #ifndef OTP - /* MD5Final ((unsigned char*) digest, (MD5_CTX*) context); */ - md5f.final (MD5_CTXP context, (unsigned char*) digest); -+ MD5Final ((unsigned char*) digest, (MD5_CTX*) context); ++ MD5_Final ((unsigned char*) digest, (MD5_CTX*) context); #else int i; -@@ -250,5 +161,5 @@ +@@ -250,5 +162,5 @@ /* MD5Final ((unsigned char*) result, (MD5_CTX*) context);*/ - md5f.final (MD5_CTXP context, (unsigned char*) result); -+ MD5Final ((unsigned char*) result, (MD5_CTX*) context); ++ MD5_Final ((unsigned char*) result, (MD5_CTX*) context); for (i = 0; i < 8; i++) -@@ -265,54 +176,2 @@ +@@ -265,54 +177,2 @@ #endif } - diff --git a/devel/tcl-trf/files/patch-mkin b/devel/tcl-trf/files/patch-mkin index e0a0b9c3a187..9b2255fb1042 100644 --- a/devel/tcl-trf/files/patch-mkin +++ b/devel/tcl-trf/files/patch-mkin @@ -1,5 +1,5 @@ --- Makefile.in Tue Aug 21 01:52:21 2001 -+++ Makefile.in Fri Jul 9 18:59:24 2004 ++++ Makefile.in Sat Jul 10 17:51:42 2004 @@ -34,5 +34,5 @@ #======================================================================== @@ -7,13 +7,19 @@ +lib_BINARIES = $(Trf_LIB_FILE) $(Trf_STUB_LIB_FILE) BINARIES = $(lib_BINARIES) -@@ -82,4 +82,5 @@ +@@ -50,5 +50,4 @@ + TRF_BASE_SRC = $(TRF_GENSRCDIR)/zlib.c \ + $(TRF_GENSRCDIR)/bz2lib.c \ +- $(TRF_GENSRCDIR)/loadman.c \ + $(TRF_GENSRCDIR)/init.c \ + $(TRF_GENSRCDIR)/registry.c \ +@@ -82,4 +81,5 @@ $(TRF_GENSRCDIR)/md5dig.c \ $(TRF_GENSRCDIR)/haval.c \ + $(TRF_GENSRCDIR)/haval.1996/haval.c \ $(TRF_GENSRCDIR)/sha.c \ $(TRF_GENSRCDIR)/adler.c \ -@@ -123,7 +124,5 @@ +@@ -123,7 +123,5 @@ $(TRF_COMPRESS_OBJ) -TRF_BASE_OBJ = @DL_OBJS@ bz2lib.$(OBJEXT) \ @@ -22,48 +28,48 @@ +TRF_BASE_OBJ = @DL_OBJS@ \ init.$(OBJEXT) \ registry.$(OBJEXT) \ -@@ -157,4 +156,5 @@ +@@ -157,4 +155,5 @@ md5dig.$(OBJEXT) \ haval.$(OBJEXT) \ + haval-1996.$(OBJEXT) \ sha.$(OBJEXT) \ adler.$(OBJEXT) \ -@@ -191,5 +191,5 @@ +@@ -191,5 +190,5 @@ #======================================================================== -Trf_LIB_FILE = @Trf_LIB_FILE@ +Trf_LIB_FILE = libTrf2.so.1 $(Trf_LIB_FILE)_OBJECTS = $(Trf_OBJECTS) -@@ -299,10 +299,10 @@ +@@ -299,10 +298,10 @@ RANLIB = @RANLIB@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ -SHLIB_LD = @SHLIB_LD@ +SHLIB_LD = $(CC) -shared SHLIB_LDFLAGS = @SHLIB_LDFLAGS@ -SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ -+SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ -lmd -lbz2 -lz ++SHLIB_LD_LIBS = -lcrypto -lbz2 -lz @SHLIB_LD_LIBS@ STLIB_LD = @STLIB_LD@ TCL_BIN_DIR = @TCL_BIN_DIR@ -TCL_DEFS = @TCL_DEFS@ +TCL_DEFS = @TCL_DEFS@ -DHAVE_BZLIB_H TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@ TCL_LD_FLAGS = @TCL_LD_FLAGS@ -@@ -346,5 +346,5 @@ +@@ -346,5 +345,5 @@ LIBS = @LIBS@ AR = ar -CFLAGS = @CFLAGS@ +CFLAGS += @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -431,5 +431,5 @@ +@@ -431,5 +430,5 @@ check: test -test: +test: $(Trf_LIB_FILE) LD_LIBRARY_PATH="$(srcdir):../tea/:$(ZLIB_LIB_DIR):$(SSL_LIB_DIR)"; \ export LD_LIBRARY_PATH; \ -@@ -612,4 +612,7 @@ +@@ -612,4 +611,7 @@ $(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/haval.c` -o $@ +haval-1996.o: $(TRF_GENSRCDIR)/haval.1996/haval.c @@ -71,7 +77,7 @@ + sha.$(OBJEXT): $(TRF_GENSRCDIR)/sha.c $(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/sha.c` -o $@ -@@ -755,5 +758,5 @@ +@@ -755,5 +757,5 @@ done if test "x$(MAKE_LIB)" = "x$(MAKE_SHARED_LIB)"; then \ - $(TCLSH_PROG) mkIndex.tcl $(lib_BINARIES); \ diff --git a/devel/tcl-trf/files/patch-rmd160 b/devel/tcl-trf/files/patch-rmd160 new file mode 100644 index 000000000000..b4c1bcc92b14 --- /dev/null +++ b/devel/tcl-trf/files/patch-rmd160 @@ -0,0 +1,242 @@ +--- generic/rmd160.c Wed Aug 9 15:13:18 2000 ++++ generic/rmd160.c Sat Jul 10 17:17:57 2004 +@@ -29,5 +29,5 @@ + + #include "transformInt.h" +-#include "ripemd/rmd160.h" ++#include <openssl/ripemd.h> + + /* +@@ -40,16 +40,4 @@ + + #define DIGEST_SIZE (20) +-/*#define CTX_TYPE */ +-#define CONTEXT_SIZE (20) +-#define CHUNK_SIZE (64) +- +-typedef struct ripemd_context { +- dword state [5]; /* state variables of ripemd-160 */ +- byte buf [CHUNK_SIZE]; /* buffer of 15-dword's */ +- byte byteCount; /* number of bytes in buffer */ +- dword lowc; /* lower half of a 64bit counter */ +- dword highc; /* upper half of a 64bit counter */ +-} ripemd_context; +- + + /* +@@ -57,10 +45,6 @@ + */ + +-static void MDrmd160_Start _ANSI_ARGS_ ((VOID* context)); + static void MDrmd160_Update _ANSI_ARGS_ ((VOID* context, unsigned int character)); +-static void MDrmd160_UpdateBuf _ANSI_ARGS_ ((VOID* context, unsigned char* buffer, int bufLen)); + static void MDrmd160_Final _ANSI_ARGS_ ((VOID* context, VOID* digest)); +-static void CountLength _ANSI_ARGS_ ((ripemd_context* ctx, +- unsigned int nbytes)); + + /* +@@ -70,9 +54,9 @@ + static Trf_MessageDigestDescription mdDescription = { /* THREADING: constant, read-only => safe */ + "ripemd160", +- sizeof (ripemd_context), ++ sizeof (RIPEMD160_CTX), + DIGEST_SIZE, +- MDrmd160_Start, ++ (Trf_MDStart *)RIPEMD160_Init, + MDrmd160_Update, +- MDrmd160_UpdateBuf, ++ (Trf_MDUpdateBuf *)RIPEMD160_Update, + MDrmd160_Final, + NULL +@@ -107,37 +91,4 @@ + *------------------------------------------------------* + * +- * MDrmd160_Start -- +- * +- * ------------------------------------------------* +- * Initialize the internal state of the message +- * digest generator. +- * ------------------------------------------------* +- * +- * Sideeffects: +- * As of the called procedure. +- * +- * Result: +- * None. +- * +- *------------------------------------------------------* +- */ +- +-static void +-MDrmd160_Start (context) +-VOID* context; +-{ +- ripemd_context* ctx = (ripemd_context*) context; +- +- ripemd160_MDinit (ctx->state); +- memset (ctx->buf, '\0', CHUNK_SIZE); +- +- ctx->byteCount = 0; +- ctx->lowc = 0; +- ctx->highc = 0; +-} +- +-/* +- *------------------------------------------------------* +- * + * MDrmd160_Update -- + * +@@ -161,97 +112,7 @@ + unsigned int character; + { +- ripemd_context* ctx = (ripemd_context*) context; +- +- ctx->buf [ctx->byteCount] = character; +- ctx->byteCount ++; +- +- if (ctx->byteCount == CHUNK_SIZE) { +- CountLength (ctx, CHUNK_SIZE); +- +-#ifdef WORDS_BIGENDIAN +- Trf_FlipRegisterLong (ctx->buf, CHUNK_SIZE); +-#endif +- ripemd160_compress (ctx->state, (dword*) ctx->buf); +- ctx->byteCount = 0; +- } +-} +- +-/* +- *------------------------------------------------------* +- * +- * MDrmd160_UpdateBuf -- +- * +- * ------------------------------------------------* +- * Update the internal state of the message digest +- * generator for a character buffer. +- * ------------------------------------------------* +- * +- * Sideeffects: +- * As of the called procedure. +- * +- * Result: +- * None. +- * +- *------------------------------------------------------* +- */ +- +-static void +-MDrmd160_UpdateBuf (context, buffer, bufLen) +-VOID* context; +-unsigned char* buffer; +-int bufLen; +-{ +- ripemd_context* ctx = (ripemd_context*) context; +- +- if ((ctx->byteCount + bufLen) < CHUNK_SIZE) { +- /* +- * Not enough for full chunk. Remember incoming +- * data and wait for another call containing more data. +- */ +- +- memcpy ((VOID*) (ctx->buf + ctx->byteCount), (VOID*) buffer, bufLen); +- ctx->byteCount += bufLen; +- } else { +- /* +- * Complete chunk with incoming data, update digest, +- * then use all chunks contained in the buffer. Remember +- * an incomplete chunk and wait for further calls. +- */ +- +- int k = CHUNK_SIZE - ctx->byteCount; +- +- if (k < CHUNK_SIZE) { +- memcpy ((VOID*) (ctx->buf + ctx->byteCount), (VOID*) buffer, k); +- +- CountLength (ctx, CHUNK_SIZE); ++ char c = character; + +-#ifdef WORDS_BIGENDIAN +- Trf_FlipRegisterLong (ctx->buf, CHUNK_SIZE); +-#endif +- ripemd160_compress (ctx->state, (dword*) ctx->buf); +- +- buffer += k; +- bufLen -= k; +- } /* k == CHUNK_SIZE => internal buffer was empty, so skip it entirely */ +- +- while (bufLen > CHUNK_SIZE) { +- CountLength (ctx, CHUNK_SIZE); +- +-#ifdef WORDS_BIGENDIAN +- Trf_FlipRegisterLong (buffer, CHUNK_SIZE); +-#endif +- ripemd160_compress (ctx->state, (dword*) buffer); +-#ifdef WORDS_BIGENDIAN +- Trf_FlipRegisterLong (buffer, CHUNK_SIZE); +-#endif +- +- buffer += CHUNK_SIZE; +- bufLen -= CHUNK_SIZE; +- } +- +- ctx->byteCount = bufLen; +- if (bufLen > 0) +- memcpy ((VOID*) ctx->buf, (VOID*) buffer, bufLen); +- } ++ RIPEMD160_Update(context, &c, 1); + } + +@@ -280,52 +141,4 @@ + VOID* digest; + { +- ripemd_context* ctx = (ripemd_context*) context; +- +- CountLength (ctx, ctx->byteCount); +- +- ripemd160_MDfinish (ctx->state, ctx->buf, ctx->lowc, ctx->highc); +- +- memcpy (digest, ctx->state, DIGEST_SIZE); +-#ifdef WORDS_BIGENDIAN +- Trf_FlipRegisterLong (digest, DIGEST_SIZE); +-#endif +-} +- +-/* +- *------------------------------------------------------* +- * +- * CountLength -- +- * +- * ------------------------------------------------* +- * Update the 64bit counter in the context structure +- * ------------------------------------------------* +- * +- * Sideeffects: +- * See above. +- * +- * Result: +- * None. +- * +- *------------------------------------------------------* +- */ +- +-static void +-CountLength (ctx, nbytes) +- ripemd_context* ctx; +- unsigned int nbytes; +-{ +- /* update length counter */ +- +- if ((ctx->lowc + nbytes) < ctx->lowc) { +- /* overflow to msb of length */ +- ctx->highc ++; +- } +- +- ctx->lowc += nbytes; ++ (void)RIPEMD160_Final(digest, context); + } +- +-/* +- * External code from here on. +- */ +- +-#include "ripemd/rmd160.c" diff --git a/devel/tcl-trf/files/patch-sha b/devel/tcl-trf/files/patch-sha index 3b8ee2891f3a..57a2b90b5a6a 100644 --- a/devel/tcl-trf/files/patch-sha +++ b/devel/tcl-trf/files/patch-sha @@ -1,22 +1,15 @@ --- generic/sha.c Wed Aug 9 15:13:18 2000 -+++ generic/sha.c Fri Jul 9 16:28:57 2004 -@@ -30,34 +30,6 @@ - #include "transformInt.h" ++++ generic/sha.c Sat Jul 10 16:49:48 2004 +@@ -34,5 +34,5 @@ + #endif --#ifndef WORDS_BIGENDIAN --#define LITTLE_ENDIAN --#endif -- -#include "sha/sha.h" -- --/* -- * Generator description -- * --------------------- -- * -- * The SHA alogrithm is used to compute a cryptographically strong -- * message digest. -- */ -- ++#include <openssl/sha.h> + + /* +@@ -44,28 +44,9 @@ + */ + -#define DIGEST_SIZE (SHA_DIGESTSIZE) -#define CTX_TYPE sha_trf_info -#define CHUNK_SIZE 256 @@ -33,11 +26,9 @@ - unsigned char buf [CHUNK_SIZE]; /* SHA block */ -} sha_trf_info; - -+#include <sys/types.h> -+#include <sha.h> - +- /* -@@ -65,7 +37,5 @@ + * Declarations of internal procedures. */ -static void MDsha_Start _ANSI_ARGS_ ((VOID* context)); @@ -45,7 +36,7 @@ -static void MDsha_UpdateBuf _ANSI_ARGS_ ((VOID* context, unsigned char* buffer, int bufLen)); static void MDsha_Final _ANSI_ARGS_ ((VOID* context, VOID* digest)); -@@ -76,9 +46,9 @@ +@@ -76,9 +57,9 @@ static Trf_MessageDigestDescription mdDescription = { /* THREADING: constant, read-only => safe */ "sha", - sizeof (CTX_TYPE), @@ -59,7 +50,7 @@ + (Trf_MDUpdateBuf *)SHA_Update, MDsha_Final, NULL -@@ -113,33 +83,4 @@ +@@ -113,33 +94,4 @@ *------------------------------------------------------* * - * MDsha_Start -- @@ -93,7 +84,7 @@ - * * MDsha_Update -- * -@@ -163,79 +104,7 @@ +@@ -163,79 +115,7 @@ unsigned int character; { - sha_trf_info* s = (sha_trf_info*) context; @@ -175,7 +166,7 @@ + SHA_Update ((SHA_CTX*)context, &buf, 1); } -@@ -264,26 +133,4 @@ +@@ -264,26 +144,4 @@ VOID* digest; { - sha_trf_info* s = (sha_trf_info*) context; diff --git a/devel/tcl-trf/files/patch-sha1 b/devel/tcl-trf/files/patch-sha1 index 47aa08530c7c..b812c3ee0ea4 100644 --- a/devel/tcl-trf/files/patch-sha1 +++ b/devel/tcl-trf/files/patch-sha1 @@ -1,14 +1,13 @@ --- generic/sha1.c Wed Aug 9 15:13:18 2000 -+++ generic/sha1.c Fri Jul 9 16:41:33 2004 -@@ -30,4 +30,7 @@ ++++ generic/sha1.c Sat Jul 10 18:00:47 2004 +@@ -28,5 +28,6 @@ + */ + #include "loadman.h" ++#include <openssl/sha.h> -+#include <sys/types.h> -+#include <sha.h> -+ /* - * Generator description -@@ -49,9 +52,6 @@ +@@ -49,9 +50,6 @@ */ -static void MDsha1_Start _ANSI_ARGS_ ((VOID* context)); @@ -18,7 +17,7 @@ -static int MDsha1_Check _ANSI_ARGS_ ((Tcl_Interp* interp)); /* -@@ -67,9 +67,9 @@ +@@ -67,9 +65,9 @@ sizeof (CTX_TYPE), DIGEST_SIZE, - MDsha1_Start, @@ -31,7 +30,7 @@ + NULL }; -@@ -106,30 +106,4 @@ +@@ -106,30 +104,4 @@ *------------------------------------------------------* * - * MDsha1_Start -- @@ -62,7 +61,7 @@ - * * MDsha1_Update -- * -@@ -155,33 +129,5 @@ +@@ -155,33 +127,5 @@ unsigned char buf = character; - sha1f.update ((SHA_CTX*) context, &buf, 1); @@ -97,7 +96,7 @@ + SHA1_Update ((SHA_CTX*) context, &buf, 1); } -@@ -211,9 +157,9 @@ +@@ -211,9 +155,9 @@ { #ifndef OTP - sha1f.final ((unsigned char*) digest, (SHA_CTX*) context); @@ -109,7 +108,7 @@ + SHA1_Final ((unsigned char*) result, (SHA_CTX*) context); result[0] ^= result[2]; -@@ -224,30 +170,3 @@ +@@ -224,30 +168,3 @@ memcpy ((VOID *) digest, (VOID *) result, DIGEST_SIZE); #endif -} diff --git a/devel/tcl-trf/files/patch-zlib b/devel/tcl-trf/files/patch-zlib index 1eb619ca56a2..4a3dd12feeb9 100644 --- a/devel/tcl-trf/files/patch-zlib +++ b/devel/tcl-trf/files/patch-zlib @@ -13,27 +13,6 @@ + NULL }; -@@ -121,5 +120,5 @@ - /* call md specific initialization here */ - -- ADLER = zf.adler32 (0L, Z_NULL, 0); -+ ADLER = adler32 (0L, Z_NULL, 0); - - DONE (MDAdler_Start); -@@ -154,5 +153,5 @@ - unsigned char buf = character; - -- ADLER = zf.adler32 (ADLER, &buf, 1); -+ ADLER = adler32 (ADLER, &buf, 1); - } - -@@ -184,5 +183,5 @@ - /* call md specific update here */ - -- ADLER = zf.adler32 (ADLER, buffer, bufLen); -+ ADLER = adler32 (ADLER, buffer, bufLen); - } - @@ -222,36 +221,2 @@ out [3] = (char) ((adler >> 0) & 0xff); } @@ -86,27 +65,6 @@ + NULL }; -@@ -118,5 +117,5 @@ - /* call md specific initialization here */ - -- CRC = zf.crc32 (0L, Z_NULL, 0); -+ CRC = crc32 (0L, Z_NULL, 0); - } - -@@ -149,5 +148,5 @@ - unsigned char buf = character; - -- CRC = zf.crc32 (CRC, &buf, 1); -+ CRC = crc32 (CRC, &buf, 1); - } - -@@ -179,5 +178,5 @@ - /* call md specific update here */ - -- CRC = zf.crc32 (CRC, buffer, bufLen); -+ CRC = crc32 (CRC, buffer, bufLen); - } - @@ -217,28 +216,2 @@ out [0] = (char) ((crc >> 0) & 0xff); } |