Revert "add debug log and fix a bug"
authorDongsun Lee <ds73.lee@samsung.com>
Wed, 31 May 2023 04:20:06 +0000 (13:20 +0900)
committerDongsun Lee <ds73.lee@samsung.com>
Wed, 31 May 2023 04:20:06 +0000 (13:20 +0900)
This reverts commit 72de46beab2768eac786479e27a1898402da0f5d.

src/manager/crypto/se-backend/internals.cpp
src/manager/service/key-provider.cpp

index bd155a4..4dae68c 100644 (file)
@@ -118,9 +118,8 @@ RawBuffer encryptWithDbpKey(const unsigned char* key, const uint32_t key_len,
                                                const unsigned char* iv, const uint32_t iv_len)
 {
 
-       unsigned char* output_data = NULL;
-       uint32_t output_len = 0;
-       LogDebug("DBP Key will be encrypted on SE backend");
+       unsigned char* output_data;
+       uint32_t output_len;
 
        int ret = kmsb_failure_retry(std::bind(kmsb_encrypt_with_dbp_key,
                                                                SE_BACKEND_DBP_SCHEME_VERSION,
index 66a5dae..c35b775 100644 (file)
@@ -141,7 +141,7 @@ KeyData makePKEK1(const KeyComponentsInfoDKEK& keyInfo, const Password &password
 #if SE_BACKEND_ENABLED
        RawBuffer salt;
        if (keyInfo.backend == (int)CryptoBackend::SecureElement) {
-               salt = Crypto::SE::Internals::encryptWithDbpKey((unsigned char*)keyInfo.salt, MAX_SALT_SIZE,
+               RawBuffer salt = Crypto::SE::Internals::encryptWithDbpKey((unsigned char*)keyInfo.salt, MAX_SALT_SIZE,
                                                                                (unsigned char*)keyInfo.iv, MAX_IV_SIZE);
        } else {
                salt = RawBuffer(keyInfo.salt, keyInfo.salt + MAX_SALT_SIZE);