Sfoglia il codice sorgente

check_http: cause plugin to fail early if SNI is specified without a hostname

madlohe 6 anni fa
parent
commit
29295c81f3
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      plugins/check_http.c

+ 4 - 0
plugins/check_http.c

@@ -577,6 +577,10 @@ enable_ssl:
     if (host_name == NULL && c < argc)
         host_name = strdup (argv[c++]);
 
+    if (use_sni && host_name == NULL) {
+        usage4(_("Server name indication requires that a host name is defined with -H"));
+    }
+
     if (server_address == NULL) {
         if (host_name == NULL)
             usage4 (_("You must specify a server address or host name"));