Skip to content

refactor SessionSecret_callback*#9171

Merged
SparkiDev merged 1 commit intowolfSSL:masterfrom
effbiae:ss-callback
Sep 11, 2025
Merged

refactor SessionSecret_callback*#9171
SparkiDev merged 1 commit intowolfSSL:masterfrom
effbiae:ss-callback

Conversation

@effbiae
Copy link
Contributor

@effbiae effbiae commented Sep 8, 2025

Description

src/internal.c contains SessionSecret_callback and SessionSecret_callback_Tls13 which share a page of code.

this patch pulls out the common code to SessionSecret_callback_common

Testing

./configure --enable-opensslextra --enable-keylog-export --enable-tls13 --enable-all && make check

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@devin-ai-integration
Copy link
Contributor

🛟 Devin Lifeguard found 2 likely issues in this PR

  • pointer-null-check snippet: Add if (ssl->ctx == NULL) return BAD_FUNC_ARG; immediately before the line logCb = ssl->ctx->keyLogCb; inside SessionSecret_callback_common().
  • declare-const-pointers snippet: Change the signature of SessionSecret_callback_common to static int SessionSecret_callback_common(const WOLFSSL* ssl, const unsigned char* secret, int secretSz, const char* label, int labelSz) and adjust its callers accordingly.

@effbiae
please take a look at the above issues which Devin flagged. Devin will not fix these issues automatically.

@dgarske
Copy link
Contributor

dgarske commented Sep 8, 2025

Okay to test. Contributor agreement on file.

@dgarske
Copy link
Contributor

dgarske commented Sep 10, 2025

Okay to test. Contributor agreement on file.

@effbiae
Copy link
Contributor Author

effbiae commented Sep 11, 2025

i've rebased on upstream/master to get the fix for the two failures

@SparkiDev SparkiDev self-assigned this Sep 11, 2025
@SparkiDev SparkiDev merged commit a17b10e into wolfSSL:master Sep 11, 2025
325 of 326 checks passed
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.

[Bug]: haproxy: support for SSL_CTX_set_keylog_callback() in --enable-haproxy ?

5 participants

Comments