Skip to content

Fix build failures when NO_AES_DECRYPT is defined - #11448

Open
kaleb-himes wants to merge 1 commit into
wolfSSL:masterfrom
kaleb-himes:Fix-AES-Decrypt-Only-Builds
Open

Fix build failures when NO_AES_DECRYPT is defined#11448
kaleb-himes wants to merge 1 commit into
wolfSSL:masterfrom
kaleb-himes:Fix-AES-Decrypt-Only-Builds

Conversation

@kaleb-himes

Copy link
Copy Markdown
Contributor

Description

Followup to: #11423

Fixes the NO_AES_DECRYPT builds which had fallen into disrepair somewhat both with and without TLS enabled.

How did you test?

Building on macOS both with and without --enable-wolfcryptonly

Checklist

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

@kaleb-himes

Copy link
Copy Markdown
Contributor Author

retest this please

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #11448

Scan targets checked: none
Failed targets: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs

⚠️ Review incomplete — one or more scan targets failed before findings could be produced. See the Fenrir PR review detail page for logs.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #11448

Scan targets checked: none
Failed targets: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs

⚠️ Review incomplete — one or more scan targets failed before findings could be produced. See the Fenrir PR review detail page for logs.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #11448

Scan targets checked: none
Failed targets: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs

⚠️ Review incomplete — one or more scan targets failed before findings could be produced. See the Fenrir PR review detail page for logs.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #11448

Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread wolfssl/wolfcrypt/settings.h Outdated
/* GCM and CCM decrypt only use AES encrypt, so keep them with
* NO_AES_DECRYPT. */
#undef HAVE_AESGCM_DECRYPT
#define HAVE_AESGCM_DECRYPT

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New GCM decrypt macro breaks accelerated builds · Logic errors

HAVE_AESGCM_DECRYPT now compiles GCM decryption under NO_AES_DECRYPT, but AES-NI and RISC-V streaming decrypt declarations remain gated only by HAVE_AES_DECRYPT. These configurations fail with undeclared-function errors.

Suggested fix: Guard the AES-NI and RISC-V GCM decrypt declarations with HAVE_AES_DECRYPT || HAVE_AESGCM_DECRYPT.
Basis: ISO C99 §6.5.1p2 requires an identifier used as a primary expression to be declared.

Comment thread wolfssl/internal.h Outdated
#if defined(WOLFSSL_STATIC_PSK)
#if !defined(NO_PSK) && !defined(NO_AES) && !defined(NO_TLS)
#if !defined(NO_SHA)
#if !defined(NO_SHA) && defined(HAVE_AES_DECRYPT)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SHA-1 PSK suites remain enabled without AES-CBC · Logic errors

The SHA-1 PSK guard still omits HAVE_AES_CBC. NO_AES_CBC static-PSK builds advertise AES-CBC suites whose record-layer cases are compiled out, causing ENCRYPT_ERROR after negotiation.

Suggested fix: Require both HAVE_AES_CBC and HAVE_AES_DECRYPT in the SHA-1 PSK suite guard.

@kaleb-himes
kaleb-himes force-pushed the Fix-AES-Decrypt-Only-Builds branch from 65d8000 to 8c68122 Compare September 13, 2026 18:23
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.

2 participants