1) configure only looks for OPENSSL_init_ssl using pkg-config, this 
breaks in case pkg-config is not available (cross-compiling)


2) The rtmpdh code uses the DH struct from OpenSSL which was made 
private in the 1.1 series


From 5cc140f85d8d7551ac0a2c51d5023bd8ba75ba4b Mon Sep 17 00:00:00 2001
From: sfan5 <sf...@live.de>
Date: Wed, 22 Feb 2017 15:35:57 +0100
Subject: [PATCH 1/2] configure: Support OpenSSL 1.1.0 without pkg-config

---
 configure | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 6431313814..16db9edc1b 100755
--- a/configure
+++ b/configure
@@ -5892,6 +5892,7 @@ enabled omx               && { check_header OMX_Core.h ||
                                die "ERROR: OpenMAX IL headers not found"; }
 enabled openssl           && { use_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
                                use_pkg_config openssl openssl/ssl.h SSL_library_init ||
+                               check_lib openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
                                check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
                                check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                                check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
-- 
2.11.1

From ee02425f851d0c9cfb8a892f385394efe5b4fdda Mon Sep 17 00:00:00 2001
From: sfan5 <sf...@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(+)

diff --git a/libavformat/rtmpdh.h b/libavformat/rtmpdh.h
index 2b250f595d..2d1489b193 100644
--- a/libavformat/rtmpdh.h
+++ b/libavformat/rtmpdh.h
@@ -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

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to