summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-06-17 11:21:33 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-06-17 11:25:27 +0200
commit6cb21db4ad9daece60f5607443308821c34e1d88 (patch)
tree5199fff60e65f269355475f302e6c02591121d1a
parent5c5461f7bb499bc44db2f055878f4911f4ca1401 (diff)
downloadgnutls-6cb21db4ad9daece60f5607443308821c34e1d88.tar.gz
gnutls-cli: Do not try to load the system CA trust if --insecure is specified.
-rw-r--r--src/cli.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cli.c b/src/cli.c
index 4cc858b392..8a76f2c55f 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -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");