$OpenBSD: patch-plugins_check_http_c,v 1.2 2020/12/10 19:52:15 sthen Exp $

avoid segfault with SSL errors, seen when connecting to an IIS host
that only allowed SNI-based connections

Index: plugins/check_http.c
--- plugins/check_http.c.orig
+++ plugins/check_http.c
@@ -966,7 +966,7 @@ check_http (void)
     result = np_net_ssl_init_with_hostname_version_and_cert(sd, (use_sni ? host_name : NULL), ssl_version, client_cert, client_privkey);
     if (verbose) printf ("SSL initialized\n");
     if (result != STATE_OK)
-      die (STATE_CRITICAL, NULL);
+      die (STATE_CRITICAL, _("SSL error\n"));
     microsec_ssl = deltime (tv_temp);
     elapsed_time_ssl = (double)microsec_ssl / 1.0e6;
     if (check_cert == TRUE) {
