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)
#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)
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()
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.