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

feat(pre_encrypted_ota): Added HTTPS server in pytest #461

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hrushikesh430
Copy link
Collaborator

  1. Added the python based HTTPS server in pytest to start the https server locally.
  2. Updated the README.md file

Description

  1. Added the python based HTTPS server in the pytest_pre_encrypted_ota.py file
  2. Updated the README.md file for this HTTPS server

@hrushikesh430 hrushikesh430 self-assigned this Dec 31, 2024
@hrushikesh430 hrushikesh430 marked this pull request as draft December 31, 2024 07:35
@hrushikesh430
Copy link
Collaborator Author

Hi @mahavirj, tested this server locally, with simple download as well as partial download. Both works fine. Used the same ca_cert.pem and ca_key.pem which is used esp_https_server.

@hrushikesh430 hrushikesh430 force-pushed the feat/add_local_server_in_esp_encrypted_ota_pytest branch from 4706b8d to 8428dcc Compare January 2, 2025 06:42
@hrushikesh430 hrushikesh430 marked this pull request as ready for review January 2, 2025 08:49
@hrushikesh430
Copy link
Collaborator Author

@mahavirj PTAL

@hrushikesh430 hrushikesh430 force-pushed the feat/add_local_server_in_esp_encrypted_ota_pytest branch from 8428dcc to a3d119e Compare January 6, 2025 12:27
@hrushikesh430
Copy link
Collaborator Author

@mahavirj Removed the certs directory from the tests dir, instead used server_cert dir for certs. And fixed some cosmetic changes in test_local_server_ota.c

@hrushikesh430 hrushikesh430 force-pushed the feat/add_local_server_in_esp_encrypted_ota_pytest branch from a3d119e to 3112760 Compare January 9, 2025 16:21
@hrushikesh430
Copy link
Collaborator Author

@mahavirj PTAL, updated the pytest and README.md file. In README.md mentioned about creating server_cert directory and certificates and if user do not pass the server_cert directory then script will use hardcoded certificates.

@hrushikesh430 hrushikesh430 force-pushed the feat/add_local_server_in_esp_encrypted_ota_pytest branch from 3112760 to 39f6f86 Compare January 10, 2025 07:23
1. Added the python based HTTPS server in pytest to start the https
server locally.
2. Updated the README.md file
3. Fixed some cosmetic changes in test_local_server_ota.c
@hrushikesh430 hrushikesh430 force-pushed the feat/add_local_server_in_esp_encrypted_ota_pytest branch from 39f6f86 to 5f3d865 Compare January 10, 2025 08:43
@@ -8,4 +8,4 @@ CONFIG_ESP_HTTPS_OTA_DECRYPT_CB=y
# Certificate bundle configuration
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN=y
CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y
CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="server_certs/ca_cert.pem"
CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="main/tests/certs/servercert.pem"
Copy link
Member

Choose a reason for hiding this comment

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

Would the command from README update this file? If not, then how the new server certificate would be embedded on firmware side?

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