summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsangwan.kwon <sangwan.kwon@samsung.com>2017-09-14 07:29:21 -0400
committersangwan kwon <sangwan.kwon@samsung.com>2017-09-15 06:05:05 +0000
commit1e0f1f367b46d34c2432b7cf83a305d2fb9e80ab (patch)
tree3db16c575fa463b469db1dd483aa53162ced14f3
parent206851a1dda5282b75b92eb4ae13c298b6859ae2 (diff)
downloadlibcryptsvc-1e0f1f367b46d34c2432b7cf83a305d2fb9e80ab.tar.gz
libcryptsvc-1e0f1f367b46d34c2432b7cf83a305d2fb9e80ab.tar.bz2
libcryptsvc-1e0f1f367b46d34c2432b7cf83a305d2fb9e80ab.zip
Replace SHA1 to SHA256 on PUK generating logicsubmit/tizen/20171103.042839accepted/tizen/unified/20171106.162831
Change-Id: If7b368edbcc382587de28fdef13aabb184a2d076 Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
-rw-r--r--include/SecCryptoSvc.h2
-rw-r--r--srcs/SecCryptoSvc.c2
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) {