From 2a527859481ea538e4ebf1a70270404acdab2cb4 Mon Sep 17 00:00:00 2001 From: Soyoung Kim Date: Mon, 15 Oct 2012 16:28:10 +0900 Subject: [PATCH] [Installer] Add installation drm file [Issue#] N/A [Problem] N/A [Cause] N/A [Solution] Add installation drm file - installation task fixed because drm file. - Parsing config.xml task hold off unzip widget file. [SCMRequest] This commit should be released with wrt-commons --- etc/CMakeLists.txt | 7 + etc/drm/armv7l/libdrm-service-core-intel.so | 1 + etc/drm/armv7l/libdrm-service-core-intel.so.0 | 1 + etc/drm/armv7l/libdrm-service-core-intel.so.0.0.0 | Bin 0 -> 28860 bytes etc/drm/ix86/libdrm-service-core-intel.so | 1 + etc/drm/ix86/libdrm-service-core-intel.so.0 | 1 + etc/drm/ix86/libdrm-service-core-intel.so.0.0.0 | Bin 0 -> 39076 bytes packaging/wrt-installer.spec | 22 ++ src/CMakeLists.txt | 14 + src/commons/drm/CPointerArray.h | 52 ++++ src/commons/drm/CXMLAttribute.h | 37 +++ src/commons/drm/CXMLElement.h | 57 ++++ src/commons/drm/CXMLFile.h | 54 ++++ src/commons/drm/InkaTypes.h | 76 +++++ src/commons/drm/IntelDrm_Core.h | 46 +++ src/commons/drm/drm-intel-crypto-util.h | 13 + src/commons/drm/drm-intel-util.h | 69 +++++ src/commons/drm/drm-oem-intel.h | 172 +++++++++++ src/jobs/widget_install/job_widget_install.cpp | 342 ++++++++++++++------- src/jobs/widget_install/job_widget_install.h | 17 +- src/jobs/widget_install/task_ace_check.cpp | 3 +- src/jobs/widget_install/task_certify.cpp | 2 +- src/jobs/widget_install/task_encrypt_resource.cpp | 2 + src/jobs/widget_install/task_file_manipulation.cpp | 6 +- src/jobs/widget_install/task_manifest_file.cpp | 5 +- src/jobs/widget_install/task_widget_config.cpp | 22 +- src/jobs/widget_install/widget_unzip.cpp | 210 +++++++++++++ src/jobs/widget_install/widget_unzip.h | 59 ++++ src/jobs/widget_uninstall/job_widget_uninstall.cpp | 2 +- src/misc/widget_location.cpp | 35 ++- src/misc/widget_location.h | 13 +- 31 files changed, 1186 insertions(+), 155 deletions(-) create mode 120000 etc/drm/armv7l/libdrm-service-core-intel.so create mode 120000 etc/drm/armv7l/libdrm-service-core-intel.so.0 create mode 100755 etc/drm/armv7l/libdrm-service-core-intel.so.0.0.0 create mode 120000 etc/drm/ix86/libdrm-service-core-intel.so create mode 120000 etc/drm/ix86/libdrm-service-core-intel.so.0 create mode 100755 etc/drm/ix86/libdrm-service-core-intel.so.0.0.0 create mode 100755 src/commons/drm/CPointerArray.h create mode 100755 src/commons/drm/CXMLAttribute.h create mode 100755 src/commons/drm/CXMLElement.h create mode 100755 src/commons/drm/CXMLFile.h create mode 100755 src/commons/drm/InkaTypes.h create mode 100755 src/commons/drm/IntelDrm_Core.h create mode 100755 src/commons/drm/drm-intel-crypto-util.h create mode 100755 src/commons/drm/drm-intel-util.h create mode 100755 src/commons/drm/drm-oem-intel.h create mode 100644 src/jobs/widget_install/widget_unzip.cpp create mode 100644 src/jobs/widget_install/widget_unzip.h diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt index 370d4af..adccb68 100644 --- a/etc/CMakeLists.txt +++ b/etc/CMakeLists.txt @@ -1,3 +1,10 @@ SET(ETC_DIR ${PROJECT_SOURCE_DIR}/etc) INSTALL(PROGRAMS ${ETC_DIR}/wrt_preinstall_widgets.sh DESTINATION /etc/rc.d/init.d) + +# Below Code is temporary. When DRM engine is provided it will be removed. +IF("${ARCH}" MATCHES "arm") + INSTALL(FILES ${ETC_DIR}/drm/armv7l/libdrm-service-core-intel.so.0.0.0 DESTINATION lib) +ELSE("${ARCH}" MATCHES "arm") + INSTALL(FILES ${ETC_DIR}/drm/ix86/libdrm-service-core-intel.so.0.0.0 DESTINATION lib) +ENDIF("${ARCH}" MATCHES "arm") diff --git a/etc/drm/armv7l/libdrm-service-core-intel.so b/etc/drm/armv7l/libdrm-service-core-intel.so new file mode 120000 index 0000000..df92fda --- /dev/null +++ b/etc/drm/armv7l/libdrm-service-core-intel.so @@ -0,0 +1 @@ +libdrm-service-core-intel.so.0 \ No newline at end of file diff --git a/etc/drm/armv7l/libdrm-service-core-intel.so.0 b/etc/drm/armv7l/libdrm-service-core-intel.so.0 new file mode 120000 index 0000000..4af898f --- /dev/null +++ b/etc/drm/armv7l/libdrm-service-core-intel.so.0 @@ -0,0 +1 @@ +libdrm-service-core-intel.so.0.0.0 \ No newline at end of file diff --git a/etc/drm/armv7l/libdrm-service-core-intel.so.0.0.0 b/etc/drm/armv7l/libdrm-service-core-intel.so.0.0.0 new file mode 100755 index 0000000000000000000000000000000000000000..68b76cf4cd32b54e05c00c2307b673e7e25854f7 GIT binary patch literal 28860 zcmeHwdt8)N{{MMq1{h$3QPD`r9l#6(ak!{xW?UaZQOVn)Su-Py4u&uR8n%|>rOn-H z!^^s4ZEKfrOJ)jXyVh1x+r|1?J5<}(bv4Hq$Pb-}`f(XW(I^-S7AJ*YEdw zeV_X9IhW75d@kpl&pFRC#~rx^q96#&_o!JMqu9Dw#?lCvF{WZHAdMMVAo8NvWXiYK zZ(z&^c}O78fSv%s5l_!X#s~r^)gk5cv{s}8^lHW;0D*Eo+GBfdfHn#AsE~m2eQjJp z*auS)Ch+Cm_H}g$qSrji@)5{IlWgJARjlBpo4(h4`}glm7Zb}J2v7xB2pH}82@)ahp=T#T zDF8j-J^=A(2dn~6-){xbb3Y&fU<9lKSOGf#Qvj)e>3{;j7y#79CIDsu<^ys8GXU!W zy8!f<0owpS2Kb)s2;=}rZuF3R41hTR-;;;z}L&+A401Y8TTl{+>R7+|6sTxAw&^Y2J@5=gzp4IE7Bqn)&kN1HvrZG zd`~3;OXNtljAsIe0fGTKKrA2&a3jF?)X0H&UxJKR0x$4Oy9x0iz+y%EU5fBBIXqX9 z<_oSspiqvC_a(|0!;WRj;iWRZPR7$@oB_N^4*SqNIdCsa%kjy;Bv+C>jSZ6NJ1m6h9x|#+#~B^-o~^kd1H+;A*~@$53a5lK zr>b_h>ZwRJ&S25}aB$ABV$?;-nH2O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j{Nl2#lrC@1EjYMy<(8b6Sy)V3}7}Zlj-Ud!>sU6Ga(qi-h zM<6_lCE+GXsWyx6B4EV9n2EEFyC?Yx=ICmm6CKR~1cex+)CP@zqM^Bf_VN@b zI+`;GXs+-*=mvl2{Da0l(b1SE2tlT=T}mg&1<*V}VVWxlY7wS(eSJfa|64(H_Ca(s z*AUQLa`%jN9UV&UMB&_ z577~n0ep1y@5K?A$tjl~UwxH``{-z{CZK-%9v@u|5{QoYeFroI2O(?U?fggL#5H(D``w(cu*vUss4lT0?p^4$BxxL-KwaVd@Ui(b{t5 z2k4F?pSnYI^l$ule}L{~1s!Wc#D+TxfqaioMomZ{ol$+XF6;%J9u1Ja&_jF>?FRr~ zyR>%ImBM$X1oyvKYWk=>Hq)$ literal 0 HcmV?d00001 diff --git a/etc/drm/ix86/libdrm-service-core-intel.so b/etc/drm/ix86/libdrm-service-core-intel.so new file mode 120000 index 0000000..df92fda --- /dev/null +++ b/etc/drm/ix86/libdrm-service-core-intel.so @@ -0,0 +1 @@ +libdrm-service-core-intel.so.0 \ No newline at end of file diff --git a/etc/drm/ix86/libdrm-service-core-intel.so.0 b/etc/drm/ix86/libdrm-service-core-intel.so.0 new file mode 120000 index 0000000..4af898f --- /dev/null +++ b/etc/drm/ix86/libdrm-service-core-intel.so.0 @@ -0,0 +1 @@ +libdrm-service-core-intel.so.0.0.0 \ No newline at end of file diff --git a/etc/drm/ix86/libdrm-service-core-intel.so.0.0.0 b/etc/drm/ix86/libdrm-service-core-intel.so.0.0.0 new file mode 100755 index 0000000000000000000000000000000000000000..d21a059c6372110cbc38e8c05528a163eb994a80 GIT binary patch literal 39076 zcmeHwe_T{m`u`mm6%`#aDr~JCi;PMU%uEaogu!1>q+s^LMub5~1cJfTj~FzJI(wUz zN?o`0v)T5`er&m0>zY}iuu!d)nU(EYQBe)amX(>AHQ)F9oO@^P3v-;S&U2pgoacGYbDneVW$taZ+#Hk1r07?)60H!*KVMNMA|JIu)=X5a%0MMaIY${K z>U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`s9Fw8UJ^`Dm0^qOH; z%pcHleutKD3v!+%e}g<0c|IPL4nuyT7V{N(0+7D_$zRnBfC|_TWVlhq3dh2Db_xEW zt;HeHWS_W8o@Fn>RF4PDvuU0~AH^Xv?>lke%(H5KneKGt921_jR;8dEa;zeaqsS-Y z(E22D_Vxeb+SVMTvI%2+7-R1Gm*w1O+v~+nvYb9v>a(I(k7&b zk#-=pBfX9EDbjJIfmXCf8iOgJ*e56vO20J>k&Yt`JRj|m#vn~X%0cqot%$4tk45wQ)X61|#dS-F+?BZK5+%8|3pOKWg~VlOK}OC179d^6jzqS#UGw1c?{ zhmu_Etg5L612Vh080aJ+dczY}_E@y6yckXK#EbtVi>_ri_@=gC(=J9|QC_)J%In|x zmvd(jQWVlLEhQq?FU~<;P>q;>#N(V~S`jVhDC>#G1QS+{W8M&tb5m=td>2dBd9ml=iFUy&1NSyDy=bUHS zj(hgYesuf-+`}b_HuM=x^ci|RbNY^j20Z#0rbQsmdX7)WE5$u|r9YvMW8&EKOQ&0e z0v)dbI82OT^ouefSb?PDxin~KaYDI&k7u-^+eDvtCqiloVq1F z`g$fG?rB%NNRRx!iKNrx_rRIL^+DW220X55OzCW>UBqGf5J{&;KgkqHE}sF9<>c=u iaF` 1000 +#pragma once +#endif // _MSC_VER > 1000 + +//#include "Shp.h" +#include "InkaTypes.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +class CPointerArray +{ +protected: + LPVOID* m_ppData; + int m_nMaxSize; + int m_nNumOfData; + +public: + CPointerArray(); + virtual ~CPointerArray(); + + int Add( LPVOID pData ); + int Remove( int nIndex ); + LPVOID Get( int nIndex ); + inline int GetCount() { return m_nNumOfData; } + inline void RemoveAll() { m_nNumOfData = 0; } +}; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif // !defined(AFX_CPOINTERARRAY_H__AB67E4BE_A233_4E3E_B257_9830D90326EE__INCLUDED_) +#endif /* __CPOINTERARRAY_H__ */ diff --git a/src/commons/drm/CXMLAttribute.h b/src/commons/drm/CXMLAttribute.h new file mode 100755 index 0000000..dda8fe3 --- /dev/null +++ b/src/commons/drm/CXMLAttribute.h @@ -0,0 +1,37 @@ + +/******************************************************************************** +* Copyright ? 2004-2009 by INKA Entworks, Inc (www.inka.co.kr). * +* All rights reserved. * +* * +* No parts of this source code may be in any way copied, reproduced, modified * +* or distributed without the prior written consent of INKA Entworks, Inc. * +* CXMLAttribute.h: interface for the CXMLAttribute class. * +*********************************************************************************/ +//#include "Shp.h" +#include "InkaTypes.h" + +#if !defined(AFX_CXMLATTRIBUTE_H__2B925786_3613_47B0_B85D_CAF2053F46DB__INCLUDED_) +#define AFX_CXMLATTRIBUTE_H__2B925786_3613_47B0_B85D_CAF2053F46DB__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class CXMLAttribute +{ +protected: + LPTSTR m_pszName; + LPTSTR m_pszValue; + +public: + CXMLAttribute(); + virtual ~CXMLAttribute(); + + int SetName( LPCTSTR pszName ); + int SetValue( LPCTSTR pszValue ); + + inline LPCTSTR GetName() { return m_pszName; } + inline LPCTSTR GetValue() { return m_pszValue; } +}; + +#endif // !defined(AFX_CXMLATTRIBUTE_H__2B925786_3613_47B0_B85D_CAF2053F46DB__INCLUDED_) diff --git a/src/commons/drm/CXMLElement.h b/src/commons/drm/CXMLElement.h new file mode 100755 index 0000000..eb74a0c --- /dev/null +++ b/src/commons/drm/CXMLElement.h @@ -0,0 +1,57 @@ + +/******************************************************************************** +* Copyright ? 2004-2009 by INKA Entworks, Inc (www.inka.co.kr). * +* All rights reserved. * +* * +* No parts of this source code may be in any way copied, reproduced, modified * +* or distributed without the prior written consent of INKA Entworks, Inc. * +* CXMLElement.h: interface for the CXMLElement class. * +*********************************************************************************/ + +#if !defined(AFX_CXMLELEMENT_H__B6A6A39B_1980_4A4F_B68B_E87B53A3EE9B__INCLUDED_) +#define AFX_CXMLELEMENT_H__B6A6A39B_1980_4A4F_B68B_E87B53A3EE9B__INCLUDED_ + +//#include "Shp.h" +#include "InkaTypes.h" +#include "CXMLAttribute.h" +#include "CPointerArray.h" + + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class CXMLElement +{ +protected: + LPTSTR m_pszName; + LPTSTR m_pszValue; + + CPointerArray m_pChilds; + CPointerArray m_pAttributes; + + int _SearchNodes( CPointerArray* ppaChildNodes, CXMLElement* pCurrent, LPCTSTR pszTagName, va_list args ); + +public: + CXMLElement(); + virtual ~CXMLElement(); + + int SetName( LPCTSTR pszName ); + int SetValue( LPCTSTR pszValue ); + int AddAttribute( LPCTSTR pszName, LPCTSTR pszValue ); + + inline LPCTSTR GetName() { return m_pszName; } + inline LPCTSTR GetValue() { return m_pszValue; } + + int AddChild( CXMLElement* pChild ); + LPCTSTR GetAttribute( LPCTSTR pszName ); + + inline int GetChildCount() { return m_pChilds.GetCount(); } + inline int GetAttributeCount() { return m_pAttributes.GetCount(); } + inline CXMLElement* GetChild( int nIndex ) { return (CXMLElement*)m_pChilds.Get( nIndex ); } + inline CXMLAttribute* GetAttribute( int nIndex ) { return (CXMLAttribute*)m_pAttributes.Get( nIndex ); } + + int Find( CPointerArray* pSearchedChild, LPCTSTR pszChildName, ... ); +}; + +#endif // !defined(AFX_CXMLELEMENT_H__B6A6A39B_1980_4A4F_B68B_E87B53A3EE9B__INCLUDED_) diff --git a/src/commons/drm/CXMLFile.h b/src/commons/drm/CXMLFile.h new file mode 100755 index 0000000..0a3a2e2 --- /dev/null +++ b/src/commons/drm/CXMLFile.h @@ -0,0 +1,54 @@ + +/******************************************************************************** +* Copyright ? 2004-2009 by INKA Entworks, Inc (www.inka.co.kr). * +* All rights reserved. * +* * +* No parts of this source code may be in any way copied, reproduced, modified * +* or distributed without the prior written consent of INKA Entworks, Inc. * +* CXMLFile.h: interface for the CXMLFile class. * +*********************************************************************************/ + +#if !defined(AFX_CXMLFILE_H__21F76587_B9C8_4407_9C16_186F3D47ADE1__INCLUDED_) +#define AFX_CXMLFILE_H__21F76587_B9C8_4407_9C16_186F3D47ADE1__INCLUDED_ + +//#include "Shp.h" +#include "InkaTypes.h" +#include "CXMLElement.h" + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef IN + #define IN +#endif + +#ifndef OUT + #define OUT +#endif + +#define ELEMENT_QUEUE_MAX 2048 +class CXMLFile +{ +protected: + LPCTSTR m_pszXML; + CXMLElement* m_paElementQueue[ ELEMENT_QUEUE_MAX ]; + int m_nQueueIndex; + CXMLElement* m_pRoot; + + int _Parse(); + int _GetElementName( LPTSTR pszElementName ); + CXMLElement* _Pop(); + int _Push( CXMLElement* p ); + int _GetAttributeNameAndValue( LPTSTR pszName, LPTSTR pszValue ); + +public: + CXMLFile(); + virtual ~CXMLFile(); + + int LoadFromStream( LPCTSTR pszXML ); + int LoadFromFile( LPCTSTR pszFileName ); + inline CXMLElement* GetRoot() { return m_pRoot; } +}; + +#endif // !defined(AFX_CXMLFILE_H__21F76587_B9C8_4407_9C16_186F3D47ADE1__INCLUDED_) diff --git a/src/commons/drm/InkaTypes.h b/src/commons/drm/InkaTypes.h new file mode 100755 index 0000000..d7a9291 --- /dev/null +++ b/src/commons/drm/InkaTypes.h @@ -0,0 +1,76 @@ +/* + * SHP + * Copyright (c) 2000-2007 UMTS Software Lab, Mobile Communication Division, + * Telecommunication Network Business, Samsung Electronics, Inc. + * All rights reserved. + * + * This software is the confidential and proprietary information + * of Samsung Electronics, Inc. ("Confidential Information"). You + * shall not disclose such Confidential Information and shall use + * it only in accordance with the terms of the license agreement + * you entered into with Samsung Electronics. + */ + +/** + * @file InkaTypes.h + * @brief This file includes definitions of constants, + * enumerations, and datastructures for the Inka DRM service. +# @author Jihyun Lee(ezhyun.lee@samsung.com) +# @author Donghyun Yoo(marku.yoo@samsung.com) + * @version 1.0 + */ + +#ifndef INKA_DRM_TYPES_H +#define INKA_DRM_TYPES_H + +//#include "shp.h" +//#include "FileMgr.h" +#include +#include + +#define _T +#define IF_ERROR_GOTO( error ) if( FAILED( HRESULT_FROM_WIN32( error ) ) ) { nResult = ERRORMSG( error, NULL ); goto finish; } +#define IF_TRUE_GOTO( cond, error ) if( cond ) { nResult = -1; goto finish; } + +#if defined(_WIN32) || defined(_WIN64) + #define snprintf _snprintf + #define vsnprintf _vsnprintf + #define strcasecmp _stricmp + #define strncasecmp _strnicmp +#endif + +#ifndef _SHP_SIMUL +typedef void* LPVOID; +typedef const char* LPCTSTR; +typedef unsigned char* LPBYTE; +typedef char TCHAR; +typedef char* LPTSTR; +typedef LPTSTR LPSTR; +typedef LPCTSTR LPCTSTR; +typedef LPCTSTR LPCSTR; + +#define DWORD unsigned long +#define LPBYTE unsigned char* +#define BYTE unsigned char +#define UINT unsigned int +#define ULONG unsigned long +#define INT32 long +#define INT64 long long +#define TRUE 1 +#define FALSE 0 + + +typedef char CHAR; +typedef bool BOOL; + + +//typedef HFile HANDLE; +#define ERROR_INVALID_DATA 13L +#define ERROR_INSUFFICIENT_BUFFER 122L // dderror +//#define CopyMemory AcMemcpy +#define INVALID_HOBJ NULL + +#endif + + +#endif //INKA_DRM_TYPES_H diff --git a/src/commons/drm/IntelDrm_Core.h b/src/commons/drm/IntelDrm_Core.h new file mode 100755 index 0000000..b8b4b48 --- /dev/null +++ b/src/commons/drm/IntelDrm_Core.h @@ -0,0 +1,46 @@ +//typedef char CHAR; +//typedef bool BOOL; + +typedef struct t_cek +{ + char *CID; // Content ID ¹öÆÛ Æ÷ÀÎÅÍ + char *CEK; // Content Encryption Key ¹öÆÛ Æ÷ÀÎÅÍ + char *EncryptionMethod; // CEK ¾Ë°í¸®Áò +}T_CEK; + +typedef struct t_dro +{ + char *CID; // Content ID ¹öÆÛ Æ÷ÀÎÅÍ + char *deviceId; // »ç¿ëÀÚ ½Äº° ¹ÙÀεù. IMEI, MIN °ª ¹ÙÀεù Á¦¾î + char *digestValue; // »ç¿ëÀÚ ½Äº° ¹ÙÀεù. IMEI, MIN °ª ¹ÙÀεù Á¦¾î + char *signedValue; // »ç¿ëÀÚ ½Äº° ¹ÙÀεù. IMEI, MIN °ª ¹ÙÀεù Á¦¾î + char *cert; // »ç¿ëÀÚ ½Äº° ¹ÙÀεù. IMEI, MIN °ª ¹ÙÀεù Á¦¾î + int Count; // »ç¿ë ȸ¼ö + char *CreatedTimestamp; // »ç¿ë °¡´É ½ÃÀÛ ÀϽà ¹öÆÛ Æ÷ÀÎÅÍ. GMT Ç¥±â + char *ExpiredTimeStamp; // »ç¿ë °¡´É ¸¸±â ÀϽà ¹öÆÛ Æ÷ÀÎÅÍ. GMT Ç¥±â + char *ExpirationDate; // ÃÖÃÊ »ç¿ë ÀÌÈÄ »ç¿ë °¡´É ½Ã°£. ½Ã°£ ´ÜÀ§ +}T_DRO; + +typedef struct t_dcf_file_header +{ + unsigned char Version; + unsigned char ContentTypeLen; + unsigned char ContentURILen; + char *ContentType; + char *ContentURI; + unsigned int HeadersLen; + unsigned int DataLen; + char *Headers; + unsigned int DataOffset; +}T_DCF_FILE_HEADER; + +// DRO Value size +#define APPID_SIZE 16 +#define CEK_SIZE 512 +#define ENCRYPTION_METHOD_SIZE 512 +#define DEVICEID_SIZE 256 +#define TIMESTAMP_SIZE 256 +#define DIGESTVALUE_SIZE 256 +#define SIGNATUREVALUE_SIZE 1024 +#define CERT_SIZE 1024 * 4 +#define AES_BLOCK_SIZE 16 diff --git a/src/commons/drm/drm-intel-crypto-util.h b/src/commons/drm/drm-intel-crypto-util.h new file mode 100755 index 0000000..eacb1e5 --- /dev/null +++ b/src/commons/drm/drm-intel-crypto-util.h @@ -0,0 +1,13 @@ +#include "InkaTypes.h" +//#include "IntelDrm_Core.h" + +#include "stdlib.h" +#include "string.h" +#include "stdio.h" + +#define AES_BLOCK_SIZE 16 + +LPSTR Base64Encode(LPBYTE pbData, int nLength); +LPBYTE Base64Decode(LPCSTR pszString, int* pnLength); + +int decrypt_block(unsigned char *iv, unsigned char *cipherText, int cipherTextLen, unsigned char *cek, int cekLen, unsigned char *plainText); diff --git a/src/commons/drm/drm-intel-util.h b/src/commons/drm/drm-intel-util.h new file mode 100755 index 0000000..08bb2cd --- /dev/null +++ b/src/commons/drm/drm-intel-util.h @@ -0,0 +1,69 @@ +#include "CPointerArray.h" +#include "CXMLAttribute.h" +#include "CXMLElement.h" +#include "CXMLFile.h" +#include "InkaTypes.h" +#include "IntelDrm_Core.h" +#include "drm-intel-crypto-util.h" + +#include "stdlib.h" +#include "string.h" +#include "stdio.h" + +/** + * An application can parse CEK XML Foramt. + * + * @param[in] pszXML Data String of the CEK information + * @param[out] t_cek parsing result to be saved + * @return This function returns 1 on success or 0 on failure. + * @remarks + * @see + * @since + */ +int parse_intel_cek(const char* pszXML, T_CEK* t_cek); + +/** + * An application can parse DRO XML Foramt. + * + * @param[in] pszXML Data String of the DRO information + * @param[out] t_cek parsing result to be saved + * @return This function returns 1 on success or 0 on failure. + * @remarks + * @see + * @since + */ +int parse_intel_dro(const char* pszXML, T_DRO* t_RO); + +int parse_intel_dro2(const char* pszXML, T_DRO* t_RO); + +/** + * An application can parse stored dro. + * + * @param[in] pFilepath file path of the internal dro + * @param[out] t_ro parsing result to be saved + * @return This function returns 1 on success or 0 on failure. + * @remarks + * @see + * @since + */ +int get_internal_dro(char *pFilepath, T_DRO* t_ro); + +/** + * An application can parse stored cek. + * + * @param[in] pFilepath file path of the internal cek + * @param[out] t_cek parsing result to be saved + * @return This function returns 1 on success or 0 on failure. + * @remarks + * @see + * @since + */ +int get_internal_cek(char *pFilepath, T_CEK* t_cek); + +int delete_internal_cek(char *pAppId); + +int get_dcf_header_info(char *pFilePath, T_DCF_FILE_HEADER *pTdcfHeader); + +bool get_Uintvar(unsigned int *nValue, FILE *pFile); + +int decrypt_package(char *pDcfPath, char *pDecryptedFilePath, unsigned char *pCEK, int cekLen, T_DCF_FILE_HEADER *t_dcf_header); diff --git a/src/commons/drm/drm-oem-intel.h b/src/commons/drm/drm-oem-intel.h new file mode 100755 index 0000000..80a9bb2 --- /dev/null +++ b/src/commons/drm/drm-oem-intel.h @@ -0,0 +1,172 @@ +/* + * drm-intel + * + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Sunggun Jung + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, Inc., 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/** +* @internal +* @defgroup DRM-INTEL drm-intel +* @{ +*/ +#include "drm-intel-util.h" +//#include "drm-intel-crypto-util.h" + +#include +#include +#include + +/** + * An application can install Intel DRM license(DRO). + * + * @param[in] pDroXML Data String of the Rights Request + * @param[in] droBufLen pDroXML Length + * @return This function returns 1 on success or 0 on failure. + * @remarks + * @see + * @since + */ +int drm_oem_intel_install_license(char *pDroXML, int droBufLen); + +/** + * An application can uninstall Intel DRM license(DRO). + * + * @param[in] pAppId App-id of the rigths which want to un-install + * @return This function returns 1 on success or 0 on failure. + * @remarks + * @see + * @since + */ +int drm_oem_intel_uninstall_license(char *pAppId); + +/** + * An application can install CEK(Contents Encryption Key). + * + * @param[in] pCekXML Data String of the Rights Request + * @param[in] cekBufLen pDroXML Length + * @return This function returns 1 on success or 0 on failure. + * @remarks + * @see + * @since + */ +int drm_oem_intel_install_cek(char *pCekXML, int cekBufLen); + +/** + * An application can get decrypted contents(Apps) which is encrypted + * + * @param[in] pDcfPath Intel DRM Package File Path + * @param[in] pDecryptedFile Decrypted File Path + * @return This function returns 1 on success or 0 on failure. + * @remarks + * @see + * @since + */ +int drm_oem_intel_decrypt_package(char *pDcfPath, char *pDecryptedFile); + +/** + * An application can get informations of rights (DRO). + * + * @param[in] pAppId App-id of the rights which want to know + * @param[out] pDro The rights information about the app-id + * @return This function can return any of the following codes + * DRM_INTEL_SUCCESS = 0 #include #include +#include +#include #include "root_parser.h" #include "widget_parser.h" #include "parser_runner.h" #include -#include #include #include #include @@ -51,6 +52,8 @@ #include #include #include +#include +#include #include #include @@ -68,6 +71,9 @@ #include #include #include +#include +#include +#include //temporary code using namespace WrtDB; @@ -132,35 +138,13 @@ JobWidgetInstall::JobWidgetInstall(std::string const &widgetPath, JobContextBase(installerStruct), m_exceptionCaught(Exceptions::Success) { - // Check installation type (config.xml or widget.wgt) - bool browserRequest = hasExtension(widgetPath, XML_EXTENSION); - - LogInfo("Hosted app installation: " << browserRequest); - struct timeval tv; gettimeofday(&tv, NULL); srand(time(NULL) + tv.tv_usec); m_installerContext.m_quiet = m_jobStruct.m_quiet; - if(!browserRequest) - { - m_installerContext.widgetConfig.pType = checkPackageType(widgetPath); - } - else - { - m_installerContext.widgetConfig.pType = WrtDB::PKG_TYPE_TIZEN_WEBAPP; - } - LogDebug("widgetPath:" << widgetPath); - - ConfigParserData configData = getWidgetDataFromXML(widgetPath, browserRequest, - m_installerContext.widgetConfig.pType); - WidgetUpdateInfo update = detectWidgetUpdate(configData); - bool needEncryption = detectResourceEncryption(configData); - - // Configure installation - ConfigureResult result = ConfigureInstallation(widgetPath, configData, - update, browserRequest); + ConfigureResult result = PrePareInstallation(widgetPath); if (result == ConfigureResult::Ok) { LogInfo("Configure installation succeeded"); @@ -168,15 +152,18 @@ JobWidgetInstall::JobWidgetInstall(std::string const &widgetPath, AddTask(new TaskRecovery(m_installerContext)); // Create installation tasks - if (!m_installerContext.locations->browserRequest()) { + if (m_installerContext.widgetConfig.packagingType != + WrtDB::PKG_TYPE_HOSTED_WEB_APP || !m_isDRM) { AddTask(new TaskUnzip(m_installerContext)); } + AddTask(new TaskWidgetConfig(m_installerContext)); - if (m_installerContext.locations->browserRequest()) { + if (m_installerContext.widgetConfig.packagingType == + WrtDB::PKG_TYPE_HOSTED_WEB_APP ) { AddTask(new TaskPrepareFiles(m_installerContext)); } AddTask(new TaskCertify(m_installerContext)); - if (needEncryption) { + if (m_needEncryption) { AddTask(new TaskEncryptResource(m_installerContext)); } AddTask(new TaskFileManipulation(m_installerContext)); @@ -191,8 +178,8 @@ JobWidgetInstall::JobWidgetInstall(std::string const &widgetPath, AddTask(new TaskManifestFile(m_installerContext)); AddTask(new TaskCertificates(m_installerContext)); - if (m_installerContext.widgetConfig.pType == - PKG_TYPE_TIZEN_WITHSVCAPP) { + if (m_installerContext.widgetConfig.packagingType == + PKG_TYPE_HYBRID_WEB_APP) { AddTask(new TaskInstallOspsvc(m_installerContext)); } AddTask(new TaskPluginsCopy(m_installerContext)); @@ -201,12 +188,15 @@ JobWidgetInstall::JobWidgetInstall(std::string const &widgetPath, } else if (result == ConfigureResult::Updated) { LogInfo("Configure installation updated"); LogInfo("Widget Update"); - - if (!m_installerContext.locations->browserRequest()) { + if (m_installerContext.widgetConfig.packagingType != + WrtDB::PKG_TYPE_HOSTED_WEB_APP || !m_isDRM) { AddTask(new TaskUnzip(m_installerContext)); } + AddTask(new TaskWidgetConfig(m_installerContext)); - if (m_installerContext.locations->browserRequest()) { + + if (m_installerContext.widgetConfig.packagingType == + WrtDB::PKG_TYPE_HOSTED_WEB_APP ) { AddTask(new TaskPrepareFiles(m_installerContext)); } @@ -217,8 +207,8 @@ JobWidgetInstall::JobWidgetInstall(std::string const &widgetPath, AddTask(new TaskSmack(m_installerContext)); AddTask(new TaskManifestFile(m_installerContext)); - if (m_installerContext.widgetConfig.pType == - PKG_TYPE_TIZEN_WITHSVCAPP) { + if (m_installerContext.widgetConfig.packagingType == + PKG_TYPE_HYBRID_WEB_APP) { AddTask(new TaskInstallOspsvc(m_installerContext)); } AddTask(new TaskRemoveBackupFiles(m_installerContext)); @@ -244,6 +234,48 @@ JobWidgetInstall::JobWidgetInstall(std::string const &widgetPath, } } +JobWidgetInstall::ConfigureResult JobWidgetInstall::PrePareInstallation( + const std::string &widgetPath) +{ + ConfigureResult result; + m_needEncryption = false; + + Try + { + std::string tempDir = Jobs::WidgetInstall::createTempPath(); + + bool m_isDRM = isDRMWidget(widgetPath); + if (true == m_isDRM) { + LogDebug("decrypt DRM widget"); + if(DecryptDRMWidget(widgetPath, tempDir)) { + LogDebug("Failed decrypt DRM widget"); + return ConfigureResult::Failed; + } + } + + LogDebug("widgetPath:" << widgetPath); + + m_installerContext.widgetConfig.packagingType = + checkPackageType(widgetPath, tempDir); + ConfigParserData configData = getWidgetDataFromXML(widgetPath, tempDir, + m_installerContext.widgetConfig.packagingType, m_isDRM); + LogDebug("widget packaging type : " << + m_installerContext.widgetConfig.packagingType.pkgType); + WidgetUpdateInfo update = detectWidgetUpdate(configData); + m_needEncryption = detectResourceEncryption(configData); + + // Configure installation + result = ConfigureInstallation(widgetPath, configData, update, tempDir); + } + Catch(Exceptions::ExtractFileFailed) + { + LogError("Failed to create temporary path for widget"); + result = ConfigureResult::Failed; + } + + return result; +} + std::string JobWidgetInstall::generateTizenId() { std::string allowed("0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" @@ -318,10 +350,13 @@ DPL::OptionalString JobWidgetInstall::getNewTizenId() const return m_installerContext.widgetConfig.pkgname; } -void JobWidgetInstall::configureWidgetLocation(const std::string & widgetPath, bool browserRequest) +void JobWidgetInstall::configureWidgetLocation(const std::string & widgetPath, + const std::string& tempPath) { - m_installerContext.locations = WidgetLocation(DPL::ToUTF8String(*m_installerContext.widgetConfig.pkgname), - widgetPath, browserRequest, m_installerContext.widgetConfig.pType); + m_installerContext.locations = + WidgetLocation(DPL::ToUTF8String(*m_installerContext.widgetConfig.pkgname), + widgetPath, tempPath, + m_installerContext.widgetConfig.packagingType); LogInfo("widgetSource " << widgetPath); } @@ -330,7 +365,7 @@ JobWidgetInstall::ConfigureResult JobWidgetInstall::ConfigureInstallation( const std::string &widgetSource, const WrtDB::ConfigParserData &configData, const WidgetUpdateInfo &update, - bool browserRequest) + const std::string &tempPath) { LogInfo( "Widget install/update: incoming guid = '" << @@ -406,7 +441,7 @@ JobWidgetInstall::ConfigureResult JobWidgetInstall::ConfigureInstallation( using namespace PackageManager; LogInfo("Tizen Id: " << m_installerContext.widgetConfig.pkgname); - configureWidgetLocation(widgetSource, browserRequest); + configureWidgetLocation(widgetSource, tempPath); // send start signal of pkgmgr PkgmgrSignalSingleton::Instance().setPkgname( @@ -462,48 +497,62 @@ WidgetUpdateMode::Type JobWidgetInstall::CalcWidgetUpdatePolicy( ConfigParserData JobWidgetInstall::getWidgetDataFromXML( const std::string &widgetSource, - bool fromBrowser, WrtDB::PkgType isOspsvc) + const std::string &tempPath, + WrtDB::PackagingType pkgType, + bool isDRM) { + // Parse config + ParserRunner parser; + ConfigParserData configInfo; + Try { - // Parse config - ParserRunner parser; - ConfigParserData configInfo; - - if (fromBrowser) { + if (pkgType == PKG_TYPE_HOSTED_WEB_APP) { parser.Parse(widgetSource, - ElementParserPtr( - new RootParser(configInfo, - DPL::FromUTF32String( - L"widget")))); - } - else { - // Open zip file - std::unique_ptr zipFile( - new DPL::ZipInput(widgetSource)); + ElementParserPtr( + new RootParser(configInfo, + DPL::FromUTF32String( + L"widget")))); + } else { + if (!isDRM) { + std::unique_ptr zipFile( + new DPL::ZipInput(widgetSource)); - std::unique_ptr configFile; + std::unique_ptr configFile; - // Open config.xml file - if (isOspsvc == PKG_TYPE_TIZEN_WITHSVCAPP) { - configFile.reset(zipFile->OpenFile(WITH_OSP_XML)); + // Open config.xml file + if (pkgType == PKG_TYPE_HYBRID_WEB_APP) { + configFile.reset(zipFile->OpenFile(WITH_OSP_XML)); + } else { + configFile.reset(zipFile->OpenFile(CONFIG_XML)); + } + + // Extract config + DPL::BinaryQueue buffer; + DPL::AbstractWaitableInputAdapter inputAdapter(configFile.get()); + DPL::AbstractWaitableOutputAdapter outputAdapter(&buffer); + DPL::Copy(&inputAdapter, &outputAdapter); + parser.Parse(&buffer, + ElementParserPtr( + new RootParser(configInfo, + DPL::FromUTF32String( + L"widget")))); } else { - configFile.reset(zipFile->OpenFile(CONFIG_XML)); - } + // DRM widget + std::string configFile; + if (pkgType == PKG_TYPE_HYBRID_WEB_APP) { + configFile = tempPath + "/" + WITH_OSP_XML; + } else { + configFile = tempPath + "/" + CONFIG_XML; + } - // Extract config - DPL::BinaryQueue buffer; - DPL::AbstractWaitableInputAdapter inputAdapter(configFile.get()); - DPL::AbstractWaitableOutputAdapter outputAdapter(&buffer); - DPL::Copy(&inputAdapter, &outputAdapter); - parser.Parse(&buffer, - ElementParserPtr( - new RootParser(configInfo, - DPL::FromUTF32String( - L"widget")))); + parser.Parse(configFile, + ElementParserPtr( + new RootParser(configInfo, + DPL::FromUTF32String( + L"widget")))); + } } - - return configInfo; } Catch(DPL::ZipInput::Exception::OpenFailed) { @@ -520,11 +569,17 @@ ConfigParserData JobWidgetInstall::getWidgetDataFromXML( LogError("Failed to extract config.xml file"); return ConfigParserData(); } + Catch(DPL::FileInput::Exception::OpenFailed) + { + LogError("Failed to open config.xml file"); + return ConfigParserData(); + } Catch(ElementParser::Exception::ParseError) { LogError("Failed to parse config.xml file"); return ConfigParserData(); } + return configInfo; } WidgetUpdateInfo JobWidgetInstall::detectWidgetUpdate( @@ -709,58 +764,68 @@ void JobWidgetInstall::displayWidgetInfo() } WrtDB::PackagingType JobWidgetInstall::checkPackageType( - const std::string &widgetSource) + const std::string &widgetSource, + const std::string &tempPath) { - using namespace WrtDB; - - PackagingType pType = PKG_TYPE_UNKNOWN; - std::unique_ptr zipFile; + // Check installation type (config.xml or widget.wgt) + if (hasExtension(widgetSource, XML_EXTENSION)) { + LogInfo("Hosted app installation"); + return PKG_TYPE_HOSTED_WEB_APP; + } - Try - { - // Open zip file - zipFile.reset(new DPL::ZipInput(widgetSource)); + if (m_isDRM) { + std::string configFile = tempPath + "/" + CONFIG_XML; + if (WrtUtilFileExists(configFile)) { + return PKG_TYPE_NOMAL_WEB_APP; + } - } - Catch(DPL::ZipInput::Exception::OpenFailed) - { - LogError("Failed to open widget package"); - return PKG_TYPE_UNKNOWN; - } + configFile = tempPath + "/" + WITH_OSP_XML; + if (WrtUtilFileExists(configFile)) { + return PKG_TYPE_HYBRID_WEB_APP; + } + } else { + std::unique_ptr zipFile; - Try - { - // Open config.xml file in package root - std::unique_ptr configFile( - zipFile->OpenFile(CONFIG_XML)); - pType = PKG_TYPE_TIZEN_WEBAPP; - } - Catch(DPL::ZipInput::Exception::OpenFileFailed) - { - LogWarning("Could not find ./config.xml"); - } + Try + { + // Open zip file + zipFile.reset(new DPL::ZipInput(widgetSource)); - Try - { - // Open config.xml file in package root - std::unique_ptr configFile( - zipFile->OpenFile(WITH_OSP_XML)); - if (pType == PKG_TYPE_TIZEN_WEBAPP) { - LogWarning("Two config.xml's found. Application type is unknown."); + } + Catch(DPL::ZipInput::Exception::OpenFailed) + { + LogDebug("Failed to open widget package"); return PKG_TYPE_UNKNOWN; } - pType = PKG_TYPE_TIZEN_WITHSVCAPP; - } - Catch(DPL::ZipInput::Exception::OpenFileFailed) - { - LogWarning("Could not find ./res/wgt/config.xml"); - } + Try + { + // Open config.xml file in package root + std::unique_ptr configFile( + zipFile->OpenFile(CONFIG_XML)); + return PKG_TYPE_NOMAL_WEB_APP; + } + Catch(DPL::ZipInput::Exception::OpenFileFailed) + { + LogDebug("Could not find config.xml"); + } + + Try + { + // Open config.xml file in package root + std::unique_ptr configFile( + zipFile->OpenFile(WITH_OSP_XML)); - if (pType == PKG_TYPE_UNKNOWN) { - LogWarning("config.xml not found. Application type is unknown."); + return PKG_TYPE_HYBRID_WEB_APP; + } + Catch(DPL::ZipInput::Exception::OpenFileFailed) + { + LogDebug("Could not find wgt/config.xml"); + return PKG_TYPE_UNKNOWN; + } } - return pType; + + return PKG_TYPE_UNKNOWN; } bool JobWidgetInstall::detectResourceEncryption(const WrtDB::ConfigParserData &configData) @@ -776,5 +841,54 @@ bool JobWidgetInstall::detectResourceEncryption(const WrtDB::ConfigParserData &c return false; } +bool JobWidgetInstall::isDRMWidget(std::string widgetPath) +{ + drm_bool_type_e is_drm_file = DRM_UNKNOWN; + int ret = -1; + + /* TODO : + ret = drm_is_drm_file(widgetPath.c_str(), &is_drm_file); + if(DRM_RETURN_SUCCESS == ret && DRM_TRUE == is_drm_file) { + */ + + /* blow code temporary code for drm. */ + ret = drm_oem_intel_isDrmFile(const_cast(widgetPath.c_str())); + if ( 1 == ret) { + return true; + } else { + return false; + } +} + +bool JobWidgetInstall::DecryptDRMWidget(std::string widgetPath, + std::string destPath) +{ + /* TODO : + drm_trusted_sapps_decrypt_package_info_s package_info; + + strncpy(package_info.sadcf_filepath, widgetPath.c_str(), + sizeof(package_info.sadcf_filepath)); + strncpy(package_info.decrypt_filepath, destPath.c_str(), + sizeof(package_info.decrypt_filepath)); + + drm_trusted_request_type_e requestType = + DRM_TRUSTED_REQ_TYPE_SAPPS_DECRYPT_PACKAGE; + + int ret = drm_trusted_handle_request(requestType, + (void *)&package_info, NULL); + if (DRM_TRUSTED_RETURN_SUCCESS == ret) { + return true; + } else { + return false; + } + */ + if (drm_oem_intel_decrypt_package(const_cast(widgetPath.c_str()), + const_cast(destPath.c_str())) != 0) { + return true; + } else { + return false; + } +} + } //namespace WidgetInstall } //namespace Jobs diff --git a/src/jobs/widget_install/job_widget_install.h b/src/jobs/widget_install/job_widget_install.h index 6e4281b..fa39392 100644 --- a/src/jobs/widget_install/job_widget_install.h +++ b/src/jobs/widget_install/job_widget_install.h @@ -48,6 +48,8 @@ class JobWidgetInstall : Exceptions::Type m_exceptionCaught; std::string m_exceptionMessage; WidgetUpdateInfo m_widgetUpdateInfo; + bool m_needEncryption; + bool m_isDRM; enum class ConfigureResult { @@ -58,10 +60,12 @@ class JobWidgetInstall : const WrtDB::ConfigParserData &configData, const WidgetUpdateInfo &update, - bool browserRequest); + const std::string &tempPath); static WrtDB::ConfigParserData getWidgetDataFromXML( const std::string &widgetSource, - bool fromBrowser, WrtDB::PkgType isOspsvc); + const std::string &tempPath, + WrtDB::PackagingType pkgType, + bool isDRM); static WidgetUpdateInfo detectWidgetUpdate( const WrtDB::ConfigParserData &configInfo); WidgetUpdateMode::Type CalcWidgetUpdatePolicy( @@ -70,12 +74,17 @@ class JobWidgetInstall : bool setTizenId(const WrtDB::ConfigParserData &configInfo, ConfigureResult result); void displayWidgetInfo(); - void configureWidgetLocation(const std::string & widgetPath, bool browserRequest); + void configureWidgetLocation(const std::string & widgetPath, + const std::string &tempPath); WrtDB::PackagingType checkPackageType( - const std::string &widgetSorce); + const std::string &widgetSource, + const std::string &tempPath); bool detectResourceEncryption(const WrtDB::ConfigParserData &configData); std::string generateTizenId(); + bool isDRMWidget(std::string widgetPath); + bool DecryptDRMWidget(std::string widgetPath, std::string destPath); + ConfigureResult PrePareInstallation(const std::string &widgetPath); public: /** diff --git a/src/jobs/widget_install/task_ace_check.cpp b/src/jobs/widget_install/task_ace_check.cpp index 616a1bd..c1b0a98 100644 --- a/src/jobs/widget_install/task_ace_check.cpp +++ b/src/jobs/widget_install/task_ace_check.cpp @@ -95,7 +95,8 @@ void TaskAceCheck::StepAceCheck() void TaskAceCheck::StepProcessAceResponse() { WrtDB::WidgetDAO dao(m_context.locations->getPkgname()); - if (m_context.locations->browserRequest()) { + if (m_context.widgetConfig.packagingType == + WrtDB::PKG_TYPE_HOSTED_WEB_APP) { return; } diff --git a/src/jobs/widget_install/task_certify.cpp b/src/jobs/widget_install/task_certify.cpp index f060447..532c206 100755 --- a/src/jobs/widget_install/task_certify.cpp +++ b/src/jobs/widget_install/task_certify.cpp @@ -437,7 +437,7 @@ void TaskCertify::stepAuthorInfoPopupAnswer() bool TaskCertify::isTizenWebApp() const { bool ret = FALSE; - if (m_installContext.widgetConfig.type.appType + if (m_installContext.widgetConfig.webAppType.appType == WrtDB::AppType::APP_TYPE_TIZENWEBAPP) ret = TRUE; diff --git a/src/jobs/widget_install/task_encrypt_resource.cpp b/src/jobs/widget_install/task_encrypt_resource.cpp index cbcf554..d133d83 100644 --- a/src/jobs/widget_install/task_encrypt_resource.cpp +++ b/src/jobs/widget_install/task_encrypt_resource.cpp @@ -21,6 +21,8 @@ */ #include "task_encrypt_resource.h" +#undef __USE_FILE_OFFSET64 + #include #include #include diff --git a/src/jobs/widget_install/task_file_manipulation.cpp b/src/jobs/widget_install/task_file_manipulation.cpp index 48abe91..ae02d73 100644 --- a/src/jobs/widget_install/task_file_manipulation.cpp +++ b/src/jobs/widget_install/task_file_manipulation.cpp @@ -61,7 +61,7 @@ void TaskFileManipulation::StepCreateDirs() // If package type is widget with osp service, we don't need to make bin // and src directory - if (m_context.widgetConfig.pType == PKG_TYPE_TIZEN_WITHSVCAPP) { + if (m_context.widgetConfig.packagingType == PKG_TYPE_HYBRID_WEB_APP) { LogDebug("Doesn't need to create resource directory"); } else { LogDebug("Create resource directory"); @@ -82,7 +82,7 @@ void TaskFileManipulation::StepRenamePath() ThrowMsg(Exceptions::InternalError, "No Package name exists."); } - if (m_context.widgetConfig.pType == PKG_TYPE_TIZEN_WITHSVCAPP) { + if (m_context.widgetConfig.packagingType == PKG_TYPE_HYBRID_WEB_APP) { instDir = m_context.locations->getPackageInstallationDir(); } else { instDir = m_context.locations->getSourceDir(); @@ -108,7 +108,7 @@ void TaskFileManipulation::StepAbortRenamePath() { LogDebug("[Rename Widget Path] Aborting.... (Rename path)"); std::string widgetPath; - if (m_context.widgetConfig.pType == PKG_TYPE_TIZEN_WITHSVCAPP) { + if (m_context.widgetConfig.packagingType == PKG_TYPE_HYBRID_WEB_APP) { widgetPath = m_context.locations->getPackageInstallationDir(); } else { widgetPath = m_context.locations->getSourceDir(); diff --git a/src/jobs/widget_install/task_manifest_file.cpp b/src/jobs/widget_install/task_manifest_file.cpp index 0c97454..3acb023 100644 --- a/src/jobs/widget_install/task_manifest_file.cpp +++ b/src/jobs/widget_install/task_manifest_file.cpp @@ -182,8 +182,9 @@ void TaskManifestFile::stepCopyIconFiles() targetFile << GlobalConfig::GetUserWidgetDesktopIconPath() << "/"; targetFile << getIconTargetFilename(*locale); - if (m_context.locations->browserRequest()) - { + + if (m_context.widgetConfig.packagingType == + WrtDB::PKG_TYPE_HOSTED_WEB_APP) { m_context.locations->setIconTargetFilenameForLocale(targetFile.str()); } diff --git a/src/jobs/widget_install/task_widget_config.cpp b/src/jobs/widget_install/task_widget_config.cpp index c1f0706..420c0dd 100644 --- a/src/jobs/widget_install/task_widget_config.cpp +++ b/src/jobs/widget_install/task_widget_config.cpp @@ -257,7 +257,7 @@ void TaskWidgetConfig::ProcessStartFile(const DPL::OptionalString& path, } else { // set property data for hosted start url // Hosted start url only support TIZEN WebApp - if (m_installContext.widgetConfig.type == + if (m_installContext.widgetConfig.webAppType == APP_TYPE_TIZENWEBAPP) { const char *startPath = @@ -423,7 +423,7 @@ void TaskWidgetConfig::StepShowWidgetInfo() void TaskWidgetConfig::StepCheckMinVersionInfo() { if (!isMinVersionCompatible( - m_installContext.widgetConfig.type.appType, + m_installContext.widgetConfig.webAppType.appType, m_installContext.widgetConfig.minVersion)) { std::string label = WIDGET_NOT_COMPATIBLE + QUESTION; createInstallPopup(PopupType::WIDGET_MIN_VERSION, label); @@ -448,14 +448,14 @@ void TaskWidgetConfig::StepVerifyFeatures() // check feature vender for permission // WAC, TIZEN WebApp cannot use other feature - if (!isFeatureAllowed(m_installContext.widgetConfig.type.appType, + if (!isFeatureAllowed(m_installContext.widgetConfig.webAppType.appType, it->name)) { LogInfo("This application type not allowed to use this feature"); ThrowMsg( Exceptions::WidgetConfigFileInvalid, "This app type [" << - m_installContext.widgetConfig.type.getApptypeToString() << + m_installContext.widgetConfig.webAppType.getApptypeToString() << "] cannot be allowed to use [" << DPL::ToUTF8String(it->name) + "] feature"); } @@ -522,9 +522,9 @@ void TaskWidgetConfig::setApplicationType() currentAppType = APP_TYPE_TIZENWEBAPP; } - if (widgetInfo->type == APP_TYPE_UNKNOWN) { - widgetInfo->type = currentAppType; - } else if (widgetInfo->type == currentAppType) { + if (widgetInfo->webAppType == APP_TYPE_UNKNOWN) { + widgetInfo->webAppType = currentAppType; + } else if (widgetInfo->webAppType == currentAppType) { continue; } else { ThrowMsg(Exceptions::WidgetConfigFileInvalid, @@ -533,11 +533,11 @@ void TaskWidgetConfig::setApplicationType() } // If there is no define, type set to WAC 2.0 - if (widgetInfo->type == APP_TYPE_UNKNOWN) { - widgetInfo->type = APP_TYPE_WAC20; + if (widgetInfo->webAppType == APP_TYPE_UNKNOWN) { + widgetInfo->webAppType = APP_TYPE_WAC20; } - LogInfo("type = [" << widgetInfo->type.getApptypeToString() << "]"); + LogInfo("type = [" << widgetInfo->webAppType.getApptypeToString() << "]"); } bool TaskWidgetConfig::isFeatureAllowed(WrtDB::AppType appType, @@ -644,7 +644,7 @@ bool TaskWidgetConfig::isMinVersionCompatible(WrtDB::AppType appType, bool TaskWidgetConfig::isTizenWebApp() const { bool ret = FALSE; - if (m_installContext.widgetConfig.type.appType + if (m_installContext.widgetConfig.webAppType.appType == WrtDB::AppType::APP_TYPE_TIZENWEBAPP) ret = TRUE; diff --git a/src/jobs/widget_install/widget_unzip.cpp b/src/jobs/widget_install/widget_unzip.cpp new file mode 100644 index 0000000..b8d0b98 --- /dev/null +++ b/src/jobs/widget_install/widget_unzip.cpp @@ -0,0 +1,210 @@ +/* + * Copyright (c) 2011 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * @file widget_unzip.cpp + * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com) + * @version 1.0 + * @brief Implementation file for installer task unzip + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace WrtDB; + +namespace { +struct PathAndFilePair +{ + std::string path; + std::string file; + + PathAndFilePair(const std::string &p, + const std::string &f) : + path(p), + file(f) + { + } +}; + +PathAndFilePair SplitFileAndPath(const std::string &filePath) +{ + std::string::size_type position = filePath.rfind('/'); + + // Is this only a file without a path ? + if (position == std::string::npos) { + return PathAndFilePair(std::string(), filePath); + } + + // This is full file-path pair + return PathAndFilePair(filePath.substr(0, + position), + filePath.substr(position + 1)); +} +} + +namespace Jobs { +namespace WidgetInstall { +WidgetUnzip::WidgetUnzip(std::string source, std::string path) : + m_source(source), + m_destPath(path) +{ + LogDebug("WidgetUnzip"); +} + +void WidgetUnzip::ExtractFile(DPL::ZipInput::File *input, + const std::string &destFileName) +{ + Try + { + DPL::AbstractWaitableInputAdapter inputAdapter(input); + DPL::FileOutput output(destFileName); + + DPL::Copy(&inputAdapter, &output); + } + Catch(DPL::FileOutput::Exception::OpenFailed) + { + ReThrowMsg(Exceptions::ExtractFileFailed, destFileName); + } + Catch(DPL::CopyFailed) + { + ReThrowMsg(Exceptions::ExtractFileFailed, destFileName); + } +} + +void WidgetUnzip::UnzipWidget() +{ + UnzipPrepare(); + UnzipProgress(); +} + +void WidgetUnzip::UnzipPrepare() +{ + LogInfo("Prepare to unzip..."); + + Try + { + m_zip.reset(new DPL::ZipInput(m_source)); + LogInfo("Widget package comment: " << m_zip->GetGlobalComment()); + + // Widget package must not be empty + if (m_zip->empty()) { + ThrowMsg(Exceptions::ZipEmpty, m_source); + } + + // Set iterator to first file + m_zipIterator = m_zip->begin(); + } + Catch(DPL::ZipInput::Exception::OpenFailed) + { + ReThrowMsg(Exceptions::OpenZipFailed, m_source); + } +} + +void WidgetUnzip::UnzipProgress() +{ + + // Show file info + LogInfo("Unzipping: '" << m_zipIterator->name << + "', Comment: '" << m_zipIterator->comment << + "', Compressed size: " << m_zipIterator->compressedSize << + ", Uncompressed size: " << m_zipIterator->uncompressedSize); + + + // Normalize file paths + // FIXME: Implement checking for invalid characters + + // Extract file or path + std::string fileName = m_zipIterator->name; + + if (fileName[fileName.size() - 1] == '/') { + // This is path + std::string newPath = m_destPath + "/" + + fileName.substr(0, fileName.size() - 1); + LogPedantic("Path to extract: " << newPath); + + // Create path in case of it is empty + createTempPath(newPath); + } else { + // This is regular file + std::string fileExtractPath = m_destPath + "/" + fileName; + + LogPedantic("File to extract: " << fileExtractPath); + + // Split into pat & file pair + PathAndFilePair pathAndFile = SplitFileAndPath(fileExtractPath); + + LogPedantic("Path and file: " << + pathAndFile.path << + " : " << pathAndFile.file); + + // First, ensure that path exists + createTempPath(pathAndFile.path); + + Try + { + // Open file + std::unique_ptr file( + m_zip->OpenFile(fileName)); + + // Extract single file + ExtractFile(file.get(), fileExtractPath); + } + Catch(DPL::ZipInput::Exception::OpenFileFailed) + { + ThrowMsg(Exceptions::ExtractFileFailed, fileName); + } + } + + // Check whether there are more files to extract + if (++m_zipIterator == m_zip->end()) { + LogInfo("Unzip progress finished successfuly"); + m_zip.reset(); + } else { + UnzipProgress(); + } +} + +void WidgetUnzip::UnzipDRMWidget() +{ + LogDebug("Decrypt drm widget"); + drm_trusted_sapps_decrypt_package_info_s package_info; + + strncpy(package_info.sadcf_filepath, m_source.c_str(), + sizeof(package_info.sadcf_filepath)); + strncpy(package_info.decrypt_filepath, m_destPath.c_str(), + sizeof(package_info.decrypt_filepath)); + + drm_trusted_request_type_e requestType = + DRM_TRUSTED_REQ_TYPE_SAPPS_DECRYPT_PACKAGE; + + int ret = drm_trusted_handle_request(requestType, + (void *)&package_info, NULL); + if (DRM_TRUSTED_RETURN_SUCCESS != ret) { + LogDebug("Failed unzip drm widget"); + ThrowMsg(Exceptions::ExtractFileFailed, m_destPath); + } +} +} //namespace WidgetInstall +} //namespace Jobs diff --git a/src/jobs/widget_install/widget_unzip.h b/src/jobs/widget_install/widget_unzip.h new file mode 100644 index 0000000..7c7b4ca --- /dev/null +++ b/src/jobs/widget_install/widget_unzip.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2011 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * @file widget_unzip.cpp + * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com) + * @version 1.0 + * @brief Implementation file for installer task unzip + */ +#ifndef INSTALLER_CORE_JOS_WIDGET_INSTALL_WIDGET_UNZIP_H +#define INSTALLER_CORE_JOS_WIDGET_INSTALL_WIDGET_UNZIP_H + +#include +#include + +#include + +class InstallerContext; + +namespace Jobs { +namespace WidgetInstall { +class WidgetUnzip +{ + private: + // Installation context + std::string m_source; + std::string m_destPath; + + // Unzip state + std::unique_ptr m_zip; + DPL::ZipInput::const_iterator m_zipIterator; + + void ExtractFile(DPL::ZipInput::File *input, + const std::string &destFileName); + + void UnzipPrepare(); + void UnzipProgress(); + + public: + WidgetUnzip(std::string m_source, std::string m_destPath); + void UnzipWidget(); + void UnzipDRMWidget(); +}; +} //namespace WidgetInstall +} //namespace Jobs + +#endif // INSTALLER_CORE_JOS_WIDGET_INSTALL_WIDGET_UNZIP_H diff --git a/src/jobs/widget_uninstall/job_widget_uninstall.cpp b/src/jobs/widget_uninstall/job_widget_uninstall.cpp index 0bfc879..392106f 100644 --- a/src/jobs/widget_uninstall/job_widget_uninstall.cpp +++ b/src/jobs/widget_uninstall/job_widget_uninstall.cpp @@ -77,7 +77,7 @@ JobWidgetUninstall::JobWidgetUninstall(const std::string & widgetPkgName, AddTask(new TaskSmack(m_context)); AddTask(new TaskCheck(m_context)); - if (dao.getPkgType() == PKG_TYPE_TIZEN_WITHSVCAPP) { + if (dao.getPackagingType() == PKG_TYPE_HYBRID_WEB_APP) { AddTask(new TaskUninstallOspsvc(m_context)); } AddTask(new TaskRemoveFiles(m_context)); diff --git a/src/misc/widget_location.cpp b/src/misc/widget_location.cpp index 712f344..b899bec 100644 --- a/src/misc/widget_location.cpp +++ b/src/misc/widget_location.cpp @@ -34,6 +34,11 @@ WidgetLocation::DirectoryDeletor::DirectoryDeletor() m_dirpath = Jobs::WidgetInstall::createTempPath(); } +WidgetLocation::DirectoryDeletor::DirectoryDeletor(std::string tempPath) +{ + m_dirpath = tempPath; +} + WidgetLocation::DirectoryDeletor::~DirectoryDeletor() { LogDebug("Removing widget installation temporary directory: " << m_dirpath.c_str()); @@ -45,11 +50,12 @@ std::string WidgetLocation::DirectoryDeletor::getTempPath() const return m_dirpath; } -WidgetLocation::WidgetLocation() : m_browser(false) +WidgetLocation::WidgetLocation() { } -WidgetLocation::WidgetLocation(const std::string & widgetname) : m_pkgname(widgetname), m_browser(false) +WidgetLocation::WidgetLocation(const std::string & widgetname) : + m_pkgname(widgetname) { } @@ -59,16 +65,26 @@ WidgetLocation::~WidgetLocation() WidgetLocation::WidgetLocation(const std::string & widgetname, std::string sourcePath, - bool browserRequest, - WrtDB::PkgType t): + WrtDB::PackagingType t): m_pkgname(widgetname), m_widgetSource(sourcePath), - m_browser(browserRequest), m_type(t), m_temp(new WidgetLocation::DirectoryDeletor()) { } +WidgetLocation::WidgetLocation(const std::string & widgetname, + std::string sourcePath, + std::string dirPath, + WrtDB::PackagingType t): + m_pkgname(widgetname), + m_widgetSource(sourcePath), + m_type(t), + m_temp(new + WidgetLocation::DirectoryDeletor(dirPath)) +{ +} + // TODO cache all these paths std::string WidgetLocation::getInstallationDir() const { @@ -123,14 +139,9 @@ std::string WidgetLocation::getTemporaryPackageDir() const return m_temp->getTempPath(); } -bool WidgetLocation::browserRequest() const -{ - return m_browser; -} - std::string WidgetLocation::getTemporaryRootDir() const { - if(m_type == WrtDB::PKG_TYPE_TIZEN_WITHSVCAPP) + if(m_type == WrtDB::PKG_TYPE_HYBRID_WEB_APP) { return getTemporaryPackageDir() + WrtDB::GlobalConfig::GetWidgetSrcPath(); } @@ -142,7 +153,7 @@ std::string WidgetLocation::getTemporaryRootDir() const std::string WidgetLocation::getConfigurationDir() const { - if(m_browser) + if(m_type == WrtDB::PKG_TYPE_HOSTED_WEB_APP) { std::string path = "."; int index = m_widgetSource.find_last_of("\\/"); diff --git a/src/misc/widget_location.h b/src/misc/widget_location.h index 84106e4..ab9fa29 100644 --- a/src/misc/widget_location.h +++ b/src/misc/widget_location.h @@ -57,6 +57,7 @@ class WidgetLocation { public: DirectoryDeletor(); + DirectoryDeletor(std::string tempPath); ~DirectoryDeletor(); std::string getTempPath() const; private: @@ -84,14 +85,17 @@ public: * @brief WidgetLocation Builds paths for widget location during installation * * @param widgetname name of widget - * @param browserRequest is browser Request * @param sourcePath given source path * @param t declaraced type of widget if type is needed * * In destruction removes temporary directory */ WidgetLocation(const std::string & widgetname, std::string sourcePath, - bool browserRequest = false, WrtDB::PkgType t = WrtDB::PKG_TYPE_TIZEN_WEBAPP); + WrtDB::PackagingType t = WrtDB::PKG_TYPE_NOMAL_WEB_APP); + + WidgetLocation(const std::string & widgetname, std::string sourcePath, + std::string dirPath, + WrtDB::PackagingType t = WrtDB::PKG_TYPE_NOMAL_WEB_APP); ~WidgetLocation(); // Installed paths @@ -105,8 +109,6 @@ public: std::string getBackupBinaryDir() const; // /opt/apps/[package]/backup/bin std::string getBackupExecFile() const; // /opt/apps/[package]/backup/bin/[package] - bool browserRequest() const; - // Temporary paths /** * @brief getTemporaryRootDir @@ -178,10 +180,9 @@ public: private: std::string m_widgetSource; // Source widget zip file/widget url - bool m_browser; // is browser request installation std::string m_pkgname; //name of package std::string m_iconPath; //installed icon path - WrtDB::PkgType m_type; + WrtDB::PackagingType m_type; std::shared_ptr m_temp; //directory WrtDB::ExternalLocationList m_externals; }; -- 2.7.4