summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2016-11-17 14:58:38 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2016-11-17 14:58:38 +0000
commit2bd0bc65b363ffa61e4d152ba63e03d897dbb312 (patch)
tree906a25d87cbf93aa2a0928e9414e29b633433ab5 /usr.sbin
parentafb97d185bbc52eea1e0a4ed379352dcba0b8580 (diff)
Check the return value of tls_config_set_protocols(), now that it returns
an int.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/httpd/server.c11
1 files changed, 7 insertions, 4 deletions
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 <reyk@openbsd.org>
@@ -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",