From 59c2799ace667fe952f68a5f0aa4ba9ca1e5523d Mon Sep 17 00:00:00 2001 From: Tomasz Swierczek Date: Thu, 3 Jan 2019 08:58:46 +0100 Subject: Adjust format strings to new dlog Change-Id: Ie0843905a6a23f9225072bff7583f77350349537 --- srcs/crypto_service.c | 14 +++++++------- srcs/decrypt_migrated_wgt.c | 6 +++--- srcs/key_manager.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/srcs/crypto_service.c b/srcs/crypto_service.c index bd83eba..c28c0cd 100644 --- a/srcs/crypto_service.c +++ b/srcs/crypto_service.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2016 - 2019 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -240,11 +240,11 @@ int encrypt_aes_cbc(const crypto_element_s *ce, const raw_buffer_s *data, _initialize(); - WAE_SLOGI("Encryption Started. size=%d", data->size); + WAE_SLOGI("Encryption Started. size=%zu", data->size); /* check input paramter */ if (ce->dek->size != 32) { - WAE_SLOGE("Encryption Failed. Invalid Key Length. key_len=%d", ce->dek->size); + WAE_SLOGE("Encryption Failed. Invalid Key Length. key_len=%zu", ce->dek->size); return WAE_ERROR_INVALID_PARAMETER; } @@ -299,7 +299,7 @@ int encrypt_aes_cbc(const crypto_element_s *ce, const raw_buffer_s *data, *pencrypted_data = encrypted_data; - WAE_SLOGI("Encryption Ended Successfully. encrypted_len: %d", encrypted_data->size); + WAE_SLOGI("Encryption Ended Successfully. encrypted_len: %zu", encrypted_data->size); error: if (ctx != NULL) @@ -324,11 +324,11 @@ int decrypt_aes_cbc(const crypto_element_s *ce, const raw_buffer_s *encrypted_da _initialize(); - WAE_SLOGI("Decryption Started. size=%d", encrypted_data->size); + WAE_SLOGI("Decryption Started. size=%zu", encrypted_data->size); /* check input paramter */ if (ce->dek->size != 32) { - WAE_SLOGE("Decryption Failed. Invalid Key Length. key_len=%d", ce->dek->size); + WAE_SLOGE("Decryption Failed. Invalid Key Length. key_len=%zu", ce->dek->size); return WAE_ERROR_INVALID_PARAMETER; } @@ -383,7 +383,7 @@ int decrypt_aes_cbc(const crypto_element_s *ce, const raw_buffer_s *encrypted_da *pdata = data; - WAE_SLOGI("Decryption Ended Successfully. decrypted_len: %d", data->size); + WAE_SLOGI("Decryption Ended Successfully. decrypted_len: %zu", data->size); error: if (ctx != NULL) diff --git a/srcs/decrypt_migrated_wgt.c b/srcs/decrypt_migrated_wgt.c index 4eae90b..6dbc627 100644 --- a/srcs/decrypt_migrated_wgt.c +++ b/srcs/decrypt_migrated_wgt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2016 - 2019 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ static int _get_old_duk(const char *pkg_id, raw_buffer_s **pduk) *pduk = duk; - WAE_SLOGD("get old duk of length: %d", duk->size); + WAE_SLOGD("get old duk of length: %zu", duk->size); return WAE_ERROR_NONE; } @@ -91,7 +91,7 @@ static int _get_old_iv(const raw_buffer_s *src, raw_buffer_s **piv) iv->size = _size; *piv = iv; - WAE_SLOGD("get old iv of length: %d", iv->size); + WAE_SLOGD("get old iv of length: %zu", iv->size); return WAE_ERROR_NONE; } diff --git a/srcs/key_manager.c b/srcs/key_manager.c index ac42db2..f4c049c 100644 --- a/srcs/key_manager.c +++ b/srcs/key_manager.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2016 - 2019 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,7 +67,7 @@ static int _serialize(const crypto_element_s *ce, ckmc_raw_buffer_s **pbuf) size_t total_len = sizeof(size_t) * 3 + ce->dek->size + ce->iv->size + sizeof(bool); - WAE_SLOGD("(serialization) total(%d) dek(%d) iv(%d) is_migrated(%d)", + WAE_SLOGD("(serialization) total(%zu) dek(%zu) iv(%zu) is_migrated(%d)", total_len, ce->dek->size, ce->iv->size, ce->is_migrated_app); unsigned char *_buf = (unsigned char *)malloc(total_len); @@ -97,7 +97,7 @@ static int _serialize(const crypto_element_s *ce, ckmc_raw_buffer_s **pbuf) pos += sizeof(bool); if (total_len != pos) { - WAE_SLOGE("(serialization) total len(%d) and actualy written byte(%d) " + WAE_SLOGE("(serialization) total len(%zu) and actualy written byte(%zu) " "isn't matched!", total_len, pos); ckmc_buffer_free(buf); return WAE_ERROR_UNKNOWN; @@ -126,7 +126,7 @@ static int _deserialize(const ckmc_raw_buffer_s *buf, crypto_element_s **pce) pos += sizeof(size_t); if (buf->size != total_len) { - WAE_SLOGE("(deserialization) total len(%d) and actualy written byte(%d) " + WAE_SLOGE("(deserialization) total len(%zu) and actualy written byte(%zu) " "isn't matched!", total_len, buf->size); return WAE_ERROR_UNKNOWN; } @@ -162,7 +162,7 @@ static int _deserialize(const ckmc_raw_buffer_s *buf, crypto_element_s **pce) memcpy(&is_migrated_app, buf->data + pos, sizeof(bool)); pos += sizeof(bool); - WAE_SLOGD("(deserialization) total(%d) dek(%d) iv(%d) is_migrated(%d)", + WAE_SLOGD("(deserialization) total(%zu) dek(%zu) iv(%zu) is_migrated(%d)", total_len, dek_size, iv_size, is_migrated_app); if (pos != buf->size) { -- cgit v1.2.3