RDK-46686:Upgrade Flex-2.0 devices to use Thunder R4.4.1
Reason for change: In the latest ThunderClient libraries (R4.4.1) release, Metro has relocated the ICryptography.h and INetflixSecurity.h headers to the "interfaces" directory.
Additionally, there has been a modification in the code where the Cryptography class has been replaced with the Exchange class.
To prevent compilation errors in the Cobalt component during R4.4.1 builds, these changes need to be incorporated.
Test Procedure: Verify in Jenkin Build
Risks: High
Change-Id: I73249fd340082a6591236bd65a795304f1de8644
Signed-off-by: Thamim Razith <tabbas651@cable.comcast.com>
diff --git a/src/third_party/starboard/rdk/shared/system/system_sign_with_certification_secret_key.cc b/src/third_party/starboard/rdk/shared/system/system_sign_with_certification_secret_key.cc
index d7a7d78..aa929d4 100644
--- a/src/third_party/starboard/rdk/shared/system/system_sign_with_certification_secret_key.cc
+++ b/src/third_party/starboard/rdk/shared/system/system_sign_with_certification_secret_key.cc
@@ -63,7 +63,13 @@
bool result = false;
#if defined(HAS_CRYPTOGRAPHY)
+
+#if (THUNDER_VERSION_MAJOR > 4 || (THUNDER_VERSION_MAJOR == 4 && THUNDER_VERSION_MINOR >= 4))
+ using namespace WPEFramework::Exchange;
+#else
using namespace WPEFramework::Cryptography;
+ using CryptographyVault = cryptographyvault;
+#endif
const char kDefaultKeyName[] = "0381000003810001.key";
const char kRFCParamName[] = "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Cobalt.AuthCertKeyName";
@@ -102,14 +108,15 @@
SB_LOG(ERROR) << "Failed to create ICryptography instance";
return false;
}
+ vault.reset( icrypto->Vault(CryptographyVault::CRYPTOGRAPHY_VAULT_DEFAULT) );
- vault.reset( icrypto->Vault(cryptographyvault::CRYPTOGRAPHY_VAULT_DEFAULT) );
if ( !vault ) {
SB_LOG(ERROR) << "Failed to get default vault";
return false;
}
- persistent.reset( vault->QueryInterface<WPEFramework::Cryptography::IPersistent>() );
+ persistent.reset( vault->QueryInterface<IPersistent>() );
+
if ( !persistent ) {
SB_LOG(ERROR) << "IPersistent is not implemented";
return false;