Changeset 102598 in webkit


Ignore:
Timestamp:
Dec 12, 2011 10:17:40 AM (12 years ago)
Author:
kubo@profusion.mobi
Message:

[EFL] Add API to control whether SSL certificates should be checked.
https://bugs.webkit.org/show_bug.cgi?id=74299

Reviewed by Martin Robinson.

  • ewk/ewk_main.cpp:

(_ewk_init_body): Explicitly disable certificate checks by default.

  • ewk/ewk_network.cpp:

(ewk_network_tls_certificate_check_get):
(ewk_network_tls_certificate_check_set):

  • ewk/ewk_network.h:
Location:
trunk/Source/WebKit/efl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    • Property svn:executable deleted
    r102297 r102598  
     12011-12-12  Raphael Kubo da Costa  <kubo@profusion.mobi>
     2
     3        [EFL] Add API to control whether SSL certificates should be checked.
     4        https://bugs.webkit.org/show_bug.cgi?id=74299
     5
     6        Reviewed by Martin Robinson.
     7
     8        * ewk/ewk_main.cpp:
     9        (_ewk_init_body): Explicitly disable certificate checks by default.
     10        * ewk/ewk_network.cpp:
     11        (ewk_network_tls_certificate_check_get):
     12        (ewk_network_tls_certificate_check_set):
     13        * ewk/ewk_network.h:
     14
    1152011-12-07  Ryuan Choi  <ryuan.choi@samsung.com>
    216
  • trunk/Source/WebKit/efl/ewk/ewk_main.cpp

    r102235 r102598  
    2929#include "Settings.h"
    3030#include "ewk_logging.h"
     31#include "ewk_network.h"
    3132#include "ewk_private.h"
    3233#include "ewk_settings.h"
     
    186187    }
    187188
     189    ewk_network_tls_certificate_check_set(false);
     190
    188191    // TODO: this should move to WebCore, already reported to webkit-gtk folks:
    189192#if USE(SOUP)
  • trunk/Source/WebKit/efl/ewk/ewk_network.cpp

    r101726 r102598  
    7676}
    7777
     78Eina_Bool ewk_network_tls_certificate_check_get()
     79{
     80    bool checkCertificates = false;
     81
     82#if USE(SOUP)
     83    SoupSession* defaultSession = WebCore::ResourceHandle::defaultSession();
     84    g_object_get(defaultSession, "ssl-strict", &checkCertificates, NULL);
     85#endif
     86
     87    return checkCertificates;
     88}
     89
     90void ewk_network_tls_certificate_check_set(Eina_Bool checkCertificates)
     91{
     92#if USE(SOUP)
     93    SoupSession* defaultSession = WebCore::ResourceHandle::defaultSession();
     94    g_object_set(defaultSession, "ssl-strict", checkCertificates, NULL);
     95#endif
     96}
     97
    7898SoupSession* ewk_network_default_soup_session_get()
    7999{
  • trunk/Source/WebKit/efl/ewk/ewk_network.h

    r101726 r102598  
    3232#endif
    3333
     34typedef struct _SoupSession SoupSession;
     35
    3436/**
    3537 * Sets the given proxy URI to network backend.
     
    5557EAPI void             ewk_network_state_notifier_online_set(Eina_Bool online);
    5658
    57 typedef struct _SoupSession SoupSession;
     59/**
     60 * Returns whether HTTPS connections should check the received certificate and error out if it is invalid.
     61 *
     62 * By default, HTTPS connections are performed regardless of the validity of the certificate provided.
     63 */
     64EAPI Eina_Bool        ewk_network_tls_certificate_check_get(void);
     65
     66/**
     67 * Sets whether HTTPS connections should check the received certificate and error out if it is invalid.
     68 *
     69 * By default, HTTPS connections are performed regardless of the validity of the certificate provided.
     70 *
     71 * @param enable Whether to check the provided certificates or not.
     72 */
     73EAPI void             ewk_network_tls_certificate_check_set(Eina_Bool enable);
    5874
    5975/**
Note: See TracChangeset for help on using the changeset viewer.