summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsangwan.kwon <sangwan.kwon@samsung.com>2016-08-11 15:15:12 +0900
committersangwan kwon <sangwan.kwon@samsung.com>2016-08-10 23:23:03 -0700
commitf327e9fca40ad1cf62ac18e052f09c65debac72b (patch)
tree3add737d5f32782336e03f9d9a15b5cb5baa9ad2
parentcc76acebe224f4b8a273752b2400190ab0aab679 (diff)
downloadlibwebappenc-accepted/tizen/wearable/20160815.233236.tar.gz
libwebappenc-accepted/tizen/wearable/20160815.233236.tar.bz2
libwebappenc-accepted/tizen/wearable/20160815.233236.zip
[Problem] * EVP_Digest parameter type is unsigned int * size_t is differ between 32bit and 64bit [Solution] * Use unsigned int instead of size_t Change-Id: Ib398532c7148bcd9d736c7282e0b74c8042a2ede Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
-rw-r--r--srcs/decrypt_migrated_wgt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/srcs/decrypt_migrated_wgt.c b/srcs/decrypt_migrated_wgt.c
index 1012a35..4eae90b 100644
--- a/srcs/decrypt_migrated_wgt.c
+++ b/srcs/decrypt_migrated_wgt.c
@@ -82,11 +82,13 @@ static int _get_old_iv(const raw_buffer_s *src, raw_buffer_s **piv)
if (iv == NULL)
return WAE_ERROR_MEMORY;
- if (EVP_Digest(src->buf, src->size, iv->buf, &iv->size, EVP_sha1(), NULL) != 1) {
+ unsigned int _size;
+ if (EVP_Digest(src->buf, src->size, iv->buf, &_size, EVP_sha1(), NULL) != 1) {
buffer_destroy(iv);
return WAE_ERROR_CRYPTO;
}
+ iv->size = _size;
*piv = iv;
WAE_SLOGD("get old iv of length: %d", iv->size);