summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorRicardo Mestre <mestre@cvs.openbsd.org>2016-11-30 07:55:25 +0000
committerRicardo Mestre <mestre@cvs.openbsd.org>2016-11-30 07:55:25 +0000
commitecc0e680007a23935fc353179c5b481968b67f32 (patch)
treeff0861dedb278c5d568a72a795e986efba5fc7db /libexec
parentf813ba054b96003e6cb41bbddb32ebad1b453ba2 (diff)
Check return value of tls_config_set_protocols(3) and bail out in case of
failure Feedback and OK jsing@
Diffstat (limited to 'libexec')
-rw-r--r--libexec/spamd/spamd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index 3e361a857df..86a97ebed1b 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.146 2016/11/08 09:31:55 mestre Exp $ */
+/* $OpenBSD: spamd.c,v 1.147 2016/11/30 07:54:36 mestre Exp $ */
/*
* Copyright (c) 2015 Henning Brauer <henning@openbsd.org>
@@ -455,7 +455,8 @@ spamd_tls_init()
if ((tlsctx = tls_server()) == NULL)
errx(1, "failed to get tls server");
- tls_config_set_protocols(tlscfg, TLS_PROTOCOLS_ALL);
+ if (tls_config_set_protocols(tlscfg, TLS_PROTOCOLS_ALL) != 0)
+ errx(1, "failed to set tls protocols");
/* might need user-specified ciphers, tls_config_set_ciphers */
if (tls_config_set_ciphers(tlscfg, "all") != 0)