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

Guard WPA Enterprise support #10616

Draft
wants to merge 4 commits into
base: release/v3.1.x
Choose a base branch
from

Conversation

Jason2866
Copy link
Collaborator

enable WPA Enterprise code part only if support is there in the compiled Arduino libs.

Follow up of #10609

@me-no-dev

Copy link
Contributor

github-actions bot commented Nov 18, 2024

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Guard WPA Enterprise support":
    • summary looks empty
    • type/action looks empty
  • the commit message "fix guard start and end":
    • summary looks empty
    • type/action looks empty
  • the commit message "guard WIFI_ENTERPRISE_SUPPORT":
    • summary looks empty
    • type/action looks empty
  • the commit message "wrong part guarded":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 20 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

⚠️
	The **target branch** for this Pull Request **must be the default branch** of the project (`master`).

	If you would like to add this feature to a different branch, please state this in the PR description and we will consider it.
Messages
📖 You might consider squashing your 4 commits (simplifying branch history).

👋 Hello Jason2866, 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.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- Addressing info messages (📖) is strongly recommended; they're less critical but valuable.
- 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 5cb6b50

Copy link
Contributor

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
ESP32P4000.000.00000.000.00
ESP32S30‼️ +23K0.00‼️ +2.440‼️ +3K0.00‼️ +7.18
ESP32S20‼️ +19K0.00‼️ +2.090‼️ +3K0.00‼️ +7.32
ESP32C30‼️ +28K0.00‼️ +2.790‼️ +2K0.00‼️ +6.97
ESP32C60‼️ +43K0.00‼️ +4.780‼️ +25K0.00‼️ +62.95
ESP320‼️ +23K0.00‼️ +2.300⚠️ +18160.00‼️ +4.15
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32P4ESP32S3ESP32S2ESP32C3ESP32C6ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
WiFi/examples/FTM/FTM_Initiator--‼️ +19K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +19K⚠️ +1808
WiFi/examples/FTM/FTM_Responder--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +19K⚠️ +1808
WiFi/examples/SimpleWiFiServer--‼️ +20K‼️ +3K‼️ +15K‼️ +2K‼️ +23K‼️ +2K‼️ +42K‼️ +25K‼️ +19K⚠️ +1792
WiFi/examples/WiFiAccessPoint--‼️ +20K‼️ +3K‼️ +15K‼️ +2K‼️ +23K‼️ +2K‼️ +42K‼️ +25K‼️ +19K⚠️ +1792
WiFi/examples/WiFiClient--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +42K‼️ +24K‼️ +19K⚠️ +1808
WiFi/examples/WiFiClientBasic--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +42K‼️ +24K‼️ +19K⚠️ +1808
WiFi/examples/WiFiClientConnect--‼️ +18K‼️ +3K‼️ +14K‼️ +2K‼️ +20K⚠️ +1736‼️ +36K‼️ +3K‼️ +18K⚠️ +1792
WiFi/examples/WiFiClientEvents--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +19K⚠️ +1808
WiFi/examples/WiFiClientStaticIP--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +42K‼️ +24K‼️ +19K⚠️ +1792
WiFi/examples/WiFiExtender--‼️ +19K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +19K⚠️ +1792
WiFi/examples/WiFiIPv6--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +23K‼️ +2048‼️ +42K‼️ +24K‼️ +19K⚠️ +1792
WiFi/examples/WiFiMulti--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +18K⚠️ +1808
WiFi/examples/WiFiMultiAdvanced--‼️ +22K‼️ +3K‼️ +18K‼️ +3K‼️ +25K⚠️ +2032‼️ +41K‼️ +24K‼️ +21K⚠️ +1788
WiFi/examples/WiFiScan--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +19K⚠️ +1808
WiFi/examples/WiFiScanAsync--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +19K⚠️ +1808
WiFi/examples/WiFiScanDualAntenna--‼️ +20K‼️ +3K‼️ +17K‼️ +3K‼️ +23K⚠️ +2040‼️ +39K‼️ +3K‼️ +19K⚠️ +1816
WiFi/examples/WiFiScanTime--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +19K⚠️ +1808
WiFi/examples/WiFiTelnetToSerial--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2024‼️ +42K‼️ +24K‼️ +19K⚠️ +1776
WiFi/examples/WiFiUDPClient--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K‼️ +2048‼️ +42K‼️ +24K‼️ +19K⚠️ +1808
WiFi/examples/WPS--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +18K⚠️ +1792
WiFi/examples/WiFiBlueToothSwitch--‼️ +18K‼️ +3K--‼️ +21K⚠️ +1728‼️ +37K‼️ +3K‼️ +19K⚠️ +1788
WiFi/examples/WiFiClientEnterprise--‼️ +23K‼️ +3K‼️ +19K‼️ +3K‼️ +28K⚠️ +2040‼️ +43K‼️ +24K‼️ +23K⚠️ +1792
WiFi/examples/WiFiSmartConfig--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K‼️ +18K⚠️ +1792

Copy link
Contributor

github-actions bot commented Nov 18, 2024

Test Results

 62 files   62 suites   7m 47s ⏱️
 22 tests  21 ✅ 0 💤 1 ❌
144 runs  143 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 5cb6b50.

♻️ This comment has been updated with latest results.

@Jason2866
Copy link
Collaborator Author

@me-no-dev Something is wrong idk. Get compile error when switching off "Enterprise" support.

/Users/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/WiFi/src/WiFiSTA.cpp:66:13: error: no declaration matches 'wl_status_t WiFiSTAClass::begin(const char*, wpa2_auth_method_t, const char*, const char*, const char*, const char*, const char*, const char*, int, int32_t, const uint8_t*, bool)'
   66 | wl_status_t WiFiSTAClass::begin(
      |             ^~~~~~~~~~~~
In file included from /Users/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/WiFi/src/WiFi.h:34,
                 from /Users/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/WiFi/src/WiFiSTA.cpp:25:
/Users/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/WiFi/src/WiFiSTA.h:136:15: note: candidates are: 'wl_status_t WiFiSTAClass::begin()'
  136 |   wl_status_t begin();
      |               ^~~~~
/Users/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/WiFi/src/WiFiSTA.h:133:15: note:                 'wl_status_t WiFiSTAClass::begin(const String&, const String&, int32_t, const uint8_t*, bool)'
  133 |   wl_status_t begin(const String &ssid, const String &passphrase = (const char *)NULL, int32_t channel = 0, const uint8_t *bssid = NULL, bool connect = true) {
      |               ^~~~~
/Users/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/WiFi/src/WiFiSTA.h:132:15: note:                 'wl_status_t WiFiSTAClass::begin(const char*, const char*, int32_t, const uint8_t*, bool)'
  132 |   wl_status_t begin(const char *ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t *bssid = NULL, bool connect = true);
      |               ^~~~~
/Users/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/libraries/WiFi/src/WiFiSTA.h:110:7: note: 'class WiFiSTAClass' defined here
  110 | class WiFiSTAClass {
      |       ^~~~~~~~~~~~

@Jason2866 Jason2866 marked this pull request as draft November 19, 2024 15:21
@Jason2866
Copy link
Collaborator Author

Need to guard this part too?

wl_status_t WiFiSTAClass::begin(
const char *wpa2_ssid, wpa2_auth_method_t method, const char *wpa2_identity, const char *wpa2_username, const char *wpa2_password, const char *ca_pem,
const char *client_crt, const char *client_key, int ttls_phase2_type, int32_t channel, const uint8_t *bssid, bool connect
) {
if (!STA.begin()) {
return WL_CONNECT_FAILED;
}
if (!STA.connect(wpa2_ssid, method, wpa2_identity, wpa2_username, wpa2_password, ca_pem, client_crt, client_key, ttls_phase2_type, channel, bssid, connect)) {
return WL_CONNECT_FAILED;
}
return STA.status();
}

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