Changeset 232834 in webkit


Ignore:
Timestamp:
Jun 14, 2018 1:57:03 AM (6 years ago)
Author:
zandobersek@gmail.com
Message:

[GTK][WPE] MiniBrowsers should be able to ignore TLS errors
https://bugs.webkit.org/show_bug.cgi?id=186557

Reviewed by Carlos Garcia Campos.

Add the --ignore-tls-errors flags to the GTK and WPE MiniBrowsers.
Enabling the flag enforces ignoring of TLS errors that occur during
load. This is primarily useful for loading test cases from the wpt or
run-webkit-httpd servers where testing-purpose certificates are used.

  • MiniBrowser/gtk/main.c:

(main):

  • MiniBrowser/wpe/main.cpp:

(main):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r232832 r232834  
     12018-06-14  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [GTK][WPE] MiniBrowsers should be able to ignore TLS errors
     4        https://bugs.webkit.org/show_bug.cgi?id=186557
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Add the --ignore-tls-errors flags to the GTK and WPE MiniBrowsers.
     9        Enabling the flag enforces ignoring of TLS errors that occur during
     10        load. This is primarily useful for loading test cases from the wpt or
     11        run-webkit-httpd servers where testing-purpose certificates are used.
     12
     13        * MiniBrowser/gtk/main.c:
     14        (main):
     15        * MiniBrowser/wpe/main.cpp:
     16        (main):
     17
    1182018-06-13  Adrian Perez de Castro  <aperez@igalia.com>
    219
  • trunk/Tools/MiniBrowser/gtk/main.c

    r232010 r232834  
    4646static gboolean automationMode;
    4747static gboolean fullScreen;
     48static gboolean ignoreTLSErrors;
    4849static const char *cookiesFile;
    4950static const char *cookiesPolicy;
     
    109110    { "proxy", 0, 0, G_OPTION_ARG_STRING, &proxy, "Set proxy", "PROXY" },
    110111    { "ignore-host", 0, 0, G_OPTION_ARG_STRING_ARRAY, &ignoreHosts, "Set proxy ignore hosts", "HOSTS" },
     112    { "ignore-tls-errors", 0, 0, G_OPTION_ARG_NONE, &ignoreTLSErrors, "Ignore TLS errors", NULL },
    111113    { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, 0, "[URL…]" },
    112114    { 0, 0, 0, 0, 0, 0, 0 }
     
    536538    g_signal_connect(webContext, "automation-started", G_CALLBACK(automationStartedCallback), NULL);
    537539
     540    if (ignoreTLSErrors)
     541        webkit_web_context_set_tls_errors_policy(webContext, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
     542
    538543    BrowserWindow *mainWindow = BROWSER_WINDOW(browser_window_new(NULL, webContext));
    539544    if (fullScreen)
  • trunk/Tools/MiniBrowser/wpe/main.cpp

    r232670 r232834  
    3737static gboolean privateMode;
    3838static gboolean automationMode;
     39static gboolean ignoreTLSErrors;
    3940static const char* cookiesFile;
    4041static const char* cookiesPolicy;
     
    5051    { "proxy", 0, 0, G_OPTION_ARG_STRING, &proxy, "Set proxy", "PROXY" },
    5152    { "ignore-host", 0, 0, G_OPTION_ARG_STRING_ARRAY, &ignoreHosts, "Set proxy ignore hosts", "HOSTS" },
     53    { "ignore-tls-errors", 0, 0, G_OPTION_ARG_NONE, &ignoreTLSErrors, "Ignore TLS errors", nullptr },
    5254    { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, nullptr, "[URL]" },
    5355    { nullptr, 0, 0, G_OPTION_ARG_NONE, nullptr, nullptr, nullptr }
     
    181183    g_signal_connect(webContext, "automation-started", G_CALLBACK(automationStartedCallback), webView);
    182184
     185    if (ignoreTLSErrors)
     186        webkit_web_context_set_tls_errors_policy(webContext, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
     187
    183188    if (uriArguments)
    184189        webkit_web_view_load_uri(webView, uriArguments[0]);
Note: See TracChangeset for help on using the changeset viewer.