~sergiodj/midori/safe-ciphers

« back to all changes in this revision

Viewing changes to midori/main.c

  • Committer: Sergio Durigan Junior
  • Date: 2015-11-18 21:24:25 UTC
  • Revision ID: sergiodj@sergiodj.net-20151118212425-nxqi2a73vv4z3v73
Improve security by making sure that we use a safe set of ciphers.

This comes from Debian bug #804196 (LP Bug #1517265).  When Midori
uses libwebkitgtk, it inherits the default value of the
G_TLS_GNUTLS_PRIORITY environment variable.  Unfortunately this value
is not safe enough because it still lets GnuTLS to enable to unsafe
ciphers.  Therefore, we need to set this variable ourselves and make
sure that Midori is using safe ciphers for TLS operations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
    /* Versioned prgname to override menuproxy blacklist */
144
144
    g_set_prgname (PACKAGE_NAME "4");
145
145
 
 
146
    /* Make sure we are using a sane set of ciphers.  */
 
147
    g_setenv ("G_TLS_GNUTLS_PRIORITY",
 
148
              "NORMAL:%COMPAT:%LATEST_RECORD_VERSION:!VERS-SSL3.0:!ARCFOUR-128",
 
149
              1);
 
150
 
146
151
    if (version)
147
152
    {
148
153
        GString* versions = g_string_new ("");