Skip to content

Conversation

@holtrop
Copy link
Contributor

@holtrop holtrop commented Nov 18, 2025

Description

Report rsa_pss_pss_* signature algorithm instead of rsa_pss_rsae_* when both sides support it and the key/cert in use is RSA-PSS.

Fixes ZD#20812

Testing

Captured TLSv1.3 traffic with Wireshark and verified that the Certificate Verify message now reports rsa_pss_pss_sha256 when it previously reported rsa_pss_rsae_sha256.

Checklist

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

@holtrop holtrop self-assigned this Nov 18, 2025
@holtrop holtrop force-pushed the report-rsa_pss_pss-sig-algo branch 5 times, most recently from 798f8c4 to 268b81c Compare November 19, 2025 14:46
@holtrop holtrop force-pushed the report-rsa_pss_pss-sig-algo branch 16 times, most recently from 2859f2d to 2c4b6f4 Compare November 20, 2025 04:04
@holtrop holtrop marked this pull request as ready for review November 20, 2025 14:09
@holtrop holtrop requested a review from SparkiDev November 20, 2025 14:10
@holtrop holtrop assigned wolfSSL-Bot and unassigned holtrop Nov 20, 2025
src/ssl_load.c Outdated
}
#ifdef WC_RSA_PSS
if (ssl)
ssl->ctx->useRsaPss = (cert->keyOID == RSAPSSk) ? 1U : 0U;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the field to WOLFSSL.
Don't modify the WOLFSSL_CTX when the certificate is only for the SSL.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everywhere that uses ssl in this function checks if it is non-NULL first and it looked to me that this function could be called with ssl NULL and only ctx set. I was trying to support all calls to this, but maybe I only need to support the calls where ssl is not NULL to set this flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I move useRsaPss flag to struct WOLFSSL then the issue is broken again and rss_pss_rsae_sha256 is reported instead of rss_pss_pss_sha256.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the certificate with RSA-PSS OID goes against 'ssl' and not 'ctx', then updating 'ctx' is wrong.
Did I misunderstand the code?

Are you checking the 'ssl' field after adding and are you copying the field from 'ctx' on creation of the WOLFSSL object.

@holtrop holtrop requested a review from SparkiDev November 24, 2025 21:46
@SparkiDev SparkiDev assigned holtrop and unassigned wolfSSL-Bot Nov 24, 2025
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.

3 participants