Skip to content

Conversation

@gojimmypi
Copy link
Contributor

@gojimmypi gojimmypi commented Aug 22, 2025

Description

Excludes examplec file wolfssl/certs_test.h from being included in Espressif user_settings.h file, introduced in #8813 .

See wolfSSL/wolfssh#826 (comment) .

The critical file needing the exclusion is the template reference example, used when publishing Managed Components. All examples updated here for consistency.

Note that I plan to publish an updated Espressif Managed Component for wolfssl: version 5.8.2~1. The new version number will not comply with Semantic Versioning. (note that's a tilde between the 2 and 1, not a minus sign). See instead the Espressif Versioning Documentation. The tilde is used for a version revision.

  • Edit: During code review the scope of the PR was modified to also exclude USE_CERT_BUFFERS_[n] macros from the user_settinghs.h files. See the respective client and server example apps that define as needed.

Fixes zd# n/a

Testing

How did you test?

Manually confirmed all examples still build properly.

Checklist

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

Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Fix in wolfSSH

@gojimmypi
Copy link
Contributor Author

gojimmypi commented Sep 3, 2025

Hi @dgarske -

I created wolfSSL/wolfssh#831 to rename the cert arrays in wolfSSH.

For consistency and safety, I renamed them all with _ssh suffix.

I also changed the sizeof from declarations to macros as noted in #9099 .

I'd like to keep this PR without the cert include in the user_settings.h file, as otherwise the wolfSSH component will not work.

See updated 5.8.2~1 Managed Component.

We may consider re-adding the include after the next release of wolfSSH, but there would always be a prior version problem.

Edit: Critical reason to NOT include certs_test.h in the user_settings.h

As a reminder, once published as a Managed Component, the respective contents of the component is locked to the source. Not even the user_settings.h can be modified without converting the component to a local, non-managed component.

There should never be a test file of any sort "baked in" to a final release.

See also:

@gojimmypi gojimmypi force-pushed the pr-espressif-certs-test branch 2 times, most recently from 52a37a4 to 19205ec Compare September 5, 2025 03:52
@gojimmypi gojimmypi requested a review from dgarske September 5, 2025 03:56
Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Reconsider PR

@dgarske dgarske removed their assignment Sep 5, 2025
@gojimmypi gojimmypi force-pushed the pr-espressif-certs-test branch from 19205ec to c22354e Compare September 6, 2025 00:08
@gojimmypi
Copy link
Contributor Author

Upon reconsidering this PR, I've expanded the scope of "remove wolfssl/certs_test.h from user_settinghs.h" to also remove all references of the cert-selection USE_CERT_BUFFERS_[n] macros in the user_settinghs.h for Espressif examples.

See the updated client-tls.h and server-tls-h that now offers a more flexible configuration for either test or user certificates:

/* This example uses wolfssl test certificates */
#if 1
    /* See wolfssl/certs_test.h */
    #if defined(CONFIG_IDF_TARGET_ESP32C2) || \
        defined(CONFIG_IDF_TARGET_ESP8684) || \
        defined(CONFIG_IDF_TARGET_ESP8266)
        /* Use smaller certs for low-memory devices */
        #define USE_CERT_BUFFERS_1024
    #else
        #define USE_CERT_BUFFERS_2048
    #endif

    /* always include smallest testing 32 byte RSA/ECC keys */
    #define USE_CERT_BUFFERS_256
#else
    /* define your own certificate macros; see user_settings.h */
#endif

@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

@dgarske dgarske merged commit 3e3b673 into wolfSSL:master Sep 9, 2025
253 of 254 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.

3 participants