diff options
-rw-r--r-- | srcs/SecCryptoSvc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/srcs/SecCryptoSvc.c b/srcs/SecCryptoSvc.c index 95861de..d5452e3 100644 --- a/srcs/SecCryptoSvc.c +++ b/srcs/SecCryptoSvc.c @@ -1,7 +1,7 @@ /* * libcryptsvc - device unique key * - * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2000 - 2020 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. @@ -233,7 +233,10 @@ char *GetDuid(int idSize) goto exit; } - PKCS5_PBKDF2_HMAC_SHA1(info, 8, pKey, idSize, 1, idSize, pDuid); + if (!PKCS5_PBKDF2_HMAC_SHA1(info, 8, pKey, idSize, 1, idSize, pDuid)) { + SLOGE("Error in PKCS5_PBKDF2_HMAC_SHA1"); + goto exit; + } if (!(pId = Base64Encoding((char *)pDuid, idSize))) { SLOGE("Failed to convert to base64 string"); |