wolfssl icon indicating copy to clipboard operation
wolfssl copied to clipboard

make `wolfSSL_UseALPN` take `const char*` rather than `char*`

Open ycdev1 opened this issue 1 year ago • 3 comments

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.

ycdev1 avatar Sep 21 '24 21:09 ycdev1

Can one of the admins verify this patch?

wolfSSL-Bot avatar Sep 21 '24 21:09 wolfSSL-Bot

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

ycdev1 avatar Sep 21 '24 21:09 ycdev1

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

embhorn avatar Sep 23 '24 14:09 embhorn