RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec … - #254
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec …#254rosemarybennyy wants to merge 21 commits into
Conversation
…Integration (#249) * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download * Update project.md * Update project.md * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Spec generation for this user story with openspec * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Adding RFC feature gate * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass - unittests fix * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass - update on task.md * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-Artifact Download Orchestration * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-Artifact Download Orchestration * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-artifact selective retry (max 3) * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - upated with directCDN daigram * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1 failure fix * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1 failure fix * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1 * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-CI build failure fix * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments * Update rdkv_main.c * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- after addressing comments, L1 fix * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec Integration-peripheral issue * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec Integration-peripheral issue * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- statered Fix * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- statered Fix * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- PR cleanedup * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update rdkv_upgrade.c * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update rdkv_upgrade.c * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update rdkv_main.c * Update rdkv_upgrade.c * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-Legacy StateRed Fix * Revert "RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-Legacy StateRed Fix" This reverts commit 4357d6d. --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
This pull request adds an RFC-gated “Direct CDN” firmware download path (intended to support HTTPS/CDN URLs and bypass Codebig), wires it into both the one-shot upgrader and the D-Bus daemon flows, and extends unit tests and OpenSpec documentation to cover the new behavior.
Changes:
- Introduces
isDirectCDNEnabled()(RFC parameterSWDLDirect.Enable) and uses it to branch XConf URL paths (/xconf/firmware/stb/vs/xconf/swu/stb) and bypass Codebig access probing. - Extends XConf response parsing to capture per-artifact download URLs and adds a
DirectCDNDownload()orchestrator +direct_cdncontext flag to skip Codebig fallback. - Adds/updates unit tests, mocks, and build wiring to validate Direct CDN behavior and state-red retry propagation.
Reviewed changes
Copilot reviewed 106 out of 106 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| unittest/rdkFwupdateMgr_handlers_gtest.cpp | Adds handler-level tests validating direct_cdn propagation in XConf fetch context. |
| unittest/mocks/rdkFwupdateMgr_mock.h | Extends fwupdate manager mock interface with isDirectCDNEnabled(). |
| unittest/mocks/rdkFwupdateMgr_mock.cpp | Adds C-linkage stub for isDirectCDNEnabled() routed to the mock. |
| unittest/mocks/deviceutils_mock.h | Extends DeviceUtils mock interface with isDirectCDNEnabled(). |
| unittest/mocks/deviceutils_mock.cpp | Adds isDirectCDNEnabled() stub (guarded) and getPeripheralProduct() stub for handler-only builds. |
| unittest/mocks/device_status_helper_mock.h | Fixes C/C++ include boundary for RFC header and extends mock with isDirectCDNEnabled(); updates write_RFCProperty signature. |
| unittest/mocks/device_status_helper_mock.cpp | Updates write_RFCProperty wrapper signature and adds isDirectCDNEnabled() wrapper. |
| unittest/mocks/dbus_handlers_gmock.h | Extends RFC interface gmock with isDirectCDNEnabled(). |
| unittest/mocks/dbus_handlers_gmock.cpp | Adds RFC mock implementation of isDirectCDNEnabled() for D-Bus handler tests. |
| unittest/Makefile.am | Links directcdn.c into rdkfw_main_gtest. |
| unittest/fwdl_interface_gtest.cpp | Updates RFC parameter call counts and adds unit tests for isDirectCDNEnabled() behavior. |
| unittest/deviceutils/device_api_gtest.cpp | Adds tests validating GetServURL() path branching under Direct CDN on/off and across bootstrap/xconf/recovery. |
| unittest/device_status_helper_gtest.cpp | Adds tests validating Codebig probe bypass when Direct CDN is enabled. |
| src/rfcInterface/rfcinterface.c | Reads/stores Direct CDN RFC in getRFCSettings() and implements isDirectCDNEnabled(). |
| src/rdkv_upgrade.c | Adds RDKV_UPGRADE_ERROR_STATE_RED propagation, Direct CDN skip of Codebig fallback, and Codebig entry guard in codebigdownloadFile(). |
| src/rdkv_main.c | Adds per-artifact mode to checkTriggerUpgrade(), adds Direct CDN main-flow branch, and guards against double uninitialize() on state red. |
| src/rdkFwupdateMgr.c | Updates checkTriggerUpgrade() signature usage in daemon main flow. |
| src/json_process.c | Adds Direct CDN conditional parsing for per-artifact URLs and adds PDRI filename substring validation. |
| src/include/rfcinterface.h | Extends Rfc_t with rfc_directcdn, adds RFC_DIRECTCDN, and declares isDirectCDNEnabled(). |
| src/include/rdkv_upgrade.h | Adds RDKV_UPGRADE_ERROR_STATE_RED and direct_cdn to RdkUpgradeContext_t. |
| src/include/rdkv_cdl.h | Adds DIRECT_CDN_RETRY_ERR, LEGACY_ALL_UPGRADE, updates checkTriggerUpgrade() signature, and declares DirectCDNDownload(). |
| src/include/json_process.h | Extends XCONFRES with per-artifact URL fields (firmwareUrl, pdriUrl, remCtrlUrl). |
| src/directcdn.c | Adds DirectCDNDownload() orchestrator to perform XConf query + per-artifact downloads with selective retry. |
| src/deviceutils/deviceutils.h | Declares getPeripheralProduct() for dynamic peripheral key resolution. |
| src/deviceutils/deviceutils.c | Caches peripheral product name during BuildRemoteInfo() and provides getPeripheralProduct(). |
| src/deviceutils/device_api.c | Branches XConf server URL path selection based on isDirectCDNEnabled(). |
| src/device_status_helper.c | Bypasses Codebig probe when Direct CDN is enabled. |
| src/dbus/rdkv_dbus_server.c | Uses per-artifact URLs for downloads in Direct CDN mode and sets upgrade_ctx.direct_cdn. |
| src/dbus/rdkFwupdateMgr_handlers.c | Propagates direct_cdn into the XConf request context in handler flow. |
| openspec/subsystems/spec-boundaries.md | Adds OpenSpec subsystem prioritization guidance. |
| openspec/subsystems/client-library.md | Adds client library architecture documentation. |
| openspec/specs/test-mock-isolation/spec.md | Adds a spec describing test mock isolation requirements. |
| openspec/specs/direct-cdn-download/spec.md | Adds a spec capturing Direct CDN behavior (RFC gate, URL branching, parsing, bypass, etc.). |
| openspec/runtime/rdkvfwupgrader-lifecycle.md | Documents the one-shot binary lifecycle and flow. |
| openspec/runtime/rdkFwupdateMgr-lifecycle.md | Documents the daemon lifecycle and request processing model. |
| openspec/runtime/firmware-update-flows.md | Adds end-to-end sequence diagrams for update flows. |
| openspec/gaps-and-unknowns.md | Adds a “gaps/unknowns” tracking document for validation needs. |
| openspec/config.yaml | Adds OpenSpec configuration scaffold. |
| openspec/changes/fix-state-red-dual-instance-race/tasks.md | Adds task breakdown for state-red retry propagation change. |
| openspec/changes/fix-state-red-dual-instance-race/specs/retry-recovery/spec.md | Adds/updates delta spec for skipping retries/fallback after state red entry. |
| openspec/changes/fix-state-red-dual-instance-race/specs/operational-safety/spec.md | Adds/updates delta spec for operational safety on state red entry. |
| openspec/changes/fix-state-red-dual-instance-race/proposal.md | Adds change proposal for state-red dual-instance race fix. |
| openspec/changes/fix-state-red-dual-instance-race/design.md | Adds design notes/decisions for the state-red fix. |
| openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/tasks.md | Archives prior tasks for fixing L1 dangling mock segfault issue. |
| openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/specs/test-mock-isolation/spec.md | Archives prior delta spec for test mock isolation. |
| openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/proposal.md | Archives prior proposal for dangling mock segfault fix. |
| openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/design.md | Archives prior design notes for dangling mock segfault fix. |
| openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/.openspec.yaml | Archives prior OpenSpec metadata. |
| openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/tasks.md | Archives prior Direct CDN parity guard tasks. |
| openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/specs/retry-recovery/spec.md | Archives prior delta spec for Direct CDN retry parity. |
| openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/specs/firmware-validation/spec.md | Archives prior delta spec for PDRI normalization parity. |
| openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/specs/download-engine/spec.md | Archives prior delta spec for Codebig entry guard parity. |
| openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/proposal.md | Archives prior proposal for Direct CDN parity guards. |
| openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/.openspec.yaml | Archives prior OpenSpec metadata. |
| openspec/changes/archive/2026-06-04-direct-cdn-adoption/tasks.md | Archives prior Direct CDN adoption tasks. |
| openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/updater-execution/spec.md | Archives prior delta spec for Direct CDN integration in execution flow. |
| openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/retry-recovery/spec.md | Archives prior delta spec for Direct CDN retry policy. |
| openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/firmware-validation/spec.md | Archives prior delta spec for enriched parsing and PDRI validation. |
| openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/download-engine/spec.md | Archives prior delta spec for Direct CDN download engine behavior. |
| openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/direct-cdn-download/spec.md | Archives prior comprehensive delta spec for Direct CDN feature. |
| openspec/changes/archive/2026-06-04-direct-cdn-adoption/proposal.md | Archives prior proposal for Direct CDN adoption. |
| openspec/changes/archive/2026-06-04-direct-cdn-adoption/.openspec.yaml | Archives prior OpenSpec metadata. |
| Makefile.am | Links directcdn.c into both rdkvfwupgrader and rdkFwupdateMgr binaries. |
| .github/skills/openspec-verify-change/SKILL.md | Adds OpenSpec “verify change” workflow skill documentation. |
| .github/skills/openspec-sync-specs/SKILL.md | Adds OpenSpec “sync specs” workflow skill documentation. |
| .github/skills/openspec-propose/SKILL.md | Adds OpenSpec “propose change” workflow skill documentation. |
| .github/skills/openspec-new-change/SKILL.md | Adds OpenSpec “new change” workflow skill documentation. |
| .github/skills/openspec-ff-change/SKILL.md | Adds OpenSpec “fast-forward artifact creation” workflow skill documentation. |
| .github/skills/openspec-continue-change/SKILL.md | Adds OpenSpec “continue change” workflow skill documentation. |
| .github/skills/openspec-bulk-archive-change/SKILL.md | Adds OpenSpec “bulk archive changes” workflow skill documentation. |
| .github/skills/openspec-archive-change/SKILL.md | Adds OpenSpec “archive change” workflow skill documentation. |
| .github/skills/openspec-apply-change/SKILL.md | Adds OpenSpec “apply/implement change” workflow skill documentation. |
| .github/prompts/opsx-verify.prompt.md | Adds OPSX verify prompt for OpenSpec workflow. |
| .github/prompts/opsx-sync.prompt.md | Adds OPSX sync prompt for OpenSpec workflow. |
| .github/prompts/opsx-propose.prompt.md | Adds OPSX propose prompt for OpenSpec workflow. |
| .github/prompts/opsx-new.prompt.md | Adds OPSX new-change prompt for OpenSpec workflow. |
| .github/prompts/opsx-ff.prompt.md | Adds OPSX fast-forward prompt for OpenSpec workflow. |
| .github/prompts/opsx-explore.prompt.md | Adds OPSX explore-mode prompt. |
| .github/prompts/opsx-continue.prompt.md | Adds OPSX continue prompt. |
| .github/prompts/opsx-bulk-archive.prompt.md | Adds OPSX bulk-archive prompt. |
| .github/prompts/opsx-archive.prompt.md | Adds OPSX archive prompt. |
| .github/prompts/opsx-apply.prompt.md | Adds OPSX apply prompt. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ret = read_RFCProperty("DIRECTCDN", RFC_DIRECTCDN, data, sizeof(data)); | ||
| if(ret == -1) { | ||
| SWLOG_ERROR("getRFCSettings() rfc= %s failed Status %d\n", RFC_DIRECTCDN, ret); | ||
| }else { | ||
| strncpy(rfc_list->rfc_directcdn, data, RFC_VALUE_BUF_SIZE - 1); | ||
| rfc_list->rfc_directcdn[RFC_VALUE_BUF_SIZE - 1] = '\0'; | ||
| SWLOG_INFO("getRFCSettings() rfc DirectCDN= %s\n", rfc_list->rfc_directcdn); | ||
| } |
| else if (ret_curl_code == RDKV_UPGRADE_ERROR_STATE_RED) { | ||
| return RDKV_UPGRADE_ERROR_STATE_RED; | ||
| } |
| ### Requirement: State Red entry must not perform premature cleanup | ||
| The `checkAndEnterStateRed()` function SHALL NOT call `uninitialize()` or delete the PID file (`/tmp/DIFD.pid`). It SHALL only create the state red flag file (`/tmp/stateRedEnabled`), report telemetry/status, and return an error indicator. Process cleanup MUST remain the responsibility of the normal exit path in `main()`. |
| - After `checkAndEnterStateRed()` triggers state red entry, the process must NOT continue into retry/fallback logic — it must propagate the error immediately so the process exits cleanly | ||
| - `checkAndEnterStateRed()` will no longer call `uninitialize()` directly; cleanup responsibility stays with the normal exit path in `main()` | ||
| - A state-red-entered signal (return value) will be propagated from `dwnlError()` → `downloadFile()` → `rdkv_upgrade_request()` to short-circuit `retryDownload()` |
…CE_REBOOT instead of entering the Deep Sleep state. (#244) * RDKTV-40244:[EntOS] [8.3p15s2] [A4K] TV repeatedly triggers MAINTENANCE_REBOOT instead of entering the Deep Sleep state. * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * RDKTV-40244:[EntOS] [8.3p15s2] [A4K] TV repeatedly triggers MAINTENANCE_REBOOT instead of entering the Deep Sleep state. * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…rom rdm-versioned-packages.conf (#256)
| if (!g_DeviceUtilsMock) | ||
| { | ||
| cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl; | ||
| return NULL; // Return error code instead of NULL | ||
| } |
Direct CDN Feature
Direct CDN Feature
… for non-PROD builds (#258) * RDKEMW-20453: Support file override to install versioned RDM packages for non-PROD Co-authored-by: Saranya <saranya_elango@comcast.com>
| /** | ||
| * @brief Mock implementation of isDirectCDNEnabled | ||
| */ | ||
| bool isDirectCDNEnabled(void) { | ||
| if (mock_rfc_interface) { | ||
| return mock_rfc_interface->isDirectCDNEnabled(); | ||
| } | ||
| return false; | ||
| } |
| extern "C" int v_secure_system(const char *mode, ...) | ||
| { | ||
| if (!g_DeviceUtilsMock) | ||
| { | ||
| cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl; | ||
| return NULL; // Return error code instead of NULL | ||
| } |
| extern "C" int write_RFCProperty(char* type, const char *key, const char *value, RFCVALDATATYPE datatype) | ||
| { | ||
| if (!g_DeviceStatusMock) | ||
| { | ||
| cout << "GetEstbMac g_DeviceStatusMock object is NULL" << endl; | ||
| cout << "write_RFCProperty g_DeviceStatusMock object is NULL" << endl; | ||
| return 0; | ||
| } | ||
| printf("Inside Mock Function write_RFCProperty\n"); | ||
| return g_DeviceStatusMock->write_RFCProperty(key, value, datatype); | ||
| return g_DeviceStatusMock->write_RFCProperty(type, key, value, datatype); | ||
| } |
Release 1.8.1
Release 1.8.1
Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
| GetJsonVal( pJson, "additionalFwVerInfo", pResponse->cloudPDRIVersion, sizeof(pResponse->cloudPDRIVersion) ); | ||
| GetJsonVal( pJson, "delayDownload", pResponse->cloudDelayDownload, sizeof(pResponse->cloudDelayDownload) ); | ||
| GetJsonValContaining( pJson, "remCtrl", pResponse->peripheralFirmwares, sizeof(pResponse->peripheralFirmwares) ); | ||
|
|
||
| if (isDirectCDNEnabled()) { |
| if (!g_DeviceUtilsMock) | ||
| { | ||
| cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl; | ||
| return NULL; // Return error code instead of NULL | ||
| } |
1.8.2 release 1.8.2
…rader continues to emit log messages after RDKLOG deinit is reported (#266) * RDKEMW-20390:[RDK-E][Element] : When device is in state red, rdkfwupgrader continues to emit log messages after RDKLOG deinit is reported
| updateFWDownloadStatus(&fwdls, disableStatsUpdate); | ||
|
|
||
| uninitialize(INITIAL_VALIDATION_SUCCESS); | ||
| fp = fopen(STATEREDFLAG, "w"); | ||
| if(fp != NULL) { | ||
| fclose(fp); | ||
| } | ||
| SWLOG_ERROR("RED checkAndEnterStateRed: State red entered due to TLS/SSL error %d. Returning error to caller.\n", curlret); | ||
| return -1; | ||
| return RDKV_UPGRADE_ERROR_STATE_RED; |
| if (!g_DeviceUtilsMock) | ||
| { | ||
| cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl; | ||
| return NULL; // Return error code instead of NULL | ||
| } |
| (server_type == HTTP_SSR_DIRECT) ? setDwnlState(RDKV_FWDNLD_DOWNLOAD_FAILED) : setDwnlState(RDKV_XCONF_FWDNLD_DOWNLOAD_FAILED); | ||
| dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate); | ||
| int state_red_ret = dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate); | ||
| if (state_red_ret == RDKV_UPGRADE_ERROR_STATE_RED || isInStateRed() == 1) { |
Release 1.8.3
Release 1.8.3
| updateFWDownloadStatus(&fwdls, disableStatsUpdate); | ||
|
|
||
| uninitialize(INITIAL_VALIDATION_SUCCESS); | ||
| fp = fopen(STATEREDFLAG, "w"); | ||
| if(fp != NULL) { | ||
| fclose(fp); | ||
| } | ||
| SWLOG_ERROR("RED checkAndEnterStateRed: State red entered due to TLS/SSL error %d. Returning error to caller.\n", curlret); | ||
| return -1; | ||
| return RDKV_UPGRADE_ERROR_STATE_RED; |
| /** | ||
| * @brief Mock implementation of isDirectCDNEnabled | ||
| */ | ||
| bool isDirectCDNEnabled(void) { |
| extern "C" int v_secure_system(const char *mode, ...) | ||
| { | ||
| if (!g_DeviceUtilsMock) | ||
| { | ||
| cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl; | ||
| return NULL; // Return error code instead of NULL | ||
| } |
Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com> Co-authored-by: Satya Sundar Sahu <tinkusahu.com@gmail.com>
| SWLOG_ERROR("RED checkAndEnterStateRed: State red entered due to TLS/SSL error %d. Returning error to caller.\n", curlret); | ||
| return -1; | ||
| return RDKV_UPGRADE_ERROR_STATE_RED; |
| @@ -31,8 +32,13 @@ extern "C" int v_secure_system(const char *mode, ...) | |||
| cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl; | |||
| return NULL; // Return error code instead of NULL | |||
| (server_type == HTTP_SSR_DIRECT) ? setDwnlState(RDKV_FWDNLD_DOWNLOAD_FAILED) : setDwnlState(RDKV_XCONF_FWDNLD_DOWNLOAD_FAILED); | ||
| dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate); | ||
| int state_red_ret = dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate); | ||
| if (state_red_ret == RDKV_UPGRADE_ERROR_STATE_RED || isInStateRed() == 1) { |
| * @return int: RDKV_UPGRADE_ERROR_STATE_RED if state red entered, 0 otherwise | ||
| * */ | ||
| void dwnlError(int curl_code, int http_code, int server_type,const DeviceProperty_t *device_info,const char *lastrun,char *disableStatsUpdate) | ||
| int dwnlError(int curl_code, int http_code, int server_type,const DeviceProperty_t *device_info,const char *lastrun,char *disableStatsUpdate) |
…of develop (#276) Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
| extern "C" int v_secure_system(const char *mode, ...) | ||
| { | ||
| if (!g_DeviceUtilsMock) | ||
| { | ||
| cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl; | ||
| return NULL; // Return error code instead of NULL | ||
| } |
| (server_type == HTTP_SSR_DIRECT) ? setDwnlState(RDKV_FWDNLD_DOWNLOAD_FAILED) : setDwnlState(RDKV_XCONF_FWDNLD_DOWNLOAD_FAILED); | ||
| dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate); | ||
| int state_red_ret = dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate); | ||
| if (state_red_ret == RDKV_UPGRADE_ERROR_STATE_RED || isInStateRed() == 1) { |
| updateFWDownloadStatus(&fwdls, disableStatsUpdate); | ||
|
|
||
| uninitialize(INITIAL_VALIDATION_SUCCESS); | ||
| fp = fopen(STATEREDFLAG, "w"); | ||
| if(fp != NULL) { | ||
| fclose(fp); | ||
| } | ||
| SWLOG_ERROR("RED checkAndEnterStateRed: State red entered due to TLS/SSL error %d. Returning error to caller.\n", curlret); | ||
| return -1; | ||
| return RDKV_UPGRADE_ERROR_STATE_RED; |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 112 out of 112 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/device_status_helper.c:415
checkAndEnterStateRed()no longer creates the State Red flag file (STATEREDFLAG). SinceisInStateRed()is implemented asfilePresentCheck(STATEREDFLAG)(see same file), this change prevents State Red from ever being entered, even though the function returnsRDKV_UPGRADE_ERROR_STATE_RED.
unittest/mocks/deviceutils_mock.cpp:34- In
v_secure_system(), the NULL-mock path returnsNULLfrom a function that returnsint.NULLbecomes 0, which looks like success and can mask missing mock setup; it also contradicts the comment saying this is an error return.
…Integration (#249)
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download
Update project.md
Update project.md
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Spec generation for this user story with openspec
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Adding RFC feature gate
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass - unittests fix
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass - update on task.md
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-Artifact Download Orchestration
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-Artifact Download Orchestration
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-artifact selective retry (max 3)
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - upated with directCDN daigram
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1 failure fix
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1 failure fix
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-CI build failure fix
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments
Update rdkv_main.c
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- after addressing comments, L1 fix
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec Integration-peripheral issue
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec Integration-peripheral issue
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- statered Fix
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- statered Fix
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- PR cleanedup
Potential fix for pull request finding
Update rdkv_upgrade.c
Potential fix for pull request finding
Update rdkv_upgrade.c
Potential fix for pull request finding
Update rdkv_main.c
Update rdkv_upgrade.c
Potential fix for pull request finding
RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-Legacy StateRed Fix
Revert "RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-Legacy StateRed Fix"
This reverts commit 4357d6d.