]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
http: print nice error if cert exists but key does not
authorPetr Špaček <petr.spacek@nic.cz>
Thu, 4 Apr 2019 16:21:37 +0000 (18:21 +0200)
committerPetr Špaček <petr.spacek@nic.cz>
Thu, 11 Apr 2019 07:12:49 +0000 (09:12 +0200)
modules/http/http.lua.in

index ed4866234bffcb18f024eabc4ae8d30610589458..a1e8486c668734b257f514fca95aa4ec6f786080 100644 (file)
@@ -299,6 +299,10 @@ function M.add_interface(conf)
                        -- Continue reading key file
                        if crt then
                                f = io.open(conf.key, 'r')
+                               if not f then
+                                       panic('enable to open HTTP key file %s',
+                                               conf.key)
+                               end
                                key = assert(pkey.new(f:read('*all')))
                                f:close()
                        end