Merge commit '016387fe0fe3eff1a03ec0673bf4d2967f6cad94'
authorClément Bœsch <u@pkh.me>
Fri, 24 Mar 2017 11:43:49 +0000 (12:43 +0100)
committerClément Bœsch <u@pkh.me>
Fri, 24 Mar 2017 11:43:49 +0000 (12:43 +0100)
* commit '016387fe0fe3eff1a03ec0673bf4d2967f6cad94':
  rtmpdh: Don't use the OpenSSL DH struct

Merged-by: Clément Bœsch <u@pkh.me>
1  2 
libavformat/rtmpdh.c
libavformat/rtmpdh.h

          }                                             \
          mpz_fdiv_r_2exp(bn, bn, num_bits);            \
      } while (0)
+ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p)
+ {
+     mpz_powm(bn, y, q, p);
+     return 0;
+ }
  #elif CONFIG_GCRYPT
 -#define bn_new(bn)                  bn = gcry_mpi_new(1)
 +#define bn_new(bn)                                              \
 +    do {                                                        \
 +        if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \
 +            if (!gcry_check_version("1.5.4"))                   \
 +                return AVERROR(EINVAL);                         \
 +            gcry_control(GCRYCTL_DISABLE_SECMEM, 0);            \
 +            gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);   \
 +        }                                                       \
 +        bn = gcry_mpi_new(1);                                   \
 +    } while (0)
  #define bn_free(bn)                 gcry_mpi_release(bn)
  #define bn_set_word(bn, w)          gcry_mpi_set_ui(bn, w)
  #define bn_cmp(a, b)                gcry_mpi_cmp(a, b)
Simple merge