ports/66099: [PATCH]: security/libtomcrypt
Wesley Shields
wxs at csh.rit.edu
Fri Apr 30 02:20:27 UTC 2004
>Number: 66099
>Category: ports
>Synopsis: [PATCH]: security/libtomcrypt
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 29 19:20:22 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator: Wesley Shields
>Release: FreeBSD 5.2.1-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD syn.csh.rit.edu 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #1: Mon May 17 12:06:28 EST 2004 root at syn.csh.rit.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Update security/libtomcrypt port to .94 released on 02/23/04. files/patch-dsa.c should be removed after applying the patch. Maintainer is CC'ed on this.
>How-To-Repeat:
N/A
>Fix:
http://www.atarininja.com/~wxs/patches/libtomcrypt.diff (pasted below).
diff -ruN security/libtomcrypt.orig/Makefile security/libtomcrypt/Makefile
--- security/libtomcrypt.orig/Makefile Sat Apr 10 18:16:07 2004
+++ security/libtomcrypt/Makefile Tue Apr 27 22:04:39 2004
@@ -6,7 +6,7 @@
#
PORTNAME= libtomcrypt
-PORTVERSION= 0.92
+PORTVERSION= 0.94
CATEGORIES= security
MASTER_SITES= http://libtomcrypt.org/files/
DISTNAME= crypt-${PORTVERSION}
diff -ruN security/libtomcrypt.orig/distinfo security/libtomcrypt/distinfo
--- security/libtomcrypt.orig/distinfo Sat Apr 10 18:16:07 2004
+++ security/libtomcrypt/distinfo Tue Apr 27 21:04:50 2004
@@ -1,2 +1,2 @@
-MD5 (crypt-0.92.tar.bz2) = 12fd407c6678e072446323aaf41c0719
-SIZE (crypt-0.92.tar.bz2) = 783233
+MD5 (crypt-0.94.tar.bz2) = f53f3977e74d63e4733e388bffc69087
+SIZE (crypt-0.94.tar.bz2) = 820131
diff -ruN security/libtomcrypt.orig/files/patch-dsa.c security/libtomcrypt/files/patch-dsa.c
--- security/libtomcrypt.orig/files/patch-dsa.c Sat Apr 10 18:16:07 2004
+++ security/libtomcrypt/files/patch-dsa.c Wed Dec 31 19:00:00 1969
@@ -1,88 +0,0 @@
---- dsa.c.orig Tue Jan 13 14:52:15 2004
-+++ dsa.c Tue Jan 13 14:53:54 2004
-@@ -297,15 +297,15 @@
- return err;
- }
-
--#define OUTPUT_BIGNUM(num, buf2, y, z) \
--{ \
-- z = (unsigned long)mp_unsigned_bin_size(num); \
-- if ((y + 4 + z) > *outlen) { return CRYPT_BUFFER_OVERFLOW; } \
-- STORE32L(z, out+y); \
-- y += 4; \
-- if (mp_to_unsigned_bin(num, out+y) != MP_OKAY) { return CRYPT_MEM; } \
-- y += z; \
--}
-+#define OUTPUT_BIGNUM(num, buf2, y, z) \
-+{ \
-+ z = (unsigned long)mp_unsigned_bin_size(num); \
-+ if ((y + 4 + z) > *outlen) { return CRYPT_BUFFER_OVERFLOW; } \
-+ STORE32L(z, out+y); \
-+ y += 4; \
-+ if (mp_to_unsigned_bin(num, out+y) != MP_OKAY) { return CRYPT_MEM; } \
-+ y += z; \
-+}
-
- int dsa_export(unsigned char *out, unsigned long *outlen, int type, dsa_key *key)
- {
-@@ -352,33 +352,33 @@
- return CRYPT_OK;
- }
-
--#define INPUT_BIGNUM(num, in, x, y) \
--{ \
-- /* load value */ \
-- if (y+4 > inlen) { \
-- err = CRYPT_INVALID_PACKET; \
-- goto error; \
-- } \
-- LOAD32L(x, in+y); \
-- y += 4; \
-- \
-- /* sanity check... */ \
-- if (y+x > inlen) { \
-- err = CRYPT_INVALID_PACKET; \
-- goto error; \
-- } \
-- \
-- /* load it */ \
-- if (mp_read_unsigned_bin(num, (unsigned char *)in+y, (int)x) != MP_OKAY) {\
-- err = CRYPT_MEM; \
-- goto error; \
-- } \
-- y += x; \
-- if (mp_shrink(num) != MP_OKAY) { \
-- err = CRYPT_MEM; \
-- goto error; \
-- } \
--}
-+#define INPUT_BIGNUM(num, in, x, y) \
-+{ \
-+ /* load value */ \
-+ if (y+4 > inlen) { \
-+ err = CRYPT_INVALID_PACKET; \
-+ goto error; \
-+ } \
-+ LOAD32L(x, in+y); \
-+ y += 4; \
-+ \
-+ /* sanity check... */ \
-+ if (y+x > inlen) { \
-+ err = CRYPT_INVALID_PACKET; \
-+ goto error; \
-+ } \
-+ \
-+ /* load it */ \
-+ if (mp_read_unsigned_bin(num, (unsigned char *)in+y, (int)x) != MP_OKAY) {\
-+ err = CRYPT_MEM; \
-+ goto error; \
-+ } \
-+ y += x; \
-+ if (mp_shrink(num) != MP_OKAY) { \
-+ err = CRYPT_MEM; \
-+ goto error; \
-+ } \
-+}
-
- int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key)
- {
diff -ruN security/libtomcrypt.orig/pkg-plist security/libtomcrypt/pkg-plist
--- security/libtomcrypt.orig/pkg-plist Sat Apr 10 18:16:07 2004
+++ security/libtomcrypt/pkg-plist Tue Apr 27 21:43:48 2004
@@ -18,12 +18,9 @@
%%EXAMPLESDIR%%/ch2-01.c
%%EXAMPLESDIR%%/encrypt.c
%%EXAMPLESDIR%%/small.c
-%%EXAMPLESDIR%%/timer.asm
-%%EXAMPLESDIR%%/timer.h
%%EXAMPLESDIR%%/x86_prof.c
%%EXAMPLESDIR%%/hashsum.c
%%EXAMPLESDIR%%/test.c
-%%EXAMPLESDIR%%/timer.c
%%EXAMPLESDIR%%/tv_gen.c
%%PORTDOCS%%%%DOCSDIR%%/crypt.pdf
%%PORTDOCS%%%%DOCSDIR%%/cipher_tv.txt
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list