From: kyungwook tak Date: Mon, 15 Jun 2015 08:37:22 +0000 (+0900) Subject: Change hardcoded paths to paths provided by tzplatform-config X-Git-Tag: accepted/tizen/mobile/20150617.011929^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55bccb1e7aa9e6175fd4f67393c9883d6b9fea76;p=platform%2Fcore%2Fsecurity%2Fcert-svc.git Change hardcoded paths to paths provided by tzplatform-config Change-Id: Iecff7f70eb6378a30069be4219397f2193912d6e Signed-off-by: kyungwook tak --- diff --git a/packaging/cert-svc.spec b/packaging/cert-svc.spec index 520896a..a3bb852 100644 --- a/packaging/cert-svc.spec +++ b/packaging/cert-svc.spec @@ -9,7 +9,6 @@ Source1001: %{name}.manifest BuildRequires: cmake BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(openssl) -BuildRequires: pkgconfig(evas) BuildRequires: pkgconfig(dpl-efl) BuildRequires: pkgconfig(libsoup-2.4) BuildRequires: pkgconfig(libpcre) @@ -41,12 +40,12 @@ cp %{SOURCE1001} . %build %{!?build_type:%define build_type "Release"} %cmake . -DPREFIX=%{_prefix} \ - -DEXEC_PREFIX=%{_exec_prefix} \ - -DBINDIR=%{_bindir} \ - -DINCLUDEDIR=%{_includedir} \ - -DCMAKE_BUILD_TYPE=%{build_type} \ - -DTZ_SYS_SHARE=%TZ_SYS_SHARE \ - -DTZ_SYS_BIN=%TZ_SYS_BIN + -DEXEC_PREFIX=%{_exec_prefix} \ + -DBINDIR=%{_bindir} \ + -DINCLUDEDIR=%{_includedir} \ + -DCMAKE_BUILD_TYPE=%{build_type} \ + -DTZ_SYS_SHARE=%TZ_SYS_SHARE \ + -DTZ_SYS_BIN=%TZ_SYS_BIN make %{?jobs:-j%jobs} @@ -89,7 +88,7 @@ else fi fi -chsmack -a 'User' %TZ_SYS_DB/.cert_svc_vcore.db* +chsmack -a 'User' %{TZ_SYS_DB}/.cert_svc_vcore.db* %endif #tizen_feature_certsvc_ocsp_crl %postun /sbin/ldconfig @@ -98,24 +97,16 @@ chsmack -a 'User' %TZ_SYS_DB/.cert_svc_vcore.db* %defattr(-,root,root,-) %manifest %{name}.manifest -%attr(0755,root,root) %{_bindir}/cert_svc_create_clean_db.sh +%attr(0755,root,root) %{TZ_SYS_BIN}/cert_svc_create_clean_db.sh %{_libdir}/*.so.* #%{_bindir}/dpkg-pki-sig %{TZ_SYS_SHARE}/cert-svc/targetinfo %if 0%{?tizen_feature_certsvc_ocsp_crl} -%{_datadir}/cert-svc/cert_svc_vcore_db.sql +%{TZ_SYS_SHARE}/cert-svc/cert_svc_vcore_db.sql %endif -%{_datadir}/license/%{name} +%{TZ_SYS_SHARE}/license/%{name} %{TZ_SYS_SHARE}/cert-svc/schema/schema.xsd %dir %attr(0755,root,use_cert) %{TZ_SYS_SHARE}/cert-svc -#%dir %attr(0755,root,use_cert) %{TZ_SYS_SHARE}/cert-svc/ca-certs -#%dir %attr(0755,root,use_cert) %{TZ_SYS_SHARE}/cert-svc/ca-certs/code-signing -#%dir %attr(0755,root,use_cert) %{TZ_SYS_SHARE}/cert-svc/ca-certs/code-signing/native -#%dir %attr(0755,root,use_cert) %{TZ_SYS_SHARE}/cert-svc/ca-certs/code-signing/wac - -#%dir %attr(0775,root,use_cert) %{TZ_SYS_SHARE}/cert-svc/certs/code-signing -#%dir %attr(0775,root,use_cert) %{TZ_SYS_SHARE}/cert-svc/certs/code-signing/wac -#%dir %attr(0775,root,use_cert) %{TZ_SYS_SHARE}/cert-svc/certs/code-signing/tizen %dir %attr(0775,root,use_cert) %{TZ_SYS_SHARE}/cert-svc %dir %attr(0775,root,use_cert) %{TZ_SYS_SHARE}/cert-svc/certs %dir %attr(0775,root,use_cert) %{TZ_SYS_SHARE}/cert-svc/certs/sim diff --git a/vcore/src/vcore/VCore.cpp b/vcore/src/vcore/VCore.cpp index 3d7f572..fe1aa76 100644 --- a/vcore/src/vcore/VCore.cpp +++ b/vcore/src/vcore/VCore.cpp @@ -32,15 +32,17 @@ #include #include +#include + namespace { #ifdef TIZEN_FEATURE_CERT_SVC_OCSP_CRL DPL::DB::ThreadDatabaseSupport *threadInterface = NULL; -const std::string DatabasePath = "/opt/dbspace/.cert_svc_vcore.db"; +const std::string DatabasePath = tzplatform_mkpath(TZ_SYS_DB, ".cert_svc_vcore.db"); #endif -const std::string FingerprintListPath = "/usr/share/ca-certificates/fingerprint/fingerprint_list.xml"; -const std::string FingerprintListSchemaPath = "/usr/share/ca-certificates/fingerprint/fingerprint_list.xsd"; +const std::string FingerprintListPath = tzplatform_mkpath(TZ_SYS_SHARE, "ca-certificates/fingerprint/fingerprint_list.xml"); +const std::string FingerprintListSchemaPath = tzplatform_mkpath(TZ_SYS_SHARE, "ca-certificates/fingerprint/fingerprint_list.xsd"); } // namespace anonymous