diff options
author | sangwan.kwon <sangwan.kwon@samsung.com> | 2017-09-14 07:29:21 -0400 |
---|---|---|
committer | sangwan.kwon <sangwan.kwon@samsung.com> | 2017-09-14 07:32:19 -0400 |
commit | bb7d0dd6c3c2a902ae544f78f1cc6952723a1a19 (patch) | |
tree | 3db16c575fa463b469db1dd483aa53162ced14f3 | |
parent | 206851a1dda5282b75b92eb4ae13c298b6859ae2 (diff) | |
download | libcryptsvc-tizen_4.0.tar.gz libcryptsvc-tizen_4.0.tar.bz2 libcryptsvc-tizen_4.0.zip |
Replace SHA1 to SHA256 on PUK generating logictizen_4.0.m2_releasetizen_4.0.IoT.p2_releasetizen_4.0.IoT.p1_releasesubmit/tizen_4.0/20170915.072716accepted/tizen/4.0/unified/20170920.081312tizen_4.0_tvtizen_4.0accepted/tizen_4.0_unified
Change-Id: If7b368edbcc382587de28fdef13aabb184a2d076
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
-rw-r--r-- | include/SecCryptoSvc.h | 2 | ||||
-rw-r--r-- | srcs/SecCryptoSvc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/SecCryptoSvc.h b/include/SecCryptoSvc.h index 4d5e572..00d3c04 100644 --- a/include/SecCryptoSvc.h +++ b/include/SecCryptoSvc.h @@ -90,7 +90,7 @@ typedef enum //#define SHA1_DIGEST_VALUE_LEN 20 #define SHA256_DIGEST_VALUE_LEN 32 //#define KDF_KEYLEN 16 -#define HASH_LEN 20 +#define HASH_LEN SHA256_DIGEST_VALUE_LEN //#define SEC_KEYMGR_FEK_SIZE 16 #define CS_ERROR_NONE 0 diff --git a/srcs/SecCryptoSvc.c b/srcs/SecCryptoSvc.c index da23ed1..c839efe 100644 --- a/srcs/SecCryptoSvc.c +++ b/srcs/SecCryptoSvc.c @@ -138,7 +138,7 @@ bool SecFrameGeneratePlatformUniqueKey(unsigned int uLen, unsigned char *pCek) remain = uLen; for (i = 0; i < uLen; i += HASH_LEN) { - result = SHA1(Key, nTempLen, hashedValue); + result = SHA256(Key, nTempLen, hashedValue); nHashLen = HASH_LEN; if (!result) { |