Skip to content
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,27 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [3.0.8](https://github.com/rdkcentral/sysint/compare/3.0.7...3.0.8)

- RDKE-900 RDKEMW-4899: Default to MTLS connection on all endpoints [`#322`](https://github.com/rdkcentral/sysint/pull/322)
- Rebase with develop [`#336`](https://github.com/rdkcentral/sysint/pull/336)
- Rebase with develop [`#329`](https://github.com/rdkcentral/sysint/pull/329)
- Rebase with develop [`#328`](https://github.com/rdkcentral/sysint/pull/328)
- Rebase with develop [`#325`](https://github.com/rdkcentral/sysint/pull/325)
- Rebase with develop [`#324`](https://github.com/rdkcentral/sysint/pull/324)
- Merge tag '3.0.7' into develop [`e3c6a47`](https://github.com/rdkcentral/sysint/commit/e3c6a4787fe5546e11041d61c21036cb15589c10)

#### [3.0.7](https://github.com/rdkcentral/sysint/compare/3.0.6...3.0.7)

> 10 October 2025

- RDKEMW-8559 : Remove Box reboot counter reset services [`#312`](https://github.com/rdkcentral/sysint/pull/312)
- RDKEMW-7549 : Increase in SYST_WARN_WiFiNotConn marker [`#310`](https://github.com/rdkcentral/sysint/pull/310)
- RDK-58220 : [RDKE] Migrate Functionality In TR-69Hostif And NTP Scripts To Core Modules [`#326`](https://github.com/rdkcentral/sysint/pull/326)
- RDKE-921: Clean up the mitigation done for dnsmasq restart in Xumo TV Release [`#313`](https://github.com/rdkcentral/sysint/pull/313)
- 3.0.7 release changelog updates [`73ff4a8`](https://github.com/rdkcentral/sysint/commit/73ff4a86d62643f29ed8eaed62bd626108cc4347)
- Merge tag '3.0.6' into develop [`a629329`](https://github.com/rdkcentral/sysint/commit/a62932911b81aa5663e739f49081806c5029e1d4)
- RDK-58220 Migrate Functionality In TR-69Hostif Scripts To Core Modules [`fa122a3`](https://github.com/rdkcentral/sysint/commit/fa122a391e1d594901a89b03de18589c8b7fa6a2)
- Update NM_Dispatcher.sh [`a496e69`](https://github.com/rdkcentral/sysint/commit/a496e69fcbe97662eca9372e582bb92a6a2fc435)

#### [3.0.6](https://github.com/rdkcentral/sysint/compare/3.0.5...3.0.6)

Expand Down
13 changes: 0 additions & 13 deletions lib/rdk/Start_MaintenanceTasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,6 @@ logUploadLog()
}

# Utility Function
checkXpkiMtlsBasedLogUpload()
{
dycredpath="/opt/lxy"
if [ -d "$dycredpath" ] && [ -f "/usr/bin/rdkssacli" ] && { [ -f "/opt/certs/devicecert_1.pk12" ] || [ -f "/etc/ssl/certs/staticXpkiCrt.pk12" ]; }; then
useXpkiMtlsLogupload="true"
else
useXpkiMtlsLogupload="false"
fi
logUploadLog "xpki based mtls support = $useXpkiMtlsLogupload"
}

runMaintenanceRFCTask()
{
if [ -f "$RFC_BIN" ]; then
Expand Down Expand Up @@ -143,7 +132,6 @@ runMaintenanceLogUploadTask()
{
# On Demand Log Upload and other initializations
ON_DEMAND_LOG_UPLOAD=5
useXpkiMtlsLogupload=false
TriggerType=$2 # Marked OnDemand LogUpload for second arg
tftp_server=$LOG_SERVER # from dcm.properties

Expand All @@ -166,7 +154,6 @@ runMaintenanceLogUploadTask()
logUploadLog "'LogUploadSettings:UploadRepository:URL' is not found in DCMSettings.conf"
fi

checkXpkiMtlsBasedLogUpload
if [ "$BUILD_TYPE" != "prod" ] && [ -f /opt/dcm.properties ]; then
logUploadLog "opt override is present. Ignore settings from Bootstrap config"
else
Expand Down
20 changes: 14 additions & 6 deletions lib/rdk/UploadLogsNow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Copyright 2020 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");

Check failure on line 8 in lib/rdk/UploadLogsNow.sh

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'lib/rdk/UploadLogsNow.sh' (Match: rdkb/devices/raspberrypi/sysint/rdkb/devices/raspberrypi/sysint/1, 167 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/devices/raspberrypi/sysint/+archive/RDKB-RELEASE-TEST-DUNFELL-1.tar.gz, file: lib/rdk/uploadSTBLogs.sh)
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
Expand All @@ -31,6 +31,11 @@
. $RDK_PATH/interfaceCalls.sh
fi

if [ -f /lib/rdk/exec_curl_mtls.sh ]
then
source /lib/rdk/exec_curl_mtls.sh
fi

MAC=`getMacAddressOnly`
dt=`date "+%m-%d-%y-%I-%M%p"`
LOG_FILE=$MAC"_Logs_$dt.tgz"
Expand Down Expand Up @@ -93,16 +98,19 @@
EnableOCSP="/tmp/.EnableOCSPCA"

if [ -f $EnableOCSPStapling ] || [ -f $EnableOCSP ]; then
CURL_CMD="curl -w '%{http_code}\n' -d \"filename=$1\" -o \"$FILENAME\" \"$CLOUD_URL\" --cert-status --connect-timeout 10 -m 10"
CURL_CMD=" -w '%{http_code}\n' -d \"filename=$1\" -o \"$FILENAME\" \"$CLOUD_URL\" --cert-status --connect-timeout 10 -m 10"
else
CURL_CMD="curl -w '%{http_code}\n' -d \"filename=$1\" -o \"$FILENAME\" \"$CLOUD_URL\" --connect-timeout 10 -m 10"
CURL_CMD=" -w '%{http_code}\n' -d \"filename=$1\" -o \"$FILENAME\" \"$CLOUD_URL\" --connect-timeout 10 -m 10"
fi
echo "`/bin/timestamp` MTLS defaulted" >> $LOG_PATH/dcmscript.log
msg_tls_source="mTLS certificate from xPKI"
echo "`/bin/timestamp` Connect with $msg_tls_source" >> $LOG_PATH/dcmscript.log
echo "`/bin/timestamp` URL_CMD: $CURL_CMD" >> $LOG_PATH/dcmscript.log

retries=0
while [ "$retries" -lt 3 ]
do
ret= eval $CURL_CMD > $HTTP_CODE
ret=` exec_curl_mtls "$CURL_CMD" "echo"`
http_code=$(awk -F\" '{print $1}' $HTTP_CODE)
if [ $http_code -eq 200 ];then
break
Expand All @@ -117,13 +125,13 @@
#Get the url from FILENAME
NewUrl=$(awk -F\" '{print $1}' $FILENAME)
if [ -f $EnableOCSPStapling ] || [ -f $EnableOCSP ]; then
CURL_CMD="curl -w '%{http_code}\n' -T \"$1\" -o \"$FILENAME\" \"$NewUrl\" --cert-status --connect-timeout 60 -m 120 -v"
CURL_CMD=" -w '%{http_code}\n' -T \"$1\" -o \"$FILENAME\" \"$NewUrl\" --cert-status --connect-timeout 60 -m 120 -v"
else
CURL_CMD="curl -w '%{http_code}\n' -T \"$1\" -o \"$FILENAME\" \"$NewUrl\" --connect-timeout 60 -m 120 -v"
CURL_CMD=" -w '%{http_code}\n' -T \"$1\" -o \"$FILENAME\" \"$NewUrl\" --connect-timeout 60 -m 120 -v"
fi
echo "`/bin/timestamp` URL_CMD: $CURL_CMD" >> $LOG_PATH/dcmscript.log

ret= eval $CURL_CMD > $HTTP_CODE
ret=` exec_curl_mtls "$CURL_CMD" "echo"`
http_code=$(awk -F\" '{print $1}' $HTTP_CODE)
if [ $http_code -eq 200 ];then
result=0
Expand Down
32 changes: 7 additions & 25 deletions lib/rdk/uploadSTBLogs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ TLS=""
CLOUD_URL=""
CURL_TLS_TIMEOUT=30
CURL_TIMEOUT=10
useXpkiMtlsLogupload=false
encryptionEnable=false
CB_NUM_UPLOAD_ATTEMPTS=1
DIRECT_BLOCK_FILENAME="/tmp/.lastdirectfail_upl"
Expand Down Expand Up @@ -156,15 +155,6 @@ flock -n 200 || {
exit 1
}


#MTLS Upload Check
checkXpkiMtlsBasedLogUpload()
{
useXpkiMtlsLogupload=$(check_MtlsBasedLogUpload)
uploadLog "xpki based mtls support = $useXpkiMtlsLogupload"
}


#Direct and Codebig Communication Functions
IsDirectBlocked()
{
Expand Down Expand Up @@ -359,24 +349,16 @@ sendTLSSSRRequest()
if [ "$S3_MD5SUM" != "" ]; then
URLENCODE_STRING="--data-urlencode \"md5=$S3_MD5SUM\""
fi

uploadLog "Attempting $TLS connection to SSR server"
checkXpkiMtlsBasedLogUpload

uploadLog "Log Upload requires Mutual Authentication"
if [ "$useXpkiMtlsLogupload" == "true" ]; then
msg_tls_source="mTLS certificate from xPKI"
uploadLog "Connect with $msg_tls_source"
t2CountNotify "SYST_INFO_mtls_xpki"
CURL_CMD="-w '%{http_code} %{remote_ip} %{remote_port}\n' -d \"filename=$1\" $URLENCODE_STRING -o \"$FILENAME\" \"$CLOUD_URL\" --connect-timeout $CURL_TLS_TIMEOUT -m 10"
fi
uploadLog "MTLS defaulted"
msg_tls_source="mTLS certificate from xPKI"
uploadLog "Connect with $msg_tls_source"
t2CountNotify "SYST_INFO_mtls_xpki"
CURL_CMD="-w '%{http_code} %{remote_ip} %{remote_port}\n' -d \"filename=$1\" $URLENCODE_STRING -o \"$FILENAME\" \"$CLOUD_URL\" --connect-timeout $CURL_TLS_TIMEOUT -m 10"
if [ -f $EnableOCSPStapling ] || [ -f $EnableOCSP ]; then
CURL_CMD="$CURL_CMD --cert-status"
fi
if [ "$useXpkiMtlsLogupload" == "true" ]; then
TLSRet=` exec_curl_mtls "$CURL_CMD" "uploadLog"`
cat $HTTP_CODE > $CURL_INFO
fi
TLSRet=` exec_curl_mtls "$CURL_CMD" "uploadLog"`
cat $HTTP_CODE > $CURL_INFO
FQDN=`echo "$CLOUD_URL" |awk -F/ '{print $3}'`
http_code=$(awk '{print $1}' $CURL_INFO)
server_ip=$(awk '{print $2}' $CURL_INFO)
Expand Down
Loading