Skip to content

Misc. provider fixes - #92

Merged
dgarske merged 4 commits into
wolfSSL:mainfrom
gasbytes:misc-improv-fixes
Oct 15, 2026
Merged

dgarske merged 4 commits into
wolfSSL:mainfrom
gasbytes:misc-improv-fixes

Conversation

@gasbytes

Copy link
Copy Markdown
Contributor

Error handling, AEAD/RSA output and RSA thread-related fixes in the provider.

Fixes #89, #90, #91.

Tested locally with FIPS + gnutls 3.8.9...3.8.11.

@gasbytes gasbytes self-assigned this Oct 15, 2026
Copilot AI balanced review requested due to automatic review settings October 15, 2026 10:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved authentication-failure handling, fork deadlocks, and worker cleanup errors prevent approval.

3 open findings
What changed in this PR

This PR hardens the wolfSSL GnuTLS provider’s error handling, authentication output, and shared random-number generation, addressing #89–#91.

Changes:

  • Return negative errors for refused operations and correct MAC cleanup.
  • Serialize shared RNG use and enforce exact-length RSA decryption.
  • Correct GCM tag handling and add regression tests.
File Description
wolfssl-gnutls-wrapper/​tests/​test_util.h Add refusal-or-output comparison helper.
wolfssl-gnutls-wrapper/​tests/​test_rsa_encrypt_and_decrypt.c Test fixed-length decryption and unchanged failure buffers.
wolfssl-gnutls-wrapper/​tests/​test_pbkdf2.c Test short-password handling.
wolfssl-gnutls-wrapper/​tests/​test_hmac.c Test short-key handling.
wolfssl-gnutls-wrapper/​tests/​test_hkdf.c Test short-salt handling.
wolfssl-gnutls-wrapper/​tests/​test_fips.c Require negative RSA refusal errors.
wolfssl-gnutls-wrapper/​tests/​test_ecdsa_sign_and_verify.c Test concurrent key generation and signing.
wolfssl-gnutls-wrapper/​tests/​test_aesgcm.c Test tags after one-shot decryption.
wolfssl-gnutls-wrapper/​tests/​Makefile Link threading support on Linux.
wolfssl-gnutls-wrapper/​src/​random.h Expose RNG locking helpers.
wolfssl-gnutls-wrapper/​src/​random.c Synchronize RNG use and refresh.
wolfssl-gnutls-wrapper/​src/​pk.c Lock RNG operations and correct decryption lengths and errors.
wolfssl-gnutls-wrapper/​src/​mac.c Correct refusal errors and context cleanup.
wolfssl-gnutls-wrapper/​src/​kdf.c Return negative derivation errors.
wolfssl-gnutls-wrapper/​src/​cipher.c Correct tag output and allocation checks.
wolfssl-gnutls-wrapper/​Makefile Enable provider threading support on Linux.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread wolfssl-gnutls-wrapper/src/cipher.c Resolved
Comment thread wolfssl-gnutls-wrapper/src/random.c Resolved
@gasbytes
gasbytes force-pushed the misc-improv-fixes branch 2 times, most recently from 4a56c17 to 92007a6 Compare October 15, 2026 11:51
@gasbytes gasbytes assigned SparkiDev and unassigned gasbytes Oct 15, 2026
@gasbytes
gasbytes requested review from SparkiDev and dgarske and removed request for SparkiDev October 15, 2026 13:54
@gasbytes gasbytes assigned dgarske and unassigned SparkiDev Oct 15, 2026
@dgarske
dgarske merged commit b9bfeb3 into wolfSSL:main Oct 15, 2026
59 of 61 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.

Shared DRBG used without a lock: duplicate keys and nonce reuse under threads

4 participants