[FFmpeg-devel] [PATCH] lavf/tls_openssl: Support building with LibreSSL

Mark Thompson sw at jkqxz.net
Fri Jan 27 20:41:09 EET 2017


On 27/01/17 17:31, Marek BehĂșn wrote:
> Use the LIBRESSL_VERSION_NUMBER macro to determine if building with
> LibreSSL instead of OpenSSL. This is pretty straightforward, since
> it is enough to add this check to existing #if macros.
> 
> Signed-off-by: Marek Behun <kabel at blackhole.sk>
> ---
>  libavformat/tls_openssl.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
> index 3d9768a..cf1a62e 100644
> --- a/libavformat/tls_openssl.c
> +++ b/libavformat/tls_openssl.c
> @@ -43,7 +43,7 @@ typedef struct TLSContext {
>      TLSShared tls_shared;
>      SSL_CTX *ctx;
>      SSL *ssl;
> -#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
> +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER)

I don't understand what this is trying to do.

Does LibreSSL support the OpenSSL 1.1.0 API:

If yes, why would the additional check be needed?

If no, isn't this doing nothing because the first check would be false?


More information about the ffmpeg-devel mailing list