diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-06-17 11:21:33 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-06-17 11:25:27 +0200 |
commit | 6cb21db4ad9daece60f5607443308821c34e1d88 (patch) | |
tree | 5199fff60e65f269355475f302e6c02591121d1a /src/cli.c | |
parent | 5c5461f7bb499bc44db2f055878f4911f4ca1401 (diff) | |
download | gnutls-6cb21db4ad9daece60f5607443308821c34e1d88.tar.gz |
gnutls-cli: Do not try to load the system CA trust if --insecure is specified.
Diffstat (limited to 'src/cli.c')
-rw-r--r-- | src/cli.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1648,7 +1648,11 @@ static void init_global_tls_stuff(void) x509_cafile, x509ctype); } else { - ret = gnutls_certificate_set_x509_system_trust(xcred); + if (insecure == 0) { + ret = gnutls_certificate_set_x509_system_trust(xcred); + } else { + ret = 0; + } } if (ret < 0) { fprintf(stderr, "Error setting the x509 trust file\n"); |