From 2bd0bc65b363ffa61e4d152ba63e03d897dbb312 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 17 Nov 2016 14:58:38 +0000 Subject: Check the return value of tls_config_set_protocols(), now that it returns an int. --- usr.sbin/httpd/server.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/httpd/server.c b/usr.sbin/httpd/server.c index f8c2cf342a6..6fdb1464138 100644 --- a/usr.sbin/httpd/server.c +++ b/usr.sbin/httpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.99 2016/11/17 14:52:48 jsing Exp $ */ +/* $OpenBSD: server.c,v 1.100 2016/11/17 14:58:37 jsing Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter @@ -216,9 +216,12 @@ server_tls_init(struct server *srv) return (-1); } - tls_config_set_protocols(srv->srv_tls_config, - srv->srv_conf.tls_protocols); - + if (tls_config_set_protocols(srv->srv_tls_config, + srv->srv_conf.tls_protocols) != 0) { + log_warnx("%s: failed to set tls protocols: %s", + __func__, tls_config_error(srv->srv_tls_config)); + return (-1); + } if (tls_config_set_ciphers(srv->srv_tls_config, srv->srv_conf.tls_ciphers) != 0) { log_warnx("%s: failed to set tls ciphers: %s", -- cgit v1.2.3