Changeset 14444


Ignore:
Timestamp:
Jan 7, 2015, 2:05:58 PM (6 years ago)
Author:
mikedld
Message:

Further adjustments to support PolarSSL 1.2

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r14443 r14444  
    151151                                     version_ok
    152152                                     #endif],
    153             [AC_CHECK_LIB([polarssl], [dhm_init],
     153            [AC_CHECK_LIB([polarssl], [dhm_calc_secret],
    154154                [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS=""; CRYPTO_LIBS="-lpolarssl"],
    155155                [AS_IF([test "x$want_crypto" = "xpolarssl"],
  • trunk/libtransmission/crypto-utils-polarssl.c

    r14443 r14444  
    4141    {
    4242      char error_message[256];
     43
     44#if POLARSSL_VERSION_NUMBER >= 0x01030000
    4345      polarssl_strerror (error_code, error_message, sizeof (error_message));
     46#else
     47      error_strerror (error_code, error_message, sizeof (error_message));
     48#endif
     49
    4450      tr_logAddMessage (file, line, TR_LOG_ERROR, MY_NAME, "PolarSSL error: %s", error_message);
    4551    }
     
    289295  secret_key_length = handle->len;
    290296
     297#if POLARSSL_VERSION_NUMBER >= 0x01030000
    291298  if (!check_result (dhm_calc_secret (handle, ret->key,
    292299                                      &secret_key_length, my_rand, NULL)))
     300#else
     301  if (!check_result (dhm_calc_secret (handle, ret->key, &secret_key_length)))
     302#endif
    293303    {
    294304      tr_dh_secret_free (ret);
Note: See TracChangeset for help on using the changeset viewer.