certmanager: Complain if key or certificate is missing from SSL config.
authorKim Alvefur <zash@zash.se>
Fri, 07 Jun 2013 20:55:02 +0200
changeset 5656 576488cffc3a
parent 5655 6d7f7548b2c9
child 5657 7957f14038e8
certmanager: Complain if key or certificate is missing from SSL config.
core/certmanager.lua
--- a/core/certmanager.lua	Fri Jun 07 20:05:23 2013 +0200
+++ b/core/certmanager.lua	Fri Jun 07 20:55:02 2013 +0200
@@ -49,6 +49,8 @@
 
 	if not ssl then return nil, "LuaSec (required for encryption) was not found"; end
 	if not user_ssl_config then return nil, "No SSL/TLS configuration present for "..host; end
+	if not user_ssl_config.key then return nil, "No key present in SSL/TLS configuration for "..host; end
+	if not user_ssl_config.certificate then return nil, "No certificate present in SSL/TLS configuration for "..host; end
 	
 	local ssl_config = {
 		mode = mode;