diff options
| author | 2016-11-17 14:58:37 +0000 | |
|---|---|---|
| committer | 2016-11-17 14:58:37 +0000 | |
| commit | be6225de8002d6a6f5a39e5a10f8ae12b4e08a8b (patch) | |
| tree | ff658ddcd010b93d7f507b302bed111b9173ee00 /usr.sbin/httpd/server.c | |
| parent | Move OCSP loading into a separate function - it is not part of the keypair (diff) | |
| download | wireguard-openbsd-be6225de8002d6a6f5a39e5a10f8ae12b4e08a8b.tar.xz wireguard-openbsd-be6225de8002d6a6f5a39e5a10f8ae12b4e08a8b.zip | |
Check the return value of tls_config_set_protocols(), now that it returns
an int.
Diffstat (limited to 'usr.sbin/httpd/server.c')
| -rw-r--r-- | usr.sbin/httpd/server.c | 11 |
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", |
