Skip to content

make wolfSSL_UseALPN take const char* rather than char* #8002

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ycdev1
Copy link

@ycdev1 ycdev1 commented Sep 21, 2024

Currently wolfSSL_UseALPN takes char* argument which suggests that it mutates the data it receives while it just copies the data to a temporary allocated buffer so it should take const char* instead.

Also wolfSSL_ALPN_GetProtocol should output const char* but this may break existing code.

@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@ycdev1
Copy link
Author

ycdev1 commented Sep 21, 2024

Does wolfssl currently have an api to clear the set alpn? If no, the wolfSSL_UseALPN can clear the alpn if passed nullptr and 0

@embhorn embhorn self-assigned this Sep 23, 2024
@embhorn
Copy link
Member

embhorn commented Sep 23, 2024

Hi @ycdev1

Thanks for this suggestion. Could you tell us a bit about your project using wolfSSL? We do not typically accept small changes to the library. Do you think you will propose more changes in the future?

Thanks,
Eric -wolfSSL Support

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants