Skip to content

Conversation

@adrojaankur
Copy link
Contributor

Change-Id: I9b82b42a95204e83bb41e257954628f35b476a30
Signed-off-by: Ankur Adroja Ankur_Adroja@comcast.com

Change-Id: I9b82b42a95204e83bb41e257954628f35b476a30
@adrojaankur adrojaankur requested a review from a team as a code owner December 26, 2025 06:39
Copilot AI review requested due to automatic review settings January 20, 2026 13:03
Copy link
Contributor

Copilot AI left a 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);
Copy link

Copilot AI Jan 20, 2026

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.

Suggested change
pEngine = rdkcertselector_getEngine(curlCertSelector);
pEngine = rdkcertselector_getEngine(thisCertSel);

Copilot uses AI. Check for mistakes.
goto child_cleanReturn;
} else {
code = curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L);
if(code != CURLE_OK )
Copy link

Copilot AI Jan 20, 2026

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.

Suggested change
if(code != CURLE_OK )
if(code != CURLE_OK)

Copilot uses AI. Check for mistakes.
Comment on lines +448 to +452
pEngine = rdkcertselector_getEngine(curlCertSelector);
if(pEngine != NULL)
{
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL);
}
Copy link

Copilot AI Jan 20, 2026

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.

Suggested change
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);
}

Copilot uses AI. Check for mistakes.
goto child_cleanReturn;
}
#ifdef LIBRDKCERTSEL_BUILD
if(pEngine != NULL)
Copy link

Copilot AI Jan 20, 2026

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.

Suggested change
if(pEngine != NULL)
if(pEngine != NULL)

Copilot uses AI. Check for mistakes.
@shibu-kv
Copy link
Contributor

Closing stale reviews older than 30 days

@shibu-kv shibu-kv closed this Jan 22, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2026
@shibu-kv shibu-kv deleted the topic/RDKB-62352 branch January 22, 2026 18:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants