std::string WidgetUnzip::decryptDrmPackage(const std::string &source)
{
LogInfo("Check DRM...");
- if (1 == drm_oem_sapps_is_drm_file(source.c_str(), source.length())) {
- std::string decryptedFile;
- size_t found = source.find_last_of(".wgt");
- if (found == std::string::npos) {
- decryptedFile += source + "_tmp.wgt";
- } else {
- decryptedFile += source.substr(0, source.find_last_not_of(".wgt") +
- 1) + "_tmp.wgt";
- }
-
- LogDebug("decrypted file name : " << decryptedFile);
- if (1 != drm_oem_sapps_decrypt_package(source.c_str(), source.length(),
- decryptedFile.c_str(), decryptedFile.length())) {
- LogError("Failed decrypt drm file");
- ThrowMsg(Exceptions::DrmDecryptFailed, source);
- }
- return decryptedFile;
- }
+ // TODO : check drm
return source;
}