Changeset 14443


Ignore:
Timestamp:
Jan 7, 2015, 1:41:22 PM (6 years ago)
Author:
mikedld
Message:

Lower minimum PolarSSL version required down to 1.2

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r14441 r14443  
    9797set(OPENSSL_MINIMUM         0.9.4)
    9898set(CYASSL_MINIMUM          3.0)
    99 set(POLARSSL_MINIMUM        1.3)
     99set(POLARSSL_MINIMUM        1.2)
    100100set(ZLIB_MINIMUM            1.2.3)
    101101set(GTK_MINIMUM             3.4.0)
  • trunk/configure.ac

    r14441 r14443  
    5151CYASSL_MINIMUM=3.0
    5252AC_SUBST(CYASSL_MINIMUM)
    53 POLARSSL_MINIMUM=0x01030000 # 1.3
     53POLARSSL_MINIMUM=0x01020000 # 1.2
    5454AC_SUBST(POLARSSL_MINIMUM)
    5555
  • trunk/libtransmission/crypto-utils-polarssl.c

    r14442 r14443  
    1616#include <polarssl/error.h>
    1717#include <polarssl/sha1.h>
     18#include <polarssl/version.h>
    1819
    1920#include "transmission.h"
     
    111112tr_sha1_init (void)
    112113{
    113   sha1_context * handle = tr_new (sha1_context, 1);
     114  sha1_context * handle = tr_new0 (sha1_context, 1);
     115
     116#if POLARSSL_VERSION_NUMBER >= 0x01030800
     117  sha1_init (handle);
     118#endif
     119
    114120  sha1_starts (handle);
    115121  return handle;
     
    143149    }
    144150
     151#if POLARSSL_VERSION_NUMBER >= 0x01030800
     152  sha1_free (handle);
     153#endif
     154
    145155  tr_free (handle);
    146156  return true;
     
    154164tr_rc4_new (void)
    155165{
    156   return tr_new0 (arc4_context, 1);
     166  arc4_context * handle = tr_new0 (arc4_context, 1);
     167
     168#if POLARSSL_VERSION_NUMBER >= 0x01030800
     169  arc4_init (handle);
     170#endif
     171
     172  return handle;
    157173}
    158174
     
    160176tr_rc4_free (tr_rc4_ctx_t handle)
    161177{
     178#if POLARSSL_VERSION_NUMBER >= 0x01030800
     179  arc4_free (handle);
     180#endif
     181
    162182  tr_free (handle);
    163183}
     
    206226  assert (generator_num != NULL);
    207227
     228#if POLARSSL_VERSION_NUMBER >= 0x01030800
    208229  dhm_init (handle);
     230#endif
    209231
    210232  if (!check_result (mpi_read_binary (&handle->P, prime_num, prime_num_length)) ||
Note: See TracChangeset for help on using the changeset viewer.