-
Notifications
You must be signed in to change notification settings - Fork 20
RDKB-62352 : Telemetry crashe due to Open SSL engine #233
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
Conversation
Change-Id: I9b82b42a95204e83bb41e257954628f35b476a30
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request addresses a telemetry crash related to OpenSSL engine initialization (RDKB-62352). The fix adds proper OpenSSL crypto initialization when using SSL engines with curl, preventing crashes during certificate-based HTTPS connections.
Changes:
- Added OPENSSL_init_crypto call to prevent OpenSSL engine-related crashes
- Configured curl to use SSL engine when available via CURLOPT_SSLENGINE and CURLOPT_SSLENGINE_DEFAULT
- Added -lcrypto linker flag to resolve OpenSSL dependencies
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| source/protocol/http/curlinterface.c | Added OpenSSL crypto initialization and SSL engine configuration for curl when rdkcertselector engine is available |
| source/protocol/http/Makefile.am | Added -lcrypto linker flag for OpenSSL library dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if(childPid == 0) | ||
| { | ||
| #ifdef LIBRDKCERTSEL_BUILD | ||
| pEngine = rdkcertselector_getEngine(curlCertSelector); |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function uses curlCertSelector directly instead of thisCertSel. Earlier in the function (lines 354-361), thisCertSel is assigned to either curlRcvryCertSelector or curlCertSelector based on state_red_enable. This inconsistency means the engine will always be retrieved from the non-recovery selector, even when recovery mode is enabled. Change curlCertSelector to thisCertSel to ensure the correct selector is used based on the state.
| pEngine = rdkcertselector_getEngine(curlCertSelector); | |
| pEngine = rdkcertselector_getEngine(thisCertSel); |
| goto child_cleanReturn; | ||
| } else { | ||
| code = curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L); | ||
| if(code != CURLE_OK ) |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is extra whitespace after CURLE_OK before the closing parenthesis. Remove the trailing space for consistency with the surrounding code style.
| if(code != CURLE_OK ) | |
| if(code != CURLE_OK) |
| pEngine = rdkcertselector_getEngine(curlCertSelector); | ||
| if(pEngine != NULL) | ||
| { | ||
| OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL); | ||
| } |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation uses a mix of tabs and spaces. Lines 448-452 and 469 use tabs for indentation while the surrounding code uses spaces. This inconsistency can cause formatting issues and violates coding style best practices. Convert the tabs to spaces to match the indentation style of the rest of the file.
| pEngine = rdkcertselector_getEngine(curlCertSelector); | |
| if(pEngine != NULL) | |
| { | |
| OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL); | |
| } | |
| pEngine = rdkcertselector_getEngine(curlCertSelector); | |
| if(pEngine != NULL) | |
| { | |
| OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL); | |
| } |
| goto child_cleanReturn; | ||
| } | ||
| #ifdef LIBRDKCERTSEL_BUILD | ||
| if(pEngine != NULL) |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation uses a mix of tabs and spaces. Line 469 uses a tab for indentation while the surrounding code uses spaces. This inconsistency can cause formatting issues and violates coding style best practices. Convert the tab to spaces to match the indentation style of the rest of the file.
| if(pEngine != NULL) | |
| if(pEngine != NULL) |
|
Closing stale reviews older than 30 days |
Change-Id: I9b82b42a95204e83bb41e257954628f35b476a30
Signed-off-by: Ankur Adroja Ankur_Adroja@comcast.com