Changeset e4c3041 for protocols


Ignore:
Timestamp:
2015-10-25T05:16:52Z (4 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
5756890
Parents:
d7969a1
Message:

purple: Fix certificate cache dir after changing user dir

This fixes the issue with getting asked to accept certificates that are
perfectly valid, every time.

The directory is normally created by x509_tls_peers_init(), a few calls
below purple_core_init(), which is at module initialization time, way
before we have an irc username to fix the user directory. So it creates
the wrong directory first, and now we have to fix it manually.

And apparently not being able to save cached certificates somehow means
they aren't trusted. For some reason.

< krisfremen> "for some reason"
< dx> idklol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    rd7969a1 re4c3041  
    113113           servers anyway! */
    114114        if (!dir_fixed) {
     115                PurpleCertificatePool *pool;
    115116                irc_t *irc = acc->bee->ui_data;
    116117                char *dir;
     
    127128                        purple_prefs_set_bool("/purple/proxy/socks4_remotedns", TRUE);
    128129                }
     130
     131                /* re-create the certificate cache directory */
     132                pool = purple_certificate_find_pool("x509", "tls_peers");
     133                dir = purple_certificate_pool_mkpath(pool, NULL);
     134                purple_build_dir(dir, 0700);
    129135
    130136                dir_fixed = TRUE;
Note: See TracChangeset for help on using the changeset viewer.