packages: exim/exim.spec, exim/exim-dkim.patch (NEW) - rel 2; dkim fixes/up...
arekm
arekm at pld-linux.org
Thu Dec 17 12:30:37 CET 2009
Author: arekm Date: Thu Dec 17 11:30:37 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 2; dkim fixes/updates from cvs
---- Files affected:
packages/exim:
exim.spec (1.310 -> 1.311) , exim-dkim.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/exim/exim.spec
diff -u packages/exim/exim.spec:1.310 packages/exim/exim.spec:1.311
--- packages/exim/exim.spec:1.310 Wed Nov 25 10:12:11 2009
+++ packages/exim/exim.spec Thu Dec 17 12:30:31 2009
@@ -15,7 +15,7 @@
Summary(pt_BR.UTF-8): Servidor de correio eletrônico exim
Name: exim
Version: 4.71
-Release: 1
+Release: 2
Epoch: 2
License: GPL
Group: Networking/Daemons/SMTP
@@ -51,6 +51,7 @@
# http://sourceforge.net/projects/eximdsn/
Patch7: %{name}_463_dsn_1_3.patch
Patch8: %{name}-spam-timeout.patch
+Patch9: %{name}-dkim.patch
Patch10: %{name}-force-sigalrm.patch
URL: http://www.exim.org/
%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.1.0}
@@ -158,6 +159,7 @@
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p0
%patch10 -p1
install %{SOURCE13} doc/FAQ.txt.bz2
@@ -320,6 +322,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.311 2009/12/17 11:30:31 arekm
+- rel 2; dkim fixes/updates from cvs
+
Revision 1.310 2009/11/25 09:12:11 arekm
- up to 4.71
================================================================
Index: packages/exim/exim-dkim.patch
diff -u /dev/null packages/exim/exim-dkim.patch:1.1
--- /dev/null Thu Dec 17 12:30:37 2009
+++ packages/exim/exim-dkim.patch Thu Dec 17 12:30:31 2009
@@ -0,0 +1,1686 @@
+diff -ur /home/users/arekm/rpm/packages/exim/exim-4.71/src/dkim.c src/dkim.c
+--- /home/users/arekm/rpm/packages/exim/exim-4.71/src/dkim.c 2009-11-16 20:50:36.000000000 +0100
++++ src/dkim.c 2009-12-17 12:17:01.778692630 +0100
+@@ -1,4 +1,4 @@
+-/* $Cambridge: exim/exim-src/src/dkim.c,v 1.10 2009/11/16 19:50:36 nm4 Exp $ */
++/* $Cambridge: exim/exim-src/src/dkim.c,v 1.11 2009/12/15 08:23:15 tom Exp $ */
+
+ /*************************************************
+ * Exim - an Internet mail transport agent *
+@@ -391,6 +391,7 @@
+ uschar *rc = NULL;
+ pdkim_signature *signature;
+ int pdkim_canon;
++ int pdkim_rc;
+ int sread;
+ char buf[4096];
+ int save_errno = 0;
+@@ -511,8 +512,11 @@
+ goto CLEANUP;
+ }
+
+- if (pdkim_feed_finish(ctx,&signature) != PDKIM_OK)
++ pdkim_rc = pdkim_feed_finish(ctx,&signature);
++ if (pdkim_rc != PDKIM_OK) {
++ log_write(0, LOG_MAIN|LOG_PANIC, "DKIM: signing failed (RC %d)", pdkim_rc);
+ goto CLEANUP;
++ }
+
+ rc = store_get(strlen(signature->signature_header)+3);
+ Ustrcpy(rc,US signature->signature_header);
+diff -ur /home/users/arekm/rpm/packages/exim/exim-4.71/src/pdkim/base64.c src/pdkim/base64.c
+--- /home/users/arekm/rpm/packages/exim/exim-4.71/src/pdkim/base64.c 2009-06-10 09:34:05.000000000 +0200
++++ src/pdkim/base64.c 2009-12-17 12:17:01.822130396 +0100
+@@ -1,9 +1,10 @@
+ /*
+ * RFC 1521 base64 encoding/decoding
+ *
+- * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine
++ * Copyright (C) 2006-2009, Paul Bakker <polarssl_maintainer at polarssl.org>
++ * All rights reserved.
+ *
+- * Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org>
++ * Joined copyright on original XySSL code with: Christophe Devine
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -20,7 +21,7 @@
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+-/* $Cambridge: exim/exim-src/src/pdkim/base64.c,v 1.2 2009/06/10 07:34:05 tom Exp $ */
++/* $Cambridge: exim/exim-src/src/pdkim/base64.c,v 1.3 2009/12/07 13:05:07 tom Exp $ */
+
+ #include "base64.h"
+
+diff -ur /home/users/arekm/rpm/packages/exim/exim-4.71/src/pdkim/base64.h src/pdkim/base64.h
+--- /home/users/arekm/rpm/packages/exim/exim-4.71/src/pdkim/base64.h 2009-06-10 09:34:05.000000000 +0200
++++ src/pdkim/base64.h 2009-12-17 12:17:01.822130396 +0100
+@@ -1,9 +1,10 @@
+ /**
+ * \file base64.h
+ *
+- * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine
++ * Copyright (C) 2006-2009, Paul Bakker <polarssl_maintainer at polarssl.org>
++ * All rights reserved.
+ *
+- * Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org>
++ * Joined copyright on original XySSL code with: Christophe Devine
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -20,13 +21,13 @@
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+-/* $Cambridge: exim/exim-src/src/pdkim/base64.h,v 1.2 2009/06/10 07:34:05 tom Exp $ */
++/* $Cambridge: exim/exim-src/src/pdkim/base64.h,v 1.3 2009/12/07 13:05:07 tom Exp $ */
+
+ #ifndef POLARSSL_BASE64_H
+ #define POLARSSL_BASE64_H
+
+-#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL -0x0010
+-#define POLARSSL_ERR_BASE64_INVALID_CHARACTER -0x0012
++#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL 0x0010
++#define POLARSSL_ERR_BASE64_INVALID_CHARACTER 0x0012
+
+ #ifdef __cplusplus
+ extern "C" {
+diff -ur /home/users/arekm/rpm/packages/exim/exim-4.71/src/pdkim/bignum.c src/pdkim/bignum.c
+--- /home/users/arekm/rpm/packages/exim/exim-4.71/src/pdkim/bignum.c 2009-06-10 09:34:05.000000000 +0200
++++ src/pdkim/bignum.c 2009-12-17 12:17:01.824459747 +0100
+@@ -1,9 +1,10 @@
+ /*
+ * Multi-precision integer library
+ *
+- * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine
++ * Copyright (C) 2006-2009, Paul Bakker <polarssl_maintainer at polarssl.org>
++ * All rights reserved.
+ *
+- * Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org>
++ * Joined copyright on original XySSL code with: Christophe Devine
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -27,7 +28,8 @@
+ * http://math.libtomcrypt.com/files/tommath.pdf
+ */
+
+-/* $Cambridge: exim/exim-src/src/pdkim/bignum.c,v 1.2 2009/06/10 07:34:05 tom Exp $ */
++/* $Cambridge: exim/exim-src/src/pdkim/bignum.c,v 1.3 2009/12/07 13:05:07 tom Exp $ */
++
+
+ #include "bignum.h"
+ #include "bn_mul.h"
+@@ -284,7 +286,15 @@
+
+ MPI_CHK( mpi_get_digit( &d, radix, s[i] ) );
+ MPI_CHK( mpi_mul_int( &T, X, radix ) );
+- MPI_CHK( mpi_add_int( X, &T, d ) );
++
++ if( X->s == 1 )
++ {
++ MPI_CHK( mpi_add_int( X, &T, d ) );
++ }
++ else
++ {
++ MPI_CHK( mpi_sub_int( X, &T, d ) );
++ }
+ }
+ }
+
+@@ -372,6 +382,10 @@
+ else
+ {
+ MPI_CHK( mpi_copy( &T, X ) );
++
++ if( T.s == -1 )
++ T.s = 1;
++
+ MPI_CHK( mpi_write_hlp( &T, radix, &p ) );
+ }
+
+@@ -674,6 +688,11 @@
+ if( X != A )
+ MPI_CHK( mpi_copy( X, A ) );
+
++ /*
++ * X should always be positive as a result of unsigned additions.
++ */
++ X->s = 1;
++
+ for( j = B->n - 1; j >= 0; j-- )
+ if( B->p[j] != 0 )
+ break;
+@@ -747,6 +766,11 @@
+ if( X != A )
+ MPI_CHK( mpi_copy( X, A ) );
+
++ /*
++ * X should always be positive as a result of unsigned substractions.
++ */
++ X->s = 1;
++
+ ret = 0;
+
+ for( n = B->n - 1; n >= 0; n-- )
+@@ -1160,6 +1184,9 @@
+ {
+ int ret;
+
++ if( mpi_cmp_int( B, 0 ) < 0 )
++ return POLARSSL_ERR_MPI_NEGATIVE_VALUE;
++
+ MPI_CHK( mpi_div_mpi( NULL, R, A, B ) );
+
+ while( mpi_cmp_int( R, 0 ) < 0 )
+@@ -1185,7 +1212,7 @@
+ return( POLARSSL_ERR_MPI_DIVISION_BY_ZERO );
+
+ if( b < 0 )
+- b = -b;
++ return POLARSSL_ERR_MPI_NEGATIVE_VALUE;
+
+ /*
+ * handle trivial cases
+@@ -1218,6 +1245,13 @@
+ y -= z * b;
+ }
+
++ /*
++ * If A is negative, then the current y represents a negative value.
++ * Flipping it to the positive side.
++ */
++ if( A->s < 0 && y != 0 )
++ y = b - y;
++
+ *r = y;
+
+ return( 0 );
+@@ -1474,21 +1508,29 @@
+ */
+ int mpi_gcd( mpi *G, mpi *A, mpi *B )
+ {
+- int ret;
++ int ret, lz, lzt;
+ mpi TG, TA, TB;
+
+ mpi_init( &TG, &TA, &TB, NULL );
+
+- MPI_CHK( mpi_lset( &TG, 1 ) );
+ MPI_CHK( mpi_copy( &TA, A ) );
+ MPI_CHK( mpi_copy( &TB, B ) );
+
++ lz = mpi_lsb( &TA );
++ lzt = mpi_lsb( &TB );
++
++ if ( lzt < lz )
++ lz = lzt;
++
++ MPI_CHK( mpi_shift_r( &TA, lz ) );
++ MPI_CHK( mpi_shift_r( &TB, lz ) );
++
+ TA.s = TB.s = 1;
+
+ while( mpi_cmp_int( &TA, 0 ) != 0 )
+ {
+- while( ( TA.p[0] & 1 ) == 0 ) MPI_CHK( mpi_shift_r( &TA, 1 ) );
+- while( ( TB.p[0] & 1 ) == 0 ) MPI_CHK( mpi_shift_r( &TB, 1 ) );
++ MPI_CHK( mpi_shift_r( &TA, mpi_lsb( &TA ) ) );
++ MPI_CHK( mpi_shift_r( &TB, mpi_lsb( &TB ) ) );
+
+ if( mpi_cmp_mpi( &TA, &TB ) >= 0 )
+ {
+@@ -1502,7 +1544,8 @@
+ }
+ }
+
+- MPI_CHK( mpi_mul_mpi( G, &TG, &TB ) );
++ MPI_CHK( mpi_shift_l( &TB, lz ) );
++ MPI_CHK( mpi_copy( G, &TB ) );
+
+ cleanup:
+
+@@ -1511,6 +1554,8 @@
+ return( ret );
+ }
+
++#if defined(POLARSSL_GENPRIME)
++
+ /*
+ * Modular inverse: X = A^-1 mod N (HAC 14.61 / 14.64)
+ */
+@@ -1638,7 +1683,11 @@
+ mpi W, R, T, A, RR;
+ unsigned char *p;
+
+- if( mpi_cmp_int( X, 0 ) == 0 )
++ if( mpi_cmp_int( X, 0 ) == 0 ||
++ mpi_cmp_int( X, 1 ) == 0 )
++ return( POLARSSL_ERR_MPI_NOT_ACCEPTABLE );
++
++ if( mpi_cmp_int( X, 2 ) == 0 )
+ return( 0 );
+
+ mpi_init( &W, &R, &T, &A, &RR, NULL );
+@@ -1811,3 +1860,5 @@
+
+ return( ret );
+ }
++
++#endif
+diff -ur /home/users/arekm/rpm/packages/exim/exim-4.71/src/pdkim/bignum.h src/pdkim/bignum.h
+--- /home/users/arekm/rpm/packages/exim/exim-4.71/src/pdkim/bignum.h 2009-06-10 09:34:05.000000000 +0200
++++ src/pdkim/bignum.h 2009-12-17 12:17:01.824459747 +0100
+@@ -1,9 +1,10 @@
+ /**
+ * \file bignum.h
+ *
+- * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine
++ * Copyright (C) 2006-2009, Paul Bakker <polarssl_maintainer at polarssl.org>
++ * All rights reserved.
+ *
+- * Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org>
++ * Joined copyright on original XySSL code with: Christophe Devine
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -20,20 +21,20 @@
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+-/* $Cambridge: exim/exim-src/src/pdkim/bignum.h,v 1.2 2009/06/10 07:34:05 tom Exp $ */
++/* $Cambridge: exim/exim-src/src/pdkim/bignum.h,v 1.3 2009/12/07 13:05:07 tom Exp $ */
+
+ #ifndef POLARSSL_BIGNUM_H
+ #define POLARSSL_BIGNUM_H
+
+ #include <stdio.h>
+
+-#define POLARSSL_ERR_MPI_FILE_IO_ERROR -0x0002
+-#define POLARSSL_ERR_MPI_BAD_INPUT_DATA -0x0004
+-#define POLARSSL_ERR_MPI_INVALID_CHARACTER -0x0006
+-#define POLARSSL_ERR_MPI_BUFFER_TOO_SMALL -0x0008
+-#define POLARSSL_ERR_MPI_NEGATIVE_VALUE -0x000A
+-#define POLARSSL_ERR_MPI_DIVISION_BY_ZERO -0x000C
+-#define POLARSSL_ERR_MPI_NOT_ACCEPTABLE -0x000E
++#define POLARSSL_ERR_MPI_FILE_IO_ERROR 0x0002
++#define POLARSSL_ERR_MPI_BAD_INPUT_DATA 0x0004
++#define POLARSSL_ERR_MPI_INVALID_CHARACTER 0x0006
++#define POLARSSL_ERR_MPI_BUFFER_TOO_SMALL 0x0008
++#define POLARSSL_ERR_MPI_NEGATIVE_VALUE 0x000A
++#define POLARSSL_ERR_MPI_DIVISION_BY_ZERO 0x000C
++#define POLARSSL_ERR_MPI_NOT_ACCEPTABLE 0x000E
+
+ #define MPI_CHK(f) if( ( ret = f ) != 0 ) goto cleanup
+
+@@ -57,7 +58,9 @@
+ defined(__ia64__) || defined(__alpha__)
+ typedef unsigned int t_dbl __attribute__((mode(TI)));
+ #else
+- typedef unsigned long long t_dbl;
++ #if defined(POLARSSL_HAVE_LONGLONG)
++ typedef unsigned long long t_dbl;
++ #endif
+ #endif
+ #endif
+ #endif
+@@ -91,6 +94,9 @@
+ /**
+ * \brief Enlarge to the specified number of limbs
+ *
++ * \param X MPI to grow
++ * \param nblimbs The target number of limbs
++ *
+ * \return 0 if successful,
+ * 1 if memory allocation failed
+ */
+@@ -99,6 +105,9 @@
+ /**
+ * \brief Copy the contents of Y into X
+ *
++ * \param X Destination MPI
++ * \param Y Source MPI
++ *
+ * \return 0 if successful,
+ * 1 if memory allocation failed
+ */
+@@ -106,12 +115,18 @@
+
+ /**
+ * \brief Swap the contents of X and Y
++ *
++ * \param X First MPI value
++ * \param Y Second MPI value
+ */
+ void mpi_swap( mpi *X, mpi *Y );
+
+ /**
+ * \brief Set value from integer
+ *
++ * \param X MPI to set
++ * \param z Value to use
++ *
+ * \return 0 if successful,
+ * 1 if memory allocation failed
+ */
+@@ -119,25 +134,31 @@
+
+ /**
+ * \brief Return the number of least significant bits
++ *
++ * \param X MPI to use
+ */
+ int mpi_lsb( mpi *X );
+
+ /**
+ * \brief Return the number of most significant bits
++ *
++ * \param X MPI to use
+ */
+ int mpi_msb( mpi *X );
+
+ /**
+ * \brief Return the total size in bytes
++ *
++ * \param X MPI to use
+ */
+ int mpi_size( mpi *X );
+
+ /**
+ * \brief Import from an ASCII string
+ *
+- * \param X destination mpi
+- * \param radix input numeric base
+- * \param s null-terminated string buffer
++ * \param X Destination MPI
++ * \param radix Input numeric base
++ * \param s Null-terminated string buffer
+ *
+ * \return 0 if successful, or an POLARSSL_ERR_MPI_XXX error code
+ */
+@@ -146,10 +167,10 @@
+ /**
+ * \brief Export into an ASCII string
+ *
+- * \param X source mpi
+- * \param radix output numeric base
+- * \param s string buffer
+- * \param slen string buffer size
++ * \param X Source MPI
++ * \param radix Output numeric base
++ * \param s String buffer
++ * \param slen String buffer size
+ *
+ * \return 0 if successful, or an POLARSSL_ERR_MPI_XXX error code
+ *
+@@ -161,21 +182,21 @@
+ /**
+ * \brief Read X from an opened file
+ *
+- * \param X destination mpi
+- * \param radix input numeric base
+- * \param fin input file handle
++ * \param X Destination MPI
++ * \param radix Input numeric base
++ * \param fin Input file handle
+ *
+ * \return 0 if successful, or an POLARSSL_ERR_MPI_XXX error code
+ */
+ int mpi_read_file( mpi *X, int radix, FILE *fin );
+
+ /**
+- * \brief Write X into an opened file, or stdout
++ * \brief Write X into an opened file, or stdout if fout is NULL
+ *
+- * \param p prefix, can be NULL
+- * \param X source mpi
+- * \param radix output numeric base
+- * \param fout output file handle
++ * \param p Prefix, can be NULL
++ * \param X Source MPI
++ * \param radix Output numeric base
++ * \param fout Output file handle (can be NULL)
+ *
+ * \return 0 if successful, or an POLARSSL_ERR_MPI_XXX error code
+ *
+@@ -186,9 +207,9 @@
+ /**
+ * \brief Import X from unsigned binary data, big endian
+ *
+- * \param X destination mpi
+- * \param buf input buffer
+- * \param buflen input buffer size
++ * \param X Destination MPI
++ * \param buf Input buffer
++ * \param buflen Input buffer size
+ *
+ * \return 0 if successful,
+ * 1 if memory allocation failed
+@@ -198,21 +219,21 @@
+ /**
+ * \brief Export X into unsigned binary data, big endian
+ *
+- * \param X source mpi
+- * \param buf output buffer
+- * \param buflen output buffer size
++ * \param X Source MPI
++ * \param buf Output buffer
++ * \param buflen Output buffer size
+ *
+ * \return 0 if successful,
+ * POLARSSL_ERR_MPI_BUFFER_TOO_SMALL if buf isn't large enough
+- *
+- * \note Call this function with *buflen = 0 to obtain the
+- * minimum required buffer size in *buflen.
+ */
+ int mpi_write_binary( mpi *X, unsigned char *buf, int buflen );
+
+ /**
+ * \brief Left-shift: X <<= count
+ *
++ * \param X MPI to shift
++ * \param count Amount to shift
++ *
+ * \return 0 if successful,
+ * 1 if memory allocation failed
+ */
+@@ -221,6 +242,9 @@
+ /**
+ * \brief Right-shift: X >>= count
+ *
++ * \param X MPI to shift
++ * \param count Amount to shift
++ *
+ * \return 0 if successful,
+ * 1 if memory allocation failed
+ */
+@@ -229,6 +253,9 @@
+ /**
+ * \brief Compare unsigned values
+ *
++ * \param X Left-hand MPI
++ * \param Y Right-hand MPI
++ *
+ * \return 1 if |X| is greater than |Y|,
+ * -1 if |X| is lesser than |Y| or
+ * 0 if |X| is equal to |Y|
+@@ -238,6 +265,9 @@
+ /**
+ * \brief Compare signed values
+ *
++ * \param X Left-hand MPI
++ * \param Y Right-hand MPI
++ *
+ * \return 1 if X is greater than Y,
+ * -1 if X is lesser than Y or
+ * 0 if X is equal to Y
+@@ -247,6 +277,9 @@
+ /**
+ * \brief Compare signed values
+ *
++ * \param X Left-hand MPI
++ * \param z The integer value to compare to
++ *
+ * \return 1 if X is greater than z,
+ * -1 if X is lesser than z or
+ * 0 if X is equal to z
+@@ -256,6 +289,10 @@
+ /**
+ * \brief Unsigned addition: X = |A| + |B|
+ *
++ * \param X Destination MPI
++ * \param A Left-hand MPI
++ * \param B Right-hand MPI
++ *
+ * \return 0 if successful,
+ * 1 if memory allocation failed
+ */
+@@ -264,6 +301,10 @@
+ /**
+ * \brief Unsigned substraction: X = |A| - |B|
+ *
++ * \param X Destination MPI
++ * \param A Left-hand MPI
++ * \param B Right-hand MPI
++ *
+ * \return 0 if successful,
+ * POLARSSL_ERR_MPI_NEGATIVE_VALUE if B is greater than A
+ */
+@@ -272,6 +313,10 @@
+ /**
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/exim/exim.spec?r1=1.310&r2=1.311&f=u
More information about the pld-cvs-commit
mailing list