summaryrefslogtreecommitdiff
path: root/libavformat/rtmpdh.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2018-04-23 20:28:50 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2018-04-23 20:29:02 +0100
commit4ac0ff8ec2afb609ecebcc135bbedf04b1dced5b (patch)
tree356116aec6222b815095dd4135ae7358098f9eba /libavformat/rtmpdh.c
parent62f5c9d68bf6e0f2c1a47cf002629a70a82274fc (diff)
Revert "libavformat: add mbedTLS based TLS"
This reverts commit 62f5c9d68bf6e0f2c1a47cf002629a70a82274fc, which was pushed a bit prematurely.
Diffstat (limited to 'libavformat/rtmpdh.c')
-rw-r--r--libavformat/rtmpdh.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c
index 5ddae537a1..8eb088237b 100644
--- a/libavformat/rtmpdh.c
+++ b/libavformat/rtmpdh.c
@@ -38,11 +38,6 @@
#include "rtmpdh.h"
-#if CONFIG_MBEDTLS
-#include <mbedtls/ctr_drbg.h>
-#include <mbedtls/entropy.h>
-#endif
-
#define P1024 \
"FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
"29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
@@ -164,56 +159,6 @@ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p)
BN_CTX_free(ctx);
return 0;
}
-#elif CONFIG_MBEDTLS
-#define bn_new(bn) \
- do { \
- bn = av_malloc(sizeof(*bn)); \
- if (bn) \
- mbedtls_mpi_init(bn); \
- } while (0)
-#define bn_free(bn) \
- do { \
- mbedtls_mpi_free(bn); \
- av_free(bn); \
- } while (0)
-#define bn_set_word(bn, w) mbedtls_mpi_lset(bn, w)
-#define bn_cmp(a, b) mbedtls_mpi_cmp_mpi(a, b)
-#define bn_copy(to, from) mbedtls_mpi_copy(to, from)
-#define bn_sub_word(bn, w) mbedtls_mpi_sub_int(bn, bn, w)
-#define bn_cmp_1(bn) mbedtls_mpi_cmp_int(bn, 1)
-#define bn_num_bytes(bn) (mbedtls_mpi_bitlen(bn) + 7) / 8
-#define bn_bn2bin(bn, buf, len) mbedtls_mpi_write_binary(bn, buf, len)
-#define bn_bin2bn(bn, buf, len) \
- do { \
- bn_new(bn); \
- if (bn) \
- mbedtls_mpi_read_binary(bn, buf, len); \
- } while (0)
-#define bn_hex2bn(bn, buf, ret) \
- do { \
- bn_new(bn); \
- if (bn) \
- ret = (mbedtls_mpi_read_string(bn, 16, buf) == 0); \
- else \
- ret = 1; \
- } while (0)
-#define bn_random(bn, num_bits) \
- do { \
- mbedtls_entropy_context entropy_ctx; \
- mbedtls_ctr_drbg_context ctr_drbg_ctx; \
- \
- mbedtls_entropy_init(&entropy_ctx); \
- mbedtls_ctr_drbg_init(&ctr_drbg_ctx); \
- mbedtls_ctr_drbg_seed(&ctr_drbg_ctx, \
- mbedtls_entropy_func, \
- &entropy_ctx, \
- NULL, 0); \
- mbedtls_mpi_fill_random(bn, (num_bits + 7) / 8, mbedtls_ctr_drbg_random, &ctr_drbg_ctx); \
- mbedtls_ctr_drbg_free(&ctr_drbg_ctx); \
- mbedtls_entropy_free(&entropy_ctx); \
- } while (0)
-#define bn_modexp(bn, y, q, p) mbedtls_mpi_exp_mod(bn, y, q, p, 0)
-
#endif
#define MAX_BYTES 18000