tizen 2.4 release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20151029.032202 submit/tizen_2.4/20151028.064528 tizen_2.4_mobile_release
authorjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 08:00:38 +0000 (17:00 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 08:00:38 +0000 (17:00 +0900)
LICENSE [moved from LICENSE.Apache-2.0 with 100% similarity]
NOTICE [changed mode: 0755->0644]
dukgenerator.pc.in [changed mode: 0755->0644]
packaging/dukgenerator.spec
src/dukgen.c [changed mode: 0755->0644]

similarity index 100%
rename from LICENSE.Apache-2.0
rename to LICENSE
diff --git a/NOTICE b/NOTICE
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 0821784..d38ed12 100644 (file)
@@ -41,7 +41,7 @@ rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir
 find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f --
 
 mkdir -p %{buildroot}/usr/share/license
-cp LICENSE.Apache-2.0 %{buildroot}/usr/share/license/%{name}
+cp LICENSE %{buildroot}/usr/share/license/%{name}
 
 
 %files
old mode 100755 (executable)
new mode 100644 (file)
index 067ef47..2fdd4e1
 #include <SecCryptoSvc.h>
 #include <dukgen.h>
 
-char* GetDeviceUniqueKey(char* pAppId, int idLen, int keyLen)
+char *GetDeviceUniqueKey(char *pAppId, int idLen, int keyLen)
 {
-       unsigned char* pUniqueKey = NULL;
-       char* pDuk = NULL;
-       bool result = true;
+       unsigned char *pUniqueKey = NULL;
+       char *pDuk = NULL;
 
-       pUniqueKey = (unsigned char*)calloc(keyLen,1);
-       if(pUniqueKey == NULL)
-               return NULL;
+       if (!(pUniqueKey = (unsigned char *)calloc(keyLen, 1)))
+               goto exit;
 
-       result = SecFrameGeneratePlatformUniqueKey((unsigned int)keyLen , pUniqueKey);
-       if(result == false)
-       {
-               free(pUniqueKey);
-               return NULL;
-       }
+       if (!SecFrameGeneratePlatformUniqueKey((unsigned int)keyLen , pUniqueKey))
+               goto exit;
 
-       pDuk = (char*)calloc(keyLen, 1);
-       PKCS5_PBKDF2_HMAC_SHA1(pAppId, idLen, (unsigned char*)pUniqueKey, keyLen, 1, keyLen, (unsigned char*)pDuk);
-       free(pUniqueKey);
+       if (!(pDuk = (char *)calloc(keyLen, 1)))
+               goto exit;
+
+       PKCS5_PBKDF2_HMAC_SHA1(pAppId, idLen, (unsigned char *)pUniqueKey, keyLen, 1, keyLen, (unsigned char *)pDuk);
 
+exit:
+       free(pUniqueKey);
        return pDuk;
 }