[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>
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);