Remove useless parameters of VCoreInit 90/41390/1 accepted/tizen/mobile/20150615.071131 accepted/tizen/tv/20150615.071141 accepted/tizen/wearable/20150615.071155 submit/tizen/20150615.042110
authorkyungwook tak <k.tak@samsung.com>
Mon, 15 Jun 2015 02:58:40 +0000 (11:58 +0900)
committerkyungwook tak <k.tak@samsung.com>
Mon, 15 Jun 2015 02:59:15 +0000 (11:59 +0900)
Change-Id: I2df6cf7f398505e9f77eb0e6c77a55cc4d6a4942
Signed-off-by: kyungwook tak <k.tak@samsung.com>
CMakeLists.txt
packaging/cert-svc.spec
vcore/src/vcore/VCore.cpp
vcore/src/vcore/VCore.h

index 6747117..b678e0a 100644 (file)
@@ -68,6 +68,7 @@ INCLUDE_DIRECTORIES(
 
 ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
 IF(TIZEN_FEAT_PROFILE_CERT_SVC_OCSP_CRL)
+MESSAGE("TIZEN_FEATURE_CERT_SVC_OCSP_CRL ENABLED")
 ADD_DEFINITIONS("-DTIZEN_FEATURE_CERT_SVC_OCSP_CRL")
 ENDIF(TIZEN_FEAT_PROFILE_CERT_SVC_OCSP_CRL)
 
index d940aa0..f5f64ce 100644 (file)
@@ -1,4 +1,3 @@
-#sbs-git:slp/pkgs/c/cert-svc cert-svc 1.0.1 ad7eb7efcefb37b06017c69cb2fc44e6f7b6cab7
 Name:    cert-svc
 Summary: Certification service
 Version: 1.0.1
index 287b37f..3d7f572 100644 (file)
 #include <dpl/assert.h>
 #include <dpl/log/log.h>
 
-#ifdef TIZEN_FEATURE_CERT_SVC_OCSP_CRL
 namespace {
+
+#ifdef TIZEN_FEATURE_CERT_SVC_OCSP_CRL
 DPL::DB::ThreadDatabaseSupport *threadInterface = NULL;
-} // namespace anonymous
+const std::string DatabasePath              = "/opt/dbspace/.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";
+
+} // namespace anonymous
+
 namespace ValidationCore {
 
 void AttachToThreadRO(void)
@@ -86,30 +92,26 @@ DPL::DB::ThreadDatabaseSupport& ThreadInterface(void) {
     return *threadInterface;
 }
 #endif
-bool VCoreInit(const std::string& configFilePath,
-               const std::string& configSchemaPath,
-               const std::string& databasePath)
+void VCoreInit()
 {
 #ifdef TIZEN_FEATURE_CERT_SVC_OCSP_CRL
-       if(threadInterface) {
+       if (threadInterface) {
         LogDebug("Already Initialized");
-        return true;
+        return;
     }
 
     threadInterface = new DPL::DB::ThreadDatabaseSupport(
-        databasePath.c_str(),
+        DatabasePath.c_str(),
         DPL::DB::SqlConnection::Flag::UseLucene);
 #endif
+
     SSL_library_init();
-//    g_thread_init(NULL);
     g_type_init();
 
-    LogDebug("Initializing VCore");
     Config &globalConfig = ConfigSingleton::Instance();
-    globalConfig.setXMLConfigPath(configFilePath) &&
-        globalConfig.setXMLSchemaPath(configSchemaPath);
 
-    return true;
+    globalConfig.setXMLConfigPath(FingerprintListPath);
+    globalConfig.setXMLSchemaPath(FingerprintListSchemaPath);
 }
 
 void VCoreDeinit()
index d293563..fd46bbd 100644 (file)
 
 namespace ValidationCore {
 /*
- * configFilePath - path to XML config file with certificates configuration
- *
- * configSchemaPath - XMLschema of config file
- *
- * databasePath - path to database with OCSP/CRL cache.
- *
  * This function could be run only once. If you call it twice it will
  * return false and non data will be set.
  *
  * This function must be call before AttachToThread function.
  */
-bool VCoreInit(const std::string& configFilePath,
-               const std::string& configSchemaPath,
-               const std::string& databasePath);
+void VCoreInit(void);
 
 /*
  * This function will free internal structures responsible for db connection.