[FFmpeg-devel] [PATCH] avformat/tls_openssl: fix build error when openssl version < 3

Martin Storsjö martin at martin.st
Thu Jun 5 10:02:04 EEST 2025


On Thu, 5 Jun 2025, Jack Lau via ffmpeg-devel wrote:

> fix the missing data structure pkey in the tls_context
>
> Signed-off-by: Jack Lau <jacklau1222 at qq.com>
> ---
> libavformat/tls_openssl.c | 30 +++++++++++++++++-------------
> 1 file changed, 17 insertions(+), 13 deletions(-)

Thanks, this does fix the build break. However, I don't quite understand 
the fix...

> diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
> index b589d5d90a..bddeee9af8 100644
> --- a/libavformat/tls_openssl.c
> +++ b/libavformat/tls_openssl.c
> @@ -467,6 +467,7 @@ typedef struct TLSContext {
>     TLSShared tls_shared;
>     SSL_CTX *ctx;
>     SSL *ssl;
> +    EVP_PKEY *pkey;
> #if OPENSSL_VERSION_NUMBER >= 0x1010000fL
>     BIO_METHOD* url_bio_method;
> #endif

As far as I can see, nothing ever sets this new field, it is only used in 
a couple of places?

// Martin



More information about the ffmpeg-devel mailing list