diff options
author | 2016-11-30 07:55:24 +0000 | |
---|---|---|
committer | 2016-11-30 07:55:24 +0000 | |
commit | a7cb73070a70fb65b989827ba2ae640e03dfb656 (patch) | |
tree | 5833c50faaacfacf6e55a72c9028f319b3be6d4b /usr.bin/ftp | |
parent | Check return value of tls_config_set_protocols(3) and bail out in case of (diff) | |
download | wireguard-openbsd-a7cb73070a70fb65b989827ba2ae640e03dfb656.tar.xz wireguard-openbsd-a7cb73070a70fb65b989827ba2ae640e03dfb656.zip |
Check return value of tls_config_set_protocols(3) and bail out in case of
failure
Feedback and OK jsing@
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r-- | usr.bin/ftp/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 99de864a88b..94e83c10f07 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.111 2016/11/06 13:16:50 jsing Exp $ */ +/* $OpenBSD: main.c,v 1.112 2016/11/30 07:55:24 mestre Exp $ */ /* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */ /* @@ -251,7 +251,10 @@ main(volatile int argc, char *argv[]) tls_config = tls_config_new(); if (tls_config == NULL) errx(1, "tls config failed"); - tls_config_set_protocols(tls_config, TLS_PROTOCOLS_ALL); + if (tls_config_set_protocols(tls_config, + TLS_PROTOCOLS_ALL) != 0) + errx(1, "tls set protocols failed: %s", + tls_config_error(tls_config)); if (tls_config_set_ciphers(tls_config, "legacy") != 0) errx(1, "tls set ciphers failed: %s", tls_config_error(tls_config)); |