Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ssl): Add size arg to NetworkClientSecure::setCACertBundle #10101

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

me-no-dev
Copy link
Member

Fixes: #10099

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello me-no-dev, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against f350d16

@me-no-dev me-no-dev added the Status: Review needed Issue or PR is awaiting review label Aug 1, 2024
Copy link
Contributor

github-actions bot commented Aug 1, 2024

Test Results

 56 files   56 suites   4m 48s ⏱️
 21 tests  21 ✅ 0 💤 0 ❌
135 runs  135 ✅ 0 💤 0 ❌

Results for commit f350d16.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32S3000.000.00000.000.00
ESP32S2000.000.00000.000.00
ESP32C3000.000.00000.000.00
ESP32C6000.000.00000.000.00
ESP32000.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3ESP32S2ESP32C3ESP32C6ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
NetworkClientSecure/examples/WiFiClientInsecure0000000000
NetworkClientSecure/examples/WiFiClientPSK0000000000
NetworkClientSecure/examples/WiFiClientSecure0000000000
NetworkClientSecure/examples/WiFiClientSecureEnterprise0000000000
NetworkClientSecure/examples/WiFiClientSecureProtocolUpgrade0000000000
NetworkClientSecure/examples/WiFiClientShowPeerCredentials0000000000
NetworkClientSecure/examples/WiFiClientTrustOnFirstUse0000000000

@sidwarkd
Copy link

sidwarkd commented Aug 1, 2024

This is the change I made to get the bundle working 👍

@P-R-O-C-H-Y P-R-O-C-H-Y added Status: Pending Merge Pull Request is ready to be merged Area: Libraries Issue is related to Library support. and removed Status: Review needed Issue or PR is awaiting review labels Aug 1, 2024
@me-no-dev me-no-dev merged commit 23b84e5 into master Aug 1, 2024
72 of 86 checks passed
@me-no-dev me-no-dev deleted the bugfix/ca_cert_bundle branch August 1, 2024 12:06
@waymond91
Copy link

Hey I know this is off topic, but Im really struggling to include <NetworkClientSecure.h> in my platformio project with the esp32s3. I figured I would post here as this seems to be where a lot of the activity surrounding that particular library is...

#include <NetworkClientSecure.h>
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/adafruit_feather_esp32s3_nopsram/FrameworkArduino/esp32-hal-matrix.c.o
*** [.pio/build/adafruit_feather_esp32s3_nopsram/src/main.cpp.o] Error 1
=============================== [FAILED] Took 2.52 seconds ===============================

 *  The terminal process "platformio 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

I assume this is because platformio is using a version of arduino-esp32 from before the release of NetworkClientSecure in version 3.

But Im not sure how to check the arduino-esp32 release version used, and have been unable to set it.

Or I must be fundamentally misunderstanding how to include this library in my project.

platformio.ini

[env:adafruit_feather_esp32s3_nopsram]
platform = espressif32
board = adafruit_feather_esp32s3_nopsram
framework = arduino

Trying to get some info on the package doesnt seem to give me the release version

➜  EthernetESP32 pio pkg show framework-arduinoespressif32


platformio/framework-arduinoespressif32
Tool • 3.20017.0 • Public • Published on Thu Jun  6 12:59:43 2024

Arduino Wiring-based Framework for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs

--------------  -----------------------------------------------------------------------------
Registry        https://registry.platformio.org/tools/platformio/framework-arduinoespressif32
Repository      https://github.com/espressif/arduino-esp32.git
License         LGPL-2.1-or-later
Popularity      4
Stars           12810
Installed Size  735.92MB
Used By         1
Keywords        framework, arduino, espressif, esp32
--------------  -----------------------------------------------------------------------------

Version         Size      Published
--------------  --------  -------------------
3.20017.0       234.94MB  2024-06-06 12:59:43
3.20016.0       234.88MB  2024-05-03 12:56:33
3.20015.0       234.91MB  2024-04-24 16:04:36
3.20014.231204  232.70MB  2023-12-05 13:53:42
3.20011.230801  230.78MB  2023-08-01 16:20:44
3.20009.0       258.04MB  2023-05-09 09:50:22
3.20008.0       258.04MB  2023-04-21 09:27:00
3.20007.0       258.02MB  2023-02-24 14:02:47
3.20006.221224  244.29MB  2022-12-24 16:18:14
3.20005.220925  240.61MB  2022-09-26 12:49:21
3.20004.0       239.64MB  2022-07-19 10:35:53
3.20003.220626  227.20MB  2022-06-27 07:53:21
3.20002.220503  139.04MB  2022-05-03 11:58:35
3.20001.0       136.34MB  2022-04-20 10:38:15
3.20000.220418  127.40MB  2022-04-20 10:25:09
3.10006.210326  46.77MB   2021-03-26 11:55:41
3.10004.210126  33.32MB   2021-01-26 14:17:52

main.cpp

#include <Arduino.h>
#include <NetworkClientSecure.h>

// put function declarations here:
int myFunction(int, int);

void setup() {
  // put your setup code here, to run once:
  int result = myFunction(2, 3);
}

void loop() {
  // put your main code here, to run repeatedly:
}

// put function definitions here:
int myFunction(int x, int y) {
  return x + y;
}

@me-no-dev
Copy link
Member Author

@waymond91 NetworkClientSecure requires Arduino v3.x, but PlatformIO officially supports up to 2.0.17 (that you are on).
@Jason2866 can help you with your config to get the latest version in PlatformIO

@Jason2866
Copy link
Collaborator

@waymond91 Core 3.0.x is not supported from Platformio. There is the community version pioarduino to support espressif Arduino core 3.0.4. You can use with Platformio with this setting for the platform.

platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip

@waymond91
Copy link

Thank you so much both! You deserve about half my weeks wages 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Libraries Issue is related to Library support. Status: Pending Merge Pull Request is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NetworkClientSecure::setCACertBundle Improperly Implemented
5 participants