Skip to content

Conversation

@gojimmypi
Copy link
Contributor

Description

This PR forces WOLFSSL_OLD_OID_SUM in settings.h when WC_16BIT_CPU is encountered.

Some CPU platforms, when smaller than 32 bit, will have the compiler ignore the upper 16 bits of an enum value.

(yes, I was surprised, too)

This is problematic in the new OID values of wolfssl/wolfcrypt/oid_sum.h

For instance:

/home/gojimmypi/Arduino/libraries/wolfssl/src/src/ssl_load.c:1538:9: error: duplicate case value
         case CTC_SHA256wECDSA:
         ^~~~
/home/gojimmypi/Arduino/libraries/wolfssl/src/src/ssl_load.c:1537:9: note: previously used here
         case CTC_SHAwECDSA:
         ^~~~

Where:

CTC_SHAwECDSA     = 0x31498217,
CTC_SHA256wECDSA  = 0x4c4b8217,

Note that WC_16BIT_CPU is currently a manual specification, NOT auto-detected.

Although WOLFSSL_OLD_OID_SUM could also have been manually specified to solve the problem, it is more intuitive to have it defined for a reason: when WC_16BIT_CPU is encountered.

Fixes zd# n/a

Testing

Tested with my WIP Arduino workflow tests for example this one:

See output:

All boards supported for template example
-------------------------------------------------------------------------------------
Compiling ./sketches/template for arduino:avr:mega
-------------------------------------------------------------------------------------
arduino-cli compile --fqbn "arduino:avr:mega" "./sketches/template"
In file included from /home/runner/Arduino/libraries/wolfssl/src/src/ssl.c:6608:0:
/home/runner/Arduino/libraries/wolfssl/src/src/ssl_load.c: In function 'ProcessBufferCertSetHave':
/home/runner/Arduino/libraries/wolfssl/src/src/ssl_load.c:1538:9: error: duplicate case value
         case CTC_SHA256wECDSA:
         ^~~~
/home/runner/Arduino/libraries/wolfssl/src/src/ssl_load.c:1537:9: note: previously used here
         case CTC_SHAwECDSA:
         ^~~~
/home/runner/Arduino/libraries/wolfssl/src/src/ssl_load.c:1539:9: error: duplicate case value
         case CTC_SHA384wECDSA:
         ^~~~
/home/runner/Arduino/libraries/wolfssl/src/src/ssl_load.c:1537:9: note: previously used here
         case CTC_SHAwECDSA:
         ^~~~
/home/runner/Arduino/libraries/wolfssl/src/src/ssl_load.c:1540:9: error: duplicate case value
         case CTC_SHA512wECDSA:
         ^~~~
/home/runner/Arduino/libraries/wolfssl/src/src/ssl_load.c:1537:9: note: previously used here
         case CTC_SHAwECDSA:
         ^~~~
Error during build: exit status 1
Used library Version Path
wolfssl      5.8.2   /home/runner/Arduino/libraries/wolfssl
Used platform Version Path
arduino:avr   1.8.6   /home/runner/.arduino15/packages/arduino/hardware/avr/1.8.6

Checklist

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

@gojimmypi gojimmypi self-assigned this Aug 7, 2025
@gojimmypi
Copy link
Contributor Author

Jenkins retest this please

For AgentOfflineException: Unable to create live FilePath for wolf-linux-cloud-node-[n]; wolf-linux-cloud-node-[n]was marked offline: Connection was broken

@douzzer douzzer merged commit 46394f3 into wolfSSL:master Aug 9, 2025
316 of 317 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.

4 participants