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

Replace HTML/JS files with python script for converting PEM to C string #63

Merged
merged 3 commits into from
May 12, 2023

Conversation

moninom1
Copy link
Member

@moninom1 moninom1 commented May 11, 2023

Description

Config tools are referencing jQuery versions older than 3.5.0 which is known to introduce Cross-Site Scripting and Prototype Pollution vulnerabilities in the application. Hence it is not recommended to be used.

This PR replaces the existing HTML tool (that configures PEM credentials as C formatted strings) with a python script.

usage: demo_config_generator.py [-h] -p PRIV_KEY_FILE -c CERT_FILE -r ROOT_CA_FILE -t THING_NAME -e ENDPOINT

Generate the demo_config.h file.

optional arguments:
  -h, --help            show this help message and exit
  -p PRIV_KEY_FILE, --priv-key-file PRIV_KEY_FILE
                        The path (relative or absolute) to Device Private Key file.
  -c CERT_FILE, --cert-file CERT_FILE
                        The path (relative or absolute) to Device Certificate File.
  -r ROOT_CA_FILE, --root-ca-file ROOT_CA_FILE
                        The path (relative or absolute) to the Server Root CA file.
  -t THING_NAME, --thing-name THING_NAME
                        The AWS IoT thing name.
  -e ENDPOINT, --endpoint ENDPOINT
                        The AWS IoT end point.

Sample Output :

===================================
Replace C:\workplace\coreMQTT-Agent-Demos\source\configuration-files\demo_config.h with C:\workplace\coreMQTT-Agent-Demos\lib\AWS\tools\aws_config_offline\demo_config.h.
===================================

moninom1 and others added 3 commits May 11, 2023 06:27
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
@moninom1 moninom1 merged commit 0a5b37a into FreeRTOS:main May 12, 2023
5 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.

None yet

3 participants