Skip to content

WHIP: Fix bugs #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: workflows
Choose a base branch
from
Open

Conversation

JackLau1222
Copy link
Collaborator

@JackLau1222 JackLau1222 commented Jun 5, 2025

This PR is based on the whip code in FFmpeg master and #18 , it aims to improve this feature

Key Changes:

avformat/tls_openssl: fix build error when openssl version < 3

Progress

the early two commits has been merged in ffmpeg master FFmpeg@4611ed5

the latest commit [avformat/tls_openssl: fix warnings when openssl is lower version](https://github.com/ossrs/ffmpeg-webrtc/pull/19/commits/9368f77e9c0071888b92066e98d82d28cf25ebf3) has been reviewed by Steven Liu, waiting to merge, then this PR will be closed

Usage

You can follow the usage to test this patch.

@winlinvip winlinvip changed the title WHIP: improve it and add more feature WHIP: Fix bugs Jun 5, 2025
@JackLau1222 JackLau1222 force-pushed the fix_tls_build branch 2 times, most recently from 1c0802c to 6b8e626 Compare June 6, 2025 11:25
@winlinvip winlinvip changed the base branch from master to workflows June 6, 2025 12:41
@winlinvip winlinvip changed the base branch from workflows to master June 6, 2025 12:41
@winlinvip winlinvip changed the base branch from master to workflows June 6, 2025 12:41
@winlinvip winlinvip force-pushed the workflows branch 8 times, most recently from d8fca42 to aa84960 Compare June 6, 2025 21:54
fix the missing data structure pkey in the tls_context

Signed-off-by: Jack Lau <jacklau1222@qq.com>
Signed-off-by: Jack Lau <jacklau1222@qq.com>
In higher versions (like openssl 1.1.1 and higher),
the function signature is BIO *BIO_new_mem_buf(const void *buf, int len),
so passing a const string doesn't cause an warnings.
However, in lower versions of OpenSSL,
the function signature becomes BIO *BIO_new_mem_buf(void *buf, int len),
which leads to warnings.

OpenSSL guarantees that it will not modify the string,
so it's safe to cast the pem_str to (void *) to avoid this warning.

Signed-off-by: Jack Lau <jacklau1222@qq.com>
api doc: https://docs.openssl.org/1.0.2/man3/BIO_s_mem

In higher versions (openssl 1.0.2 and higher),
the function signature is BIO *BIO_new_mem_buf(const void *buf, int len),
so passing a const string doesn't cause an warnings.
However, in lower versions of OpenSSL,
the function signature becomes BIO *BIO_new_mem_buf(void *buf, int len),
which leads to warnings.

OpenSSL guarantees that it will not modify the string,
so it's safe to cast the pem_str to (void *) to avoid this warning.

Signed-off-by: Jack Lau <jacklau1222@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants