Changeset 2586
- Timestamp:
- 04/28/12 16:30:16 (14 months ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 12 modified
- 1 moved
-
Makefile.am (modified) (5 diffs)
-
backends/bind/Makefile.am (modified) (1 diff)
-
dnssecinfra.cc (modified) (1 diff)
-
ext/polarssl-1.1.2 (moved) (moved from trunk/pdns/pdns/ext/polarssl-1.1.1)
-
ext/polarssl-1.1.2/ChangeLog (modified) (1 diff)
-
ext/polarssl-1.1.2/include/polarssl/dhm.h (modified) (2 diffs)
-
ext/polarssl-1.1.2/include/polarssl/version.h (modified) (2 diffs)
-
ext/polarssl-1.1.2/library/bignum.c (modified) (3 diffs)
-
ext/polarssl-1.1.2/library/cipher.c (modified) (1 diff)
-
ext/polarssl-1.1.2/library/dhm.c (modified) (7 diffs)
-
ext/polarssl-1.1.2/library/md.c (modified) (1 diff)
-
ext/polarssl-1.1.2/library/ssl_tls.c (modified) (1 diff)
-
polarrsakeyinfra.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/Makefile.am
r2558 r2586 1 AM_CXXFLAGS=-DSYSCONFDIR=\"@sysconfdir@\" -DLIBDIR=\"@libdir@\" -DLOCALSTATEDIR=\"@socketdir@\" -Ibackends/bind @THREADFLAGS@ $(LUA_CFLAGS) $(SQLITE3_CFLAGS) -Iext/polarssl-1.1. 1/include1 AM_CXXFLAGS=-DSYSCONFDIR=\"@sysconfdir@\" -DLIBDIR=\"@libdir@\" -DLOCALSTATEDIR=\"@socketdir@\" -Ibackends/bind @THREADFLAGS@ $(LUA_CFLAGS) $(SQLITE3_CFLAGS) -Iext/polarssl-1.1.2/include 2 2 AM_CPPFLAGS=-Ibackends/bind $(BOOST_CPPFLAGS) @THREADFLAGS@ 3 3 … … 8 8 bind-dnssec.schema.sqlite3.sql 9 9 10 SUBDIRS= ext/polarssl-1.1. 1backends10 SUBDIRS= ext/polarssl-1.1.2 backends 11 11 12 12 BUILT_SOURCES=bind-dnssec.schema.sqlite3.sql.h … … 53 53 # 54 54 pdns_server_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@ $(BOOST_SERIALIZATION_LDFLAGS) -rdynamic 55 pdns_server_LDADD= ext/polarssl-1.1. 1/library/libpolarssl.a $(BOOST_SERIALIZATION_LIBS) $(LUA_LIBS) $(SQLITE3_LIBS)55 pdns_server_LDADD= ext/polarssl-1.1.2/library/libpolarssl.a $(BOOST_SERIALIZATION_LIBS) $(LUA_LIBS) $(SQLITE3_LIBS) 56 56 57 57 … … 88 88 89 89 pdnssec_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@ $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS) 90 pdnssec_LDADD= ext/polarssl-1.1. 1/library/libpolarssl.a $(BOOST_PROGRAM_OPTIONS_LIBS) $(BOOST_SERIALIZATION_LIBS) $(SQLITE3_LIBS)90 pdnssec_LDADD= ext/polarssl-1.1.2/library/libpolarssl.a $(BOOST_PROGRAM_OPTIONS_LIBS) $(BOOST_SERIALIZATION_LIBS) $(SQLITE3_LIBS) 91 91 92 92 if BOTAN110 … … 131 131 aes/aestab.c aes/aestab.h aes/brg_endian.h aes/brg_types.h aes/dns_random.cc \ 132 132 randomhelper.cc dns.cc 133 tsig_tests_LDFLAGS= -Lext/polarssl-1.1. 1/library133 tsig_tests_LDFLAGS= -Lext/polarssl-1.1.2/library 134 134 tsig_tests_LDADD= -lpolarssl 135 135 -
trunk/pdns/pdns/backends/bind/Makefile.am
r2452 r2586 35 35 36 36 zone2ldap_LDFLAGS=@THREADFLAGS@ 37 zone2ldap_LDADD= ../../ext/polarssl-1.1. 1/library/libpolarssl.a37 zone2ldap_LDADD= ../../ext/polarssl-1.1.2/library/libpolarssl.a 38 38 39 39 zone2sql_LDFLAGS=@THREADFLAGS@ 40 zone2sql_LDADD= ../../ext/polarssl-1.1. 1/library/libpolarssl.a40 zone2sql_LDADD= ../../ext/polarssl-1.1.2/library/libpolarssl.a 41 41 42 42 AM_LFLAGS = -s -i -
trunk/pdns/pdns/dnssecinfra.cc
r2547 r2586 10 10 #include "dnssecinfra.hh" 11 11 #include "dnsseckeeper.hh" 12 #include "ext/polarssl-1.1. 1/include/polarssl/sha1.h"12 #include "ext/polarssl-1.1.2/include/polarssl/sha1.h" 13 13 #include <boost/assign/std/vector.hpp> // for 'operator+=()' 14 14 #include <boost/assign/list_inserter.hpp> -
trunk/pdns/pdns/ext/polarssl-1.1.2/ChangeLog
r2389 r2586 1 1 PolarSSL ChangeLog 2 3 = Version 1.1.2 released on 2012-04-26 4 Bugfix 5 * Fixed handling error in mpi_cmp_mpi() on longer B values (found by 6 Hui Dong) 7 8 Security 9 * Fixed potential memory corruption on miscrafted client messages (found by 10 Frama-C team at CEA LIST) 11 * Fixed generation of DHM parameters to correct length (found by Ruslan 12 Yushchenko) 2 13 3 14 = Version 1.1.1 released on 2012-01-23 -
trunk/pdns/pdns/ext/polarssl-1.1.2/include/polarssl/dhm.h
r2389 r2586 37 37 #define POLARSSL_ERR_DHM_MAKE_PARAMS_FAILED -0x3180 /**< Making of the DHM parameters failed. */ 38 38 #define POLARSSL_ERR_DHM_READ_PUBLIC_FAILED -0x3200 /**< Reading of the public values failed. */ 39 #define POLARSSL_ERR_DHM_MAKE_PUBLIC_FAILED -0x3280 /**< Mak eing of the public value failed. */39 #define POLARSSL_ERR_DHM_MAKE_PUBLIC_FAILED -0x3280 /**< Making of the public value failed. */ 40 40 #define POLARSSL_ERR_DHM_CALC_SECRET_FAILED -0x3300 /**< Calculation of the DHM secret failed. */ 41 41 … … 110 110 * 111 111 * \param ctx DHM context 112 * \param x_size private value size in b its112 * \param x_size private value size in bytes 113 113 * \param output destination buffer 114 114 * \param olen must be equal to ctx->P.len -
trunk/pdns/pdns/ext/polarssl-1.1.2/include/polarssl/version.h
r2389 r2586 40 40 #define POLARSSL_VERSION_MAJOR 1 41 41 #define POLARSSL_VERSION_MINOR 1 42 #define POLARSSL_VERSION_PATCH 142 #define POLARSSL_VERSION_PATCH 2 43 43 44 44 /** … … 47 47 * Major version | Minor version | Patch version 48 48 */ 49 #define POLARSSL_VERSION_NUMBER 0x01010 10050 #define POLARSSL_VERSION_STRING "1.1. 1"51 #define POLARSSL_VERSION_STRING_FULL "PolarSSL 1.1. 1"49 #define POLARSSL_VERSION_NUMBER 0x01010200 50 #define POLARSSL_VERSION_STRING "1.1.2" 51 #define POLARSSL_VERSION_STRING_FULL "PolarSSL 1.1.2" 52 52 53 53 #if defined(POLARSSL_VERSION_C) -
trunk/pdns/pdns/ext/polarssl-1.1.2/library/bignum.c
r2389 r2586 688 688 689 689 if( i > j ) return( X->s ); 690 if( j > i ) return( - X->s );690 if( j > i ) return( -Y->s ); 691 691 692 692 if( X->s > 0 && Y->s < 0 ) return( 1 ); … … 1814 1814 * pick a random A, 1 < A < |X| - 1 1815 1815 */ 1816 MPI_CHK( mpi_fill_random( &A, X->n , f_rng, p_rng ) );1816 MPI_CHK( mpi_fill_random( &A, X->n * ciL, f_rng, p_rng ) ); 1817 1817 1818 1818 if( mpi_cmp_mpi( &A, &W ) >= 0 ) … … 1886 1886 n = BITS_TO_LIMBS( nbits ); 1887 1887 1888 MPI_CHK( mpi_fill_random( X, n , f_rng, p_rng ) );1888 MPI_CHK( mpi_fill_random( X, n * ciL, f_rng, p_rng ) ); 1889 1889 1890 1890 k = mpi_msb( X ); -
trunk/pdns/pdns/ext/polarssl-1.1.2/library/cipher.c
r2389 r2586 246 246 return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA; 247 247 248 memset( ctx, 0, sizeof( c tx) );248 memset( ctx, 0, sizeof( cipher_context_t ) ); 249 249 250 250 if( NULL == ( ctx->cipher_ctx = cipher_info->base->ctx_alloc_func() ) ) -
trunk/pdns/pdns/ext/polarssl-1.1.2/library/dhm.c
r2389 r2586 62 62 63 63 /* 64 * Verify sanity of p ublic parameter with regards to P65 * 66 * P ublic parameter should be: 2 <= public_param <= P - 264 * Verify sanity of parameter with regards to P 65 * 66 * Parameter should be: 2 <= public_param <= P - 2 67 67 * 68 68 * For more information on the attack, see: … … 70 70 * http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-2643 71 71 */ 72 static int dhm_check_range( const mpi *p ublic_param, const mpi *P )72 static int dhm_check_range( const mpi *param, const mpi *P ) 73 73 { 74 74 mpi L, U; … … 79 79 mpi_sub_int( &U, P, 2 ); 80 80 81 if( mpi_cmp_mpi( p ublic_param, &L ) >= 0 &&82 mpi_cmp_mpi( p ublic_param, &U ) <= 0 )81 if( mpi_cmp_mpi( param, &L ) >= 0 && 82 mpi_cmp_mpi( param, &U ) <= 0 ) 83 83 { 84 84 ret = 0; … … 131 131 void *p_rng ) 132 132 { 133 int ret, n;133 int ret, count = 0; 134 134 size_t n1, n2, n3; 135 135 unsigned char *p; … … 138 138 * Generate X as large as possible ( < P ) 139 139 */ 140 n = x_size / sizeof( t_uint ) + 1; 141 142 mpi_fill_random( &ctx->X, n, f_rng, p_rng ); 143 144 while( mpi_cmp_mpi( &ctx->X, &ctx->P ) >= 0 ) 145 mpi_shift_r( &ctx->X, 1 ); 140 do 141 { 142 mpi_fill_random( &ctx->X, x_size, f_rng, p_rng ); 143 144 while( mpi_cmp_mpi( &ctx->X, &ctx->P ) >= 0 ) 145 mpi_shift_r( &ctx->X, 1 ); 146 147 if( count++ > 10 ) 148 return( POLARSSL_ERR_DHM_MAKE_PARAMS_FAILED ); 149 } 150 while( dhm_check_range( &ctx->X, &ctx->P ) != 0 ); 146 151 147 152 /* … … 208 213 void *p_rng ) 209 214 { 210 int ret, n;215 int ret, count = 0; 211 216 212 217 if( ctx == NULL || olen < 1 || olen > ctx->len ) … … 216 221 * generate X and calculate GX = G^X mod P 217 222 */ 218 n = x_size / sizeof( t_uint ) + 1; 219 220 mpi_fill_random( &ctx->X, n, f_rng, p_rng ); 221 222 while( mpi_cmp_mpi( &ctx->X, &ctx->P ) >= 0 ) 223 mpi_shift_r( &ctx->X, 1 ); 223 do 224 { 225 mpi_fill_random( &ctx->X, x_size, f_rng, p_rng ); 226 227 while( mpi_cmp_mpi( &ctx->X, &ctx->P ) >= 0 ) 228 mpi_shift_r( &ctx->X, 1 ); 229 230 if( count++ > 10 ) 231 return( POLARSSL_ERR_DHM_MAKE_PUBLIC_FAILED ); 232 } 233 while( dhm_check_range( &ctx->X, &ctx->P ) != 0 ); 224 234 225 235 MPI_CHK( mpi_exp_mod( &ctx->GX, &ctx->G, &ctx->X, -
trunk/pdns/pdns/ext/polarssl-1.1.2/library/md.c
r2389 r2586 153 153 int md_init_ctx( md_context_t *ctx, const md_info_t *md_info ) 154 154 { 155 if( md_info == NULL ) 156 return POLARSSL_ERR_MD_BAD_INPUT_DATA; 157 158 if( ctx == NULL || ctx->md_ctx != NULL ) 159 return POLARSSL_ERR_MD_BAD_INPUT_DATA; 155 if( md_info == NULL || ctx == NULL ) 156 return POLARSSL_ERR_MD_BAD_INPUT_DATA; 157 158 memset( ctx, 0, sizeof( md_context_t ) ); 160 159 161 160 if( ( ctx->md_ctx = md_info->ctx_alloc_func() ) == NULL ) -
trunk/pdns/pdns/ext/polarssl-1.1.2/library/ssl_tls.c
r2389 r2586 786 786 * Always compute the MAC (RFC4346, CBCTIME). 787 787 */ 788 if( ssl->in_msglen <= ssl->maclen + padlen ) 789 { 790 SSL_DEBUG_MSG( 1, ( "msglen (%d) < maclen (%d) + padlen (%d)", 791 ssl->in_msglen, ssl->maclen, padlen ) ); 792 return( POLARSSL_ERR_SSL_INVALID_MAC ); 793 } 794 788 795 ssl->in_msglen -= ( ssl->maclen + padlen ); 789 796 -
trunk/pdns/pdns/polarrsakeyinfra.cc
r2396 r2586 1 #include "ext/polarssl-1.1. 1/include/polarssl/rsa.h"2 #include "ext/polarssl-1.1. 1/include/polarssl/base64.h"3 #include "ext/polarssl-1.1. 1/include/polarssl/sha1.h"4 #include "ext/polarssl-1.1. 1/include/polarssl/sha2.h"5 #include "ext/polarssl-1.1. 1/include/polarssl/sha4.h"6 #include "ext/polarssl-1.1. 1/include/polarssl/havege.h"1 #include "ext/polarssl-1.1.2/include/polarssl/rsa.h" 2 #include "ext/polarssl-1.1.2/include/polarssl/base64.h" 3 #include "ext/polarssl-1.1.2/include/polarssl/sha1.h" 4 #include "ext/polarssl-1.1.2/include/polarssl/sha2.h" 5 #include "ext/polarssl-1.1.2/include/polarssl/sha4.h" 6 #include "ext/polarssl-1.1.2/include/polarssl/havege.h" 7 7 #include <boost/assign/std/vector.hpp> // for 'operator+=()' 8 8 #include <boost/foreach.hpp>