summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2014-03-30 22:39:43 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2014-03-30 22:39:43 +0000
commitaa5f208c9513929febd35ed2a6c19e5ca285767b (patch)
tree015bcc4753e26f8130c4ff5f762aee45f0ec6eed /usr.bin
parent701977e87e328a9c985bb871a588b244165ec819 (diff)
Check the return value from SSL_CTX_set_cipher_list(), for consistency.
ok guenther@ sthen@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ftp/fetch.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c
index b44114cbb34..fc2e68db2f4 100644
--- a/usr.bin/ftp/fetch.c
+++ b/usr.bin/ftp/fetch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fetch.c,v 1.115 2014/03/30 22:37:41 jca Exp $ */
+/* $OpenBSD: fetch.c,v 1.116 2014/03/30 22:39:42 jca Exp $ */
/* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */
/*-
@@ -623,8 +623,11 @@ again:
SSL_CTX_set_verify_depth(ssl_ctx,
ssl_verify_depth);
}
- if (ssl_ciphers != NULL)
- SSL_CTX_set_cipher_list(ssl_ctx, ssl_ciphers);
+ if (ssl_ciphers != NULL &&
+ SSL_CTX_set_cipher_list(ssl_ctx, ssl_ciphers) == -1) {
+ ERR_print_errors_fp(ttyout);
+ goto cleanup_url_get;
+ }
ssl = SSL_new(ssl_ctx);
if (ssl == NULL) {
ERR_print_errors_fp(ttyout);