From ee02425f851d0c9cfb8a892f385394efe5b4fdda Mon Sep 17 00:00:00 2001
From: sfan5 <sfan5@live.de>
Date: Wed, 22 Feb 2017 15:38:16 +0100
Subject: [PATCH 2/2] rtmpdh: Support OpenSSL 1.1.0
DH (struct dh_st) was made private in the 1.1 series, a replacement
similar to the FF_DH struct for gcrypt/gmp is used instead.
---
libavformat/rtmpdh.h | 9 +++++++++
1 file changed, 9 insertions(+)
@@ -48,10 +48,19 @@ typedef struct FF_DH {
#elif CONFIG_OPENSSL
#include <openssl/bn.h>
#include <openssl/dh.h>
+#include <openssl/opensslv.h>
typedef BIGNUM *FFBigNum;
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+typedef struct {
+ BIGNUM *p, *g;
+ BIGNUM *pub_key, *priv_key;
+ long length;
+} FF_DH;
+#else
typedef DH FF_DH;
#endif
+#endif
/**
* Initialize a Diffie-Hellmann context.
--
2.11.1