[FFmpeg-devel] [PATCH] openssl: Support version 1.1.0.
Michael Niedermayer
michael at niedermayer.cc
Sun Oct 9 19:18:04 EEST 2016
On Mon, Oct 10, 2016 at 02:39:51AM +1100, Matt Oliver wrote:
> ---
> configure | 3 +-
> libavformat/tls_openssl.c | 159
> ++++++++++++++++++++++++++++------------------
> 2 files changed, 98 insertions(+), 64 deletions(-)
>
> diff --git a/configure b/configure
> index df6ffa2..750684a 100755
> --- a/configure
> +++ b/configure
> @@ -5813,7 +5813,8 @@ enabled omx && { check_header
> OMX_Core.h ||
> add_cflags -isystem/opt/vc/include/IL
> ; }
> check_header OMX_Core.h ; } ||
> die "ERROR: OpenMAX IL headers not found"; }
> -enabled openssl && { use_pkg_config openssl openssl/ssl.h
> SSL_library_init ||
> +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 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 ||
> diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
> index 46eb3e6..4effb39 100644
> --- a/libavformat/tls_openssl.c
> +++ b/libavformat/tls_openssl.c
> @@ -63,6 +63,85 @@ static unsigned long openssl_thread_id(void)
> #endif
> #endif
>
> +static int url_bio_create(BIO *b)
> +{
> +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
> + BIO_set_init(b, 1);
> + BIO_set_data(b, NULL);
> + BIO_set_flags(b, 0);
> +#else
> + b->init = 1;
> + b->ptr = NULL;
> + b->flags = 0;
> +#endif
> + return 1;
> +}
> +
> +static int url_bio_destroy(BIO *b)
> +{
> + return 1;
> +}
> +
> +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
> +#define BIO_GET_DATA(x) BIO_get_data(x);
> +#else
> +#define BIO_GET_DATA(x) x->ptr;
> +#endif
this needs a () for protecting x
also there are these new warnings:
libavformat/tls_openssl.c: In function ‘url_bio_bread’:
libavformat/tls_openssl.c:94:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
libavformat/tls_openssl.c: In function ‘url_bio_bwrite’:
libavformat/tls_openssl.c:106:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship: All citizens are under surveillance, all their steps and
actions recorded, for the politicians to enforce control.
Democracy: All politicians are under surveillance, all their steps and
actions recorded, for the citizens to enforce control.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161009/e60b1c30/attachment.sig>
More information about the ffmpeg-devel
mailing list