Changeset 164352e for conf.c


Ignore:
Timestamp:
2011-12-24T18:02:39Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
34ded90
Parents:
e306fbf (diff), 96f954d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • conf.c

    re306fbf r164352e  
    6767        conf->ft_listen = NULL;
    6868        conf->protocols = NULL;
     69        conf->cafile = NULL;
    6970        proxytype = 0;
    7071       
     
    177178                fprintf( stderr, "Warning: Unable to read configuration file `%s'.\n", global.conf_file );
    178179       
     180        if( conf->cafile && access( conf->cafile, R_OK ) != 0 )
     181        {
     182                /* Let's treat this as a serious problem so people won't think
     183                   they're secure when in fact they're not. */
     184                fprintf( stderr, "Error: Could not read CA file %s: %s\n", conf->cafile, strerror( errno ) );
     185                return NULL;
     186        }
     187       
    179188        return conf;
    180189}
     
    340349                                conf->protocols = g_strsplit_set( ini->value, " \t,;", -1 );
    341350                        }
     351                        else if( g_strcasecmp( ini->key, "cafile" ) == 0 )
     352                        {
     353                                g_free( conf->cafile );
     354                                conf->cafile = g_strdup( ini->value );
     355                        }
    342356                        else
    343357                        {
Note: See TracChangeset for help on using the changeset viewer.