LOG(DEBUG) << "no encryption";
return common_installer::Step::Status::OK;
}
+ LOG(DEBUG) << "Encrypting";
if (!Encrypt(input_)) {
LOG(ERROR) << "Error during encryption";
unsigned char* encrypted_data = nullptr;
size_t enc_data_len = 0;
// TODO(p.sikorski) check if it is Preloaded
- int is_preloaded = 0;
+ wae_app_type_e enc_type =
+ context_->uid.get() == tzplatform_getuid(TZ_SYS_GLOBALAPP_USER) ?
+ WAE_DOWNLOADED_GLOBAL_APP : WAE_DOWNLOADED_NORMAL_APP;
+
int ret = wae_encrypt_web_application(
context_->pkgid.get().c_str(),
- is_preloaded,
+ enc_type,
reinterpret_cast<const unsigned char*>(input_buffer),
length,
&encrypted_data,
namespace encrypt {
common_installer::Step::Status StepRemoveEncryptionData::process() {
+ wae_app_type_e enc_type =
+ context_->uid.get() == tzplatform_getuid(TZ_SYS_GLOBALAPP_USER) ?
+ WAE_DOWNLOADED_GLOBAL_APP : WAE_DOWNLOADED_NORMAL_APP;
+
// There is no check, if application was encrypted or not
// (it is not saved anywhere in tizen manifest)
// so, if WAE_ERROR_NO_KEY error, then application was not encrypted
- int ret = wae_remove_app_dek(context_->pkgid.get().c_str());
+ int ret = wae_remove_app_dek(context_->pkgid.get().c_str(), enc_type);
if (WAE_ERROR_NONE == ret || WAE_ERROR_NO_KEY == ret) {
LOG(DEBUG) << "Encryption data removed (if existed)";
return common_installer::Step::Status::OK;
#include "wgt/step/step_create_symbolic_link.h"
#include "wgt/step/step_check_settings_level.h"
+#include "wgt/step/step_encrypt_resources.h"
#include "wgt/step/step_parse.h"
#include "wgt/step/step_parse_recovery.h"
#include "wgt/step/step_remove_encryption_data.h"
AddStep<wgt::parse::StepParse>(true);
AddStep<ci::security::StepCheckSignature>();
AddStep<wgt::security::StepCheckSettingsLevel>();
+ AddStep<wgt::encrypt::StepEncryptResources>();
AddStep<wgt::filesystem::StepWgtResourceDirectory>();
AddStep<ci::filesystem::StepCopy>();
AddStep<wgt::filesystem::StepWgtCreateStorageDirectories>();