Change the certificate file set timing.
authorSungman Kim <ssungmai.kim@samsung.com>
Wed, 3 Apr 2013 11:27:13 +0000 (20:27 +0900)
committerGerrit Code Review <gerrit2@kim11>
Thu, 11 Apr 2013 02:19:24 +0000 (11:19 +0900)
Certificate file set in webkit make delay for web app launching time. To avoid launching delay, change the timing of certificate file set.
While the first https reqeust is requested, certificate file set is accomplished.
In webkit, just call the gobject_set with file path.

[Title] Change the certificate file set timing.
[Issue#] N/A
[Problem] Certificate file set in webkit make the delay for launching time.
[Cause] g_tls_file_database_new take a long time.
[Solution] Change the timing of certificate file set and just call the gobject_set with file path.
[SCMRequest] N/A

Change-Id: I0e0f77d6ae239e35620e9bb55d00e77244330ac1

Source/WebKit2/WebProcess/efl/WebProcessEfl.cpp

index e1c5bc0..eed179f 100755 (executable)
@@ -361,17 +361,11 @@ void WebProcess::setCertificateFile(const WTF::String& certificateFile)
 {
 #if USE(SOUP)
     SoupSession* session = WebCore::ResourceHandle::defaultSession();
-    GError* error = NULL;
 
-    GTlsDatabase* tlsdb = g_tls_file_database_new(certificateFile.utf8().data(), &error);
-    if (!error && tlsdb) {
-        g_object_set(session,
-                       SOUP_SESSION_SSL_STRICT, FALSE,
-                       SOUP_SESSION_TLS_DATABASE, tlsdb, NULL);
-    }
-
-    if (tlsdb)
-        g_object_unref (tlsdb);
+    TIZEN_LOGE("setCertificateFile() is called. call g_object_set().");
+    g_object_set(session,
+                   SOUP_SESSION_SSL_STRICT, FALSE,
+                   SOUP_SESSION_CERTIFICATE_PATH, certificateFile.utf8().data(), NULL);
 #endif
 }
 #endif