+++ /dev/null
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(dukgenerator C)
-
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(EXEC_PREFIX "\${prefix}")
-SET(LIBDIR "\${prefix}/lib")
-SET(INCLUDEDIR "\${prefix}/include")
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
-
-SET(pc_requires " cryptsvc ")
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED ${pc_requires})
-
-FOREACH(flag ${pkgs_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(source_dir "./src")
-SET(include_dir "./inc")
-
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${EXTRA_CFLAGS}")
-
-##################################################################################################################
-SET(SRCS
- ${source_dir}/dukgen.c
-)
-
-SET(libcryptsvc_LDFLAGS " -module -avoid-version ${pkgs_LDFLAGS} ")
-SET(libcryptsvc_CFLAGS " ${CFLAGS} -fvisibility=hidden -g -fPIC -I${CMAKE_CURRENT_SOURCE_DIR}/inc ")
-SET(libcryptsvc_CPPFLAGS " -DPIC ")
-
-#ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
-ADD_LIBRARY(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-SET_TARGET_PROPERTIES(
- ${PROJECT_NAME}
- PROPERTIES
- VERSION ${FULLVER}
- SOVERSION ${MAJORVER}
-)
-##################################################################################################################
-
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" STREQUAL "arm")
- ADD_DEFINITIONS("-DTARGET")
- MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-SET(PC_NAME ${PROJECT_NAME})
-SET(PC_DESCRIPTION ${DESCRIPTION})
-SET(PC_LDFLAGS -l${PROJECT_NAME})
-SET(PC_REQUIRED ${pc_requires})
-CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
-
-INSTALL(FILES ${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION /usr/include)
-
-ADD_DEFINITIONS(-D_bool_cryptsvc)
+++ /dev/null
-# Package Information for pkg-config
-
-prefix=@PREFIX@
-libdir=@PREFIX@/lib
-includedir=@PREFIX@/include
-
-Name: @PC_NAME@
-Description: @DESCRIPTION@
-Version: @FULLVER@
-Requires: @PC_REQUIRED@
-Libs: -L${libdir} @PC_LDFLAGS@
-Cflags: -I${includedir}
-
+++ /dev/null
-//
-// Copyright (c) 2013 Samsung Electronics Co., Ltd.
-//
-// 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.
-//
-
-#ifndef _DUK_GENERATOR_H_
-#define _DUK_GENERATOR_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-__attribute__((visibility("hidden")))
-char* GetDeviceUniqueKey(char* pAppId, int idLen, int keyLen);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //_DUK_GENERATOR_H_
-
-
-
+++ /dev/null
-Name: dukgenerator
-Summary: nothing
-Version: 1.0.0
-Release: 7
-Group: security
-License: Apache License, Version 2.0
-Source0: %{name}-%{version}.tar.gz
-BuildRequires: cmake
-
-BuildRequires: pkgconfig(openssl)
-BuildRequires: pkgconfig(cryptsvc)
-
-%description
-
-%package devel
-Summary: nothing
-Group: security
-Requires: %{name} = %{version}-%{release}
-
-%description devel
-
-%prep
-%setup -q
-
-%build
-MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DDESCRIPTION=%{summary}
-make %{?jobs:-j%jobs}
-
-
-%install
-rm -rf %{buildroot}
-#%make_install
-%{__make} DESTDIR=%{?buildroot:%{buildroot}} INSTALL_ROOT=%{?buildroot:%{buildroot}} install
-rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir
-find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f --
-
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
-
-
-%files
-%{_libdir}/*.a
-%{_datadir}/license/%{name}
-
-
-%files devel
-%{_includedir}/*
-%{_libdir}/pkgconfig/dukgenerator.pc
+++ /dev/null
-//
-// Copyright (c) 2013 Samsung Electronics Co., Ltd.
-//
-// 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.
-//
-//
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <openssl/evp.h>
-#include <openssl/rand.h>
-#include <SecCryptoSvc.h>
-#include <dukgen.h>
-
-char* GetDeviceUniqueKey(char* pAppId, int idLen, int keyLen)
-{
- unsigned char* pUniqueKey = NULL;
- char* pDuk = NULL;
- bool result = true;
-
- pUniqueKey = (unsigned char*)calloc(keyLen,1);
- result = SecFrameGeneratePlatformUniqueKey((unsigned int)keyLen , pUniqueKey);
- if(result == false)
- {
- free(pUniqueKey);
- return NULL;
- }
-
- pDuk = (char*)calloc(keyLen, 1);
- PKCS5_PBKDF2_HMAC_SHA1(pAppId, idLen, (unsigned char*)pUniqueKey, keyLen, 1, keyLen, (unsigned char*)pDuk);
- free(pUniqueKey);
-
- return pDuk;
-}
+++ /dev/null
-Name: dukgenerator
-Summary: nothing
-Version: 1.0.0
-Release: 7
-Group: security
-License: Apache License, Version 2.0
-Source0: %{name}-%{version}.tar.gz
-BuildRequires: cmake
-
-BuildRequires: pkgconfig(openssl)
-BuildRequires: pkgconfig(cryptsvc)
-
-%description
-
-%package devel
-Summary: nothing
-Group: security
-Requires: %{name} = %{version}-%{release}
-
-%description devel
-
-%prep
-%setup -q
-
-%build
-%if 0%{?tizen_build_binary_release_type_eng}
-export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
-export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
-export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
-%endif
-MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DDESCRIPTION=%{summary}
-make %{?jobs:-j%jobs}
-
-
-%install
-rm -rf %{buildroot}
-#%make_install
-%{__make} DESTDIR=%{?buildroot:%{buildroot}} INSTALL_ROOT=%{?buildroot:%{buildroot}} install
-rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir
-find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f --
-
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
-
-
-%files
-%{_libdir}/*.a
-%{_datadir}/license/%{name}
-
-
-%files devel
-%{_includedir}/*
-%{_libdir}/pkgconfig/dukgenerator.pc
Name: dukgenerator
Summary: nothing
-Version: 1.0.1
+Version: 1.0.0
Release: 7
Group: security
License: Apache License, Version 2.0
Source0: %{name}-%{version}.tar.gz
-
-%if "%{_repository}" == "wearable"
-
BuildRequires: cmake
BuildRequires: pkgconfig(openssl)
%setup -q
%build
-echo "########################################"
-echo "TIZEN_PROFILE_WEARABLE"
-echo "########################################"
-cp -R modules_wearable/* .
-
%if 0%{?tizen_build_binary_release_type_eng}
export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
%files devel
%{_includedir}/*
%{_libdir}/pkgconfig/dukgenerator.pc
-
-
-%else
-
-BuildRequires: cmake
-
-BuildRequires: pkgconfig(openssl)
-BuildRequires: pkgconfig(cryptsvc)
-
-%description
-
-%package devel
-Summary: nothing
-Group: security
-Requires: %{name} = %{version}-%{release}
-
-%description devel
-
-%prep
-%setup -q
-
-%build
-echo "########################################"
-echo "TIZEN_PROFILE_MOBILE"
-echo "########################################"
-cp -R modules_mobile/* .
-
-MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DDESCRIPTION=%{summary}
-make %{?jobs:-j%jobs}
-
-
-%install
-rm -rf %{buildroot}
-#%make_install
-%{__make} DESTDIR=%{?buildroot:%{buildroot}} INSTALL_ROOT=%{?buildroot:%{buildroot}} install
-rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir
-find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f --
-
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
-
-
-%files
-%{_libdir}/*.a
-%{_datadir}/license/%{name}
-
-
-%files devel
-%{_includedir}/*
-%{_libdir}/pkgconfig/dukgenerator.pc
-
-
-%endif